Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2009-01-09 : 14:51:39
|
Is there any way I can script out logins,users,roles and object permissions to a specific database.When I try to script out from sql server Enterprise I can not specifically script the logins for a specific database.Tools like DB artisian does it.Please let me know. |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-01-09 : 14:58:40
|
look for sp_helplogins,sp_helpusers,sp_helprole,sp_helprotect. |
|
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2009-01-09 : 16:57:20
|
Thanks a lot.But how can I run one script and use that script to get all the "logins,users,roles and object permissions to a specific database" after the restore is done to put back my users and then apply the "sp_change_users_login" |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-01-09 : 17:40:41
|
Use sp_change_users_login 'report' to find unmatching SID logins.If you are doing for whole instances,use this:http://support.microsoft.com/kb/246133 |
|
|
|
|
|