street9009
asked on
SQL Server 2005: Create the same User Role on New Database
Is it possible to export a user role from one MSSQL database and create the same role with same permissions on a new database?
ASKER
Hmm. I kinda understand, but I'm not sure I know how to use it.
Here is another article from Microsoft explaining the same. I do not think there is a quick way to do this.
http://support.microsoft.com/kb/246133
P.
http://support.microsoft.com/kb/246133
P.
Another one with screen shots. May be this is a little simpler to follow:
http://www.techrepublic.com/blog/howdoi/how-do-i-transfer-logins-from-one-sql-server-2005-instance-to-another/140
P.
http://www.techrepublic.com/blog/howdoi/how-do-i-transfer-logins-from-one-sql-server-2005-instance-to-another/140
P.
the above are good for logins, which is step#1 and needful before getting the users and user roles in (db_datareader etc)
http://www.sql-server-performance.com/articles/dba/object_permission_scripts_p1.aspx
gives you script to do the database roles.
http://www.sql-server-performance.com/articles/dba/object_permission_scripts_p1.aspx
gives you script to do the database roles.
ASKER
I just need a script that will output what I need to create a custom user role on any database. I already have the proper queries to grant the users that role and revoke the others.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
http://www.databasejournal.com/features/mssql/article.php/2228611/Migrating-Logins-from-One-SQL-Server-to-Another.htm
P.