Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    39

    Unanswered: Manage Permissions Script

    How can I create a script that will set all the permissions for a specific user for some objects in a database?
    Thx in advance.

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by rtanislav
    How can I create a script that will set all the permissions for a specific user for some objects in a database?
    Thx in advance.
    What kind of permissions are you trying to set? Are you trying to copy permissions from an existing user? Or are you trying to grant specific privileges on all objects? Or specific privileges on specific objects?

    Please amplify your question a bit.

    Regards,

    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    Nov 2004
    Posts
    39
    I want to grant (or not) someprivileges on specific objects.
    I made something like that:
    GRANT SELECT ON [dbo].[AGENT] TO [web]
    GO
    DENY UPDATE , INSERT , DELETE ON [dbo].[AGENT] TO [web] CASCADE
    GO

    Actually, my problem is that I have to deploy my stored procedures on another server where these settings should be set up.
    But it looks when I made my export to that server I lost the grants for my user.
    That's why I thought it will be nice to have a script that will make the job automatically.
    Anyway, I should change the way I made the export because I have checked up the option "Drop destinaton objects first".

Posting Permissions

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