On Tue, Aug 9, 2011 at 5:42 AM, Malcolm Greene <[email protected]> wrote: > SQL Server gurus: I'm working on a project where we need to copy > a build copy of a database to a public facing equivalent > database. Both databases will exist on the same SQL Server > instance. The build database schema may change from time to time, > so we can't do a simple truncate and copy. > > This is one of those tasks that sounds easy until you drill into > the details, eg. detach/attach vs. alter, copy vs. > backup/restore, forcing exclusive access/restoring multi-user > access, copying schema and data, moving rights/priviledges, etc. > > Any recommendations on a script or utility to make the process > fast and fool proof and/or tips on things to watch out for during > this process? We would like to automate this process so that it > runs on an automated basis several times a day. --------------------------------
Depending on your ID data types and how they are implemented in a table along with the the this could be easy or VERY DIFFICULT. Easy way: In Database element of the treeview rt click on any of them. TASKS | Export data is the wizard that will help you extract from any db to another. If you use Auto Int primary keys by SQL Server you have a lot more work to do in removing constraints and then recreating them. Yes SQL Server will script them all out for you, it is just getting the proper layer of them correct that is time consuming. -- Stephen Russell Unified Health Services 60 Germantown Court Suite 220 Cordova, TN 38018 Telephone: 888.510.2667 901.246-0159 cell _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cajidmyksyyrinwe8h7-ry08paglzzvgbu6nba9hdww4rbht...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

