[dba-SQLServer] I'm getting nowhere

David McAfee davidmcafee at gmail.com
Sat Feb 19 16:29:13 CST 2011


John,  I'm at a reggae fest right now and the air isn't very clear, so
excuse me if I'm not very clear right now.

Try something like:

--Select the database
USE yourdatabasenamehere
--Adds the following roles to the database above
EXEC sp_addrole 'Accounting'
EXEC sp_addrole 'AccountingMgr'
--Makes the accounting manager role a part of the
--accounting role so you don't have to recreate all of those privileges
EXEC sp_addrolemember 'Accounting', 'AccountingMgr'
--adds an existing user to the role accounting
EXEC sp_addrolemember 'Accounting', 'JColby'

Look up sp_grantdbaccess and CREATE USER for more info.
HTH
David

Sent from my Droid phone.
On Feb 19, 2011 11:54 AM, "jwcolby" <jwcolby at colbyconsulting.com> wrote:



More information about the dba-SQLServer mailing list