Re: Same Server and DB - Copy users and roles
From: Kevin Evans (kevin_at_convenientcomputing.com)
Date: 01/11/04
- Previous message: Dan Guzman: "Re: Using PwdEncrypt"
- In reply to: Dejan Sarka: "Re: Same Server and DB - Copy users and roles"
- Next in thread: Ray Higdon: "Re: Same Server and DB - Copy users and roles"
- Reply: Ray Higdon: "Re: Same Server and DB - Copy users and roles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 11 Jan 2004 11:33:35 -0800
Thanks Dejan
The script generator worked great with one exception. The permissions set on
the roles were not transferred along with the role to the new database. Is
there some additional setting on permission I need to complete this?
I'm using SQL2K and I'm logged in as the administrator
Thanks Again
Kevin
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@avtenta.si> wrote in
message news:eP$NdMF2DHA.3416@tk2msftngp13.phx.gbl...
> > I have an application that requires a different database for each year
of
> > data. I have the same users for all years at a given time. Logins are
not
> a
> > problem because they are on the same server but how do I automate the
user
> > and role updates made in the current years database to all other
> databases.
>
> You can create scripts (in fact, you could change the permissions with a
> script in the first place) with EM or DMO and implement them in other
> databases. Check the "Documenting and Scripting Databases" topic in Books
> OnLine.
>
> > I have hundreds of users and tables to set various securities on and
have
> to
> > replicate the permission changes across all dbs. In fact, after a number
> of
> > years I need to change users to read only on most tables.
>
> You can generate a script using a cursor and dynamic SQL to automate the
> permissions management. Instead of a cursor, you can help yourself with
the
> sp_MSforeachtable system SP. Check the article at
> http://www.databasejournal.com/features/mssql/article.php/1490661.
>
> --
> Dejan Sarka, SQL Server MVP
> Please reply only to the newsgroups.
>
>
- Previous message: Dan Guzman: "Re: Using PwdEncrypt"
- In reply to: Dejan Sarka: "Re: Same Server and DB - Copy users and roles"
- Next in thread: Ray Higdon: "Re: Same Server and DB - Copy users and roles"
- Reply: Ray Higdon: "Re: Same Server and DB - Copy users and roles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|