Monday, April 28, 2008

Error when Creating Database Projects

Recently I got a question about permissions error that  occurred when trying to create database project in the local instance of Microsoft SQL Server used for design-time validation. The error was: "CREATE DATABASE permission denied in database 'master'".

Workaround

To create database you must be a member of the dbcreator and securityadmin fixed server roles in the server instance that you specified for design-time validation.

First, ensure that the instance name that is specified for your design-time validation database is correct.

Second, a user with sysadmin permissions should run the following script on your design-time validation database:

USE master
GO
GRANT EXECUTE ON sp_detach_db TO public
GO

For more information read Required Permissions in Database Edition.

No comments: