Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a DBO user to database

Status
Not open for further replies.

maxf

Programmer
Oct 2, 2002
25
US
What is the T-SQL command to add a user with DBO privileges(allow user to select, insert, update, delete table information, run all stored procedures, etc... basically, check all the checkboxes in manage permissions section) to a database?

thanks
 
All you need to do is ad them to the db_owners role.

However, they won't be creating objects (tables) as dbo unless they do it explicitly.. And they will not be able to Restore a database or it's logs unless they are a sysadmin or the actuall dbo.

and stored procs...
add a user and add them to a group...
sp_adduser [ @loginame = ] 'login'
[ , [ @name_in_db = ] 'user' ]
[ , [ @grpname = ] 'group' ]
add an existing user to a group...
sp_addrolemember [ @rolename = ] 'role' ,
[ @membername = ] 'security_account'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top