what are the permissions needed to create and modify databases and to create users
-
15 august 2012 02:06
Hi All,
I want to know which permissions are required to create user,create database and modify database in sql server
Maheshwar Reddy
- Mutat de Tom Phillips 15 august 2012 21:34 Security question (From:SQL Server Database Engine)
Toate mesajele
-
15 august 2012 02:11
Here is the exhaustive list of database engine permissions, which cover each of these scenarios:
http://msdn.microsoft.com/en-us/library/ms191291
Thanks,
Sam Lester (MSFT)
This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.- Propus ca răspuns de Samuel Lester - MSFTMicrosoft Employee 15 august 2012 02:27
- Marcat ca răspuns de Maggie LuoMicrosoft Contingent Staff, Moderator 22 august 2012 11:43
-
15 august 2012 02:13
The permissions hierarchy picture also helps explain a bit more:
http://msdn.microsoft.com/en-us/library/ms191465
This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.- Propus ca răspuns de mq44944 15 august 2012 03:25
- Marcat ca răspuns de Maggie LuoMicrosoft Contingent Staff, Moderator 22 august 2012 11:43
-
15 august 2012 03:25
good picture!The permissions hierarchy picture also helps explain a bit more:
http://msdn.microsoft.com/en-us/library/ms191465
This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread. -
15 august 2012 12:26
Hi Masheshwar,
- You need db_creator rights because the members of this fixed server role can create databases, and can alter and restore their own databases.
- You need securityadmin because the members of this fixed server role can manage logins and their properties. They can GRANT, DENY, and REVOKE server-level permissions. They can also GRANT, DENY, and REVOKE database-level permissions. Additionally, they can reset passwords for SQL Server logins.
- You need db_securityadmin fixed database role so that youcan modify role membership and manage permissions within the database.
You can grant these permissions as follow:
USE [master] GO EXEC master..sp_addsrvrolemember @loginame = N'<SpecifyUserName>', @rolename = N'dbcreator' GO EXEC master..sp_addsrvrolemember @loginame = N'<SpecifyUserName>', @rolename = N'securityadmin' GO CREATE USER [<SpecifyUserName>] FOR LOGIN [SpecifyUserName] GO EXEC sp_addrolemember N'db_accessadmin', N'<SpecifyUserName>' GO
Regards,
Basit A. Farooq (MSC Computing, MCITP SQL Server 2005 & 2008, MCDBA SQL Server 2000)
http://basitaalishan.com
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.- Editat de Basit Farooq 15 august 2012 12:27