We are using EF4.3 and Code First.
Our DBAs are keen to reduce the permissions developers have on the development database. But we’ve had many situations where we’ve been unable to create the database after it’s been dropped when we call DropCreateDatabaseIfModelChanges
What are the minimum database permissions required for a user to be able to call both DropCreateDatabaseIfModelChanges and DropCreateDatabaseAlways?
Do these require different permissions?
Is there any documentation that I can refer our DBA’s to that will help explain what is required?
Both initializers need permissions for dropping and creating database. These operations require very different permissions:
db_ownerin SQL Server).dbcreatorrole in SQL Server)You also need read access on Master database.
Btw. if this is related to development environment you should use your own local database server instead.