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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL2005 - how to restore users, roles, permissions

Author  Topic 

tonydang2002
Starting Member

15 Posts

Posted - 2008-12-30 : 18:51:32
Hi,
I have a task to restore a prod db to DEV and I want to keep all users, roles along with all the permission in DEV like they were before the restore. Does anyone know what would be the best way to handle this? Is there a way to script out all users, roles, permissions that I currently have on DEV db before the restore so that I can re-apply after the restore?

Thanks,
TD

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-30 : 18:56:54
Users, roles, and permissions are stored inside the user database, so you get all of those upon a restore. But you don't get logins. This is what I use to grab logins: http://weblogs.sqlteam.com/tarad/archive/2008/06/24/How-to-transfer-SQL-logins-between-SQL-Server-2005-instances.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -