Re: Permission

From: Julia (Julia_at_discussions.microsoft.com)
Date: 08/16/05


Date: Tue, 16 Aug 2005 05:25:16 -0700

Thanks!

"Tom Moreau" wrote:

> If you go that route, you need to have it script the objects. It won't
> script permissions unless objects have been scripted, too. Now, if you want
> to do this programmatically, you can run:
>
> EXEC sp_helprotect NULL, NULL, NULL, 'o'
>
> Save the results into a temp table and then generate the appropriate
> statements from it. Save the output and then run the script on the target.
>
> That said, if the source and target DB's are in the same SQL Server
> instance, then you don't have to worry about the permissions. If they're on
> different instances, then you'd have to run sp_change_users_login to synch
> the users and their logins. The permissions wouldn't need to be changed -
> unless you needed different security between source and target.
>
> --
> Tom
>
> ----------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Julia" <Julia@discussions.microsoft.com> wrote in message
> news:A083A0C5-C66A-4FD0-9B30-799777C71D53@microsoft.com...
> Hi Tom,
>
> Well, I would like to script only the user and the permission of that user.
> Then I would like to send the script to the database administrator for him
> to
> run the script.
>
> I have tried to do like this:
> In the SQL server I have choosen All tasks -> Generate SQL Script... ->
> Options. Then I marked the "Script database", "Script database users and
> database roles" and "Script object-level permissions".
>
> This gave me a script that I can use but I miss the Table Permissions
> (Select, Update, Insert, Delete, Dri) and the Procedure permissions (Exec).
> This is what I need...
>
> Thanks
> Julia
>
> "Tom Moreau" wrote:
>
> > It's really up to you which permissions you want to grant in the copied
> > database. You can script things according to what you want and then run
> > the
> > script after restoring the DB. Did you have something specific in mind?
> >
> > --
> > Tom
> >
> > ----------------------------------------------------
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> > SQL Server MVP
> > Columnist, SQL Server Professional
> > Toronto, ON Canada
> > www.pinpub.com
> > ..
> > "Julia" <Julia@discussions.microsoft.com> wrote in message
> > news:D5E1A963-DE6C-455C-9B45-E62B516A9473@microsoft.com...
> > Hi,
> > I have a database user in my SQL-server (a server I use for test and
> > development). This user has some select and update permissions on some
> > tables. Is it possible to make a script or anything else so that the
> > database
> > administrator for the original database doesnt have to edit all
> > permissions
> > one by one?
> >
> > Thanks
> > julia
> >
> >
>
>



Relevant Pages

  • Re: DTS package to copy database
    ... Why not BACKUP and RESTORE and then apply scripts to change any owners, ... Create a SQL Script to remove the constraints ... >> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... >>> The DB permissions are set for local users on each machine (including ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS package to copy database
    ... Create a script that will drop DRI on the destination ... Create a DTS package to pump all data from Source --> Destination ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... >>> The DB permissions are set for local users on each machine (including ...
    (microsoft.public.sqlserver.dts)
  • Re: cant get access to disk share when connecting from a remote s
    ... The systems are DUTs. ... for each of the drives within the system. ... Everything in the scripts work except the file permissions below the shares ... the shares on the DUTs manually, after they run my rename script, but I would ...
    (microsoft.public.windows.server.scripting)
  • Re: VBA Script to Read WMP 11 Database
    ... The script failed on the desktop when I downloaded WMP11, ... Just reviewing the bidding -- WMP 11 responds properly to commands in a VBS ... That's why the computer wouldn't let me manually change the permissions. ... Digital Media MVP: 2004-2007 ...
    (microsoft.public.windowsmedia)
  • Re: VBA Script to Read WMP 11 Database
    ... The script failed on the desktop when I downloaded WMP11, ... Just reviewing the bidding -- WMP 11 responds properly to commands in a VBS ... That's why the computer wouldn't let me manually change the permissions. ... The CREATOR OWNER is likely on windows to be one of the admin accounts ...
    (microsoft.public.windowsmedia)