Sql-server – DB Permission: User can drop only their created db’s

sql serversql-server-2008sql-server-2012

I want to set permission against a user, which can create database and drop on their created databases neither any database. Any idea/suggestion ?

Best Answer

to grant use privliges to create database you can use the following command:

use [master]
GO
GRANT CREATE ANY DATABASE TO [LoginName]
GO

To drop it you need to make sure the user has owner privileges on the database, you can use the command ALTER AUTHORIZATION ON DATABASE::db TO [LoginName];