Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Restore Prod DB Into Dev DB Apply Dev Security

 
   Database Help (Home) -> Security RSS
Next:  Subsummaries in columns  
Author Message
Joe K.2

External


Since: Oct 12, 2004
Posts: 61



(Msg. 1) Posted: Fri Dec 12, 2008 11:58 am
Post subject: Restore Prod DB Into Dev DB Apply Dev Security
Archived from groups: microsoft>public>sqlserver>security (more info?)

I have a SQL Server 2005 production database that has approximately 50 users
and several application roles. What is the best way to restore production
database into your development database and users in the updated development
database with the same security permissions before the restore was applied?

I would like to make sure the development users have the same permissions
before and after the database restore has been applied.

Please help with the steps and procedures to complete this task.


Thank You,

 >> Stay informed about: Restore Prod DB Into Dev DB Apply Dev Security 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 2) Posted: Fri Dec 12, 2008 3:38 pm
Post subject: Re: Restore Prod DB Into Dev DB Apply Dev Security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Joe K. (Joe K. DeleteThis @discussions.microsoft.com) writes:
> I have a SQL Server 2005 production database that has approximately 50
> users and several application roles. What is the best way to restore
> production database into your development database and users in the
> updated development database with the same security permissions before
> the restore was applied?
>
> I would like to make sure the development users have the same permissions
> before and after the database restore has been applied.
>
> Please help with the steps and procedures to complete this task.

If I understand your question, you have a database A. You are now throwing
that database away and in place of that you put a copy of the database B.
However, you want to migrage the security scheme of what you had in A
to the copy of B.

I can't think of any convenient and quick way to script all permissions.
You could script the entire database, the one you are about to replace,
by right-clicking the database and selecting Tasks->Generate Scripts.
Opt to script all objects, and make sure that you have "Script object-level
permissions". You would then have to extract the GRANT statements from
the file. You should definitely take some samples, to make sure that it
includes all sorts of permission you know that you have used.


--
Erland Sommarskog, SQL Server MVP, esquel DeleteThis @sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 >> Stay informed about: Restore Prod DB Into Dev DB Apply Dev Security 
Back to top
Login to vote
bass_player

External


Since: Dec 05, 2008
Posts: 13



(Msg. 3) Posted: Fri Dec 12, 2008 5:32 pm
Post subject: Re: Restore Prod DB Into Dev DB Apply Dev Security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Check this out
How to transfer the logins and the passwords between instances of SQL Server
2005
http://support.microsoft.com/kb/918992

"Joe K." wrote in message

>
> I have a SQL Server 2005 production database that has approximately 50
> users
> and several application roles. What is the best way to restore production
> database into your development database and users in the updated
> development
> database with the same security permissions before the restore was
> applied?
>
> I would like to make sure the development users have the same permissions
> before and after the database restore has been applied.
>
> Please help with the steps and procedures to complete this task.
>
>
> Thank You,
 >> Stay informed about: Restore Prod DB Into Dev DB Apply Dev Security 
Back to top
Login to vote
Uri Dimant

External


Since: Aug 24, 2003
Posts: 1744



(Msg. 4) Posted: Sun Dec 14, 2008 4:25 am
Post subject: Re: Restore Prod DB Into Dev DB Apply Dev Security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jeo
Another method could be creating DTS/SSIS and transfer all the data into
production, of cause if you added new tables and whatever you should write
a script to migrate them on the dev machine

Take a look at RedGate tool to do the job


"Joe K." wrote in message

>
> I have a SQL Server 2005 production database that has approximately 50
> users
> and several application roles. What is the best way to restore production
> database into your development database and users in the updated
> development
> database with the same security permissions before the restore was
> applied?
>
> I would like to make sure the development users have the same permissions
> before and after the database restore has been applied.
>
> Please help with the steps and procedures to complete this task.
>
>
> Thank You,
 >> Stay informed about: Restore Prod DB Into Dev DB Apply Dev Security 
Back to top
Login to vote
sql_noob

External


Since: Dec 12, 2008
Posts: 9



(Msg. 5) Posted: Thu Dec 18, 2008 7:40 am
Post subject: Re: Restore Prod DB Into Dev DB Apply Dev Security [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 14, 3:28 am, "Uri Dimant" wrote:
> Jeo
> Another method could be creating DTS/SSIS and transfer all the data into
> production, of cause if you added new tables and whatever  you should write
> a script to migrate them on the dev machine
>
> Take a look at RedGate tool to do the job
>
> "Joe K." wrote in messagenews:56489143-018F-455B-8D53-67E91C0F5B15@microsoft.com...
>
>
>
>
>
> > I have a SQL Server 2005 production database that has approximately 50
> > users
> > and several application roles.  What is the best way to restore production
> > database into your development database and users in the updated
> > development
> > database with the same security permissions before the restore was
> > applied?
>
> > I would like to make sure the development users have the same permissions
> > before and after the database restore has been applied.
>
> > Please help with the steps and procedures to complete this task.
>
> > Thank You,- Hide quoted text -
>
> - Show quoted text -

create the same users on your dev side
restore the db
run sp_change_users_login

to make it faster you can write a sp which calls the above for every
user to make it quicker
 >> Stay informed about: Restore Prod DB Into Dev DB Apply Dev Security 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
permissions issue with restore of a db from one server to .. - I have backed up a database from ServerA and restored it onto ServerB. I realise that permissions do not get transferred correctly as part of the restore so i have corrected these on ServerB so that they match ServerA. The app i am using to look at the....

Minimum permissions to restore a database - Given two servers: DevServer and ProdServer Each Server has an AppAdmin user. AppAdmin is a member of dbcreator role on both servers. So long as we are creating DBs from scratch, all is good. The problem I face is: When AppAdmin restores a database..

Minimum permissions for Backup/Restore - I'm fairly new to SQLServer security and I'm finding that once someone has access to the physical file it seems to be very difficult to prevent them from making updates. I used to use Access and with that I was able to secure the database and set the...

Permission to restore databases and access them without be.. - How can I give a user permissions on SQL Server 2000 so they can restore a database (copied from the Production server) to the Test server, and get access to the database they just restored? I assigned them to the dbcreator server role and that lets....

Security Audit - I have problem with opening a SQL Server Logs. It takes over 5-10minutes to open the log file (Under Management->SQL Server Logs->Current). I have Audit level to log "ALL" due to SOX compliance. The errorlog files are about 19 megaby...
   Database Help (Home) -> Security All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]