Script out permission for single SQL User\AD group?

  • Hi,

    I am looking to find a way to script out permissions for single user on the server and run the permission script against another server,

    any help can be greatly appreciated.

  • You can do this in Management Studio.

    - In the Object Explorer, expand Security>Logins.

    - Right-click the user/group you want.

    - Select "Script login as>Create To>..."

    You have several options. You can create the script to a new query editor window where you can modify it, copy/paste it and save it. You can also save the script out directly to a file so you can copy the script around to your other servers.

    Edit: After re-reading your OP I think you're looking for a way to script out the specific permissions for said user. Thins like "dbcreator" "datareader" etc. Is that correct?

  • Maybe this?

    http://www.sqlservercentral.com/scripts/Migration/71023/[/url]

  • That does not work,

    I am looking for Stored Proc, When I pass the parameter as the login name.

    It should create login script, Grant permission scripts & exec sp_addrolemember script on whole instance.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply