Results 1 to 4 of 4

Thread: Script Roles User Belongs to in SQL 2005

Threaded View

  1. #1
    Join Date
    May 2006
    Posts
    5

    Script Roles User Belongs to in SQL 2005

    I cannot figure out how to script the roles that users belong to in SQL 2005 Management Studio. I can get it to script the users and I can get it to script the Roles in the database. But I cannot get it to script the users as members of the roles that they belong to in SQL 2005.
    In SQL 2000 Enterprise Manager, you could right click on a database and go to All Tasks>Generate SQL Script and go to the Options tab and select 'Script database users and database roles' and it would give you the sp_grantdbaccess and sp_addrolemember statements to recreate the users correctly.
    Let me know if you have figured out how to do the same thing in 2005 yet.

    Thanks,
    Anthony
    Last edited by avalenti; 08-21-2006 at 12:52 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •