[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.8

I need to Copy of a large Production db which will form the basis of a Consolidated db

Asked by KarinLoos in MS SQL Server

Tags: copy, sql, db

Hi experts

We are implementing a consolidated database which will evenutally contain the data of all the production databases around the world. It is basically a
replica of the production db with some extra fields.
The production databases are live (24/7 real time) as production is 24/7.

Coming sunday I have roughly half an hour to :
1.  copy the data from the main production db (which is the largest db and is an existing live DB which will be the kick off for the consolidated db)
2.  to effect some minor changes (adding some fields),
3.  do a few large updates on these new fields.  I have timed the updates in a  development environment (equal to prod environment) and the updates alone
    will take 15 minutes.

I am putting the Prod database in single user mode during this procedure. (to avoid any rogue users trying to continue even though they have been
told that the DB will be down for roughly 30 minutes from 3pm.)
The prod db and new consol db will reside on the same server (not my choice)

Plan A:
Backup Prod database.
Restore Prod Database to new consolildated db
create unique-identifiers for records in the new consol db  ( 2 tables involved )
create 2 "temp tables" to hold id's (identiy seeds") versus unique identifiers
copy  2 tables across to prod db
add extra fields to prod db
update for unique identifiers and a few other extra fields

Plan B:
use sp_detach_db on the prod database.
use sp_detach_db from the new consolidated db (which at this stage is just an empty shell ie no tables nothing)
copy mdf and ldf files (from Prod)  renaming them to the mdf and ldf files of the cons database
use sp_attach_db on the prod database
use sp_attach_db on the cons database
create unique-identifiers for records in the new consol db  ( 2 tables involved )
create 2 "temp tables" to hold id's (identiy seeds") and unique identifiers
copy  2 tables across to prod db
add extra fields to prod db
update for unique identifiers and a few other extra fields

To clarify :
the other production db's have the required fields as they have been newly implemented. SO  this is a once off procedure.
the other production db's have NO link with head-office (ie sql replication is out of the question).
I cannot use the Saturday nights backup as opposed to the current backup in Plan A as production is 24/7 and I need the most current data
when I copy across.

My question is which plan is better and faster.  
BTW I have tried the TransferDatabase Task in DTS (by trying to make a copy of the development environment as a test)  but for some reason this  takes for ever (roughly 30 minutes) and at the end throws an error.






[+][-]12/08/04 09:07 AM, ID: 12775283Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/08/04 09:10 AM, ID: 12775305Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: MS SQL Server
Tags: copy, sql, db
Sign Up Now!
Solution Provided By: SjoerdVerweij
Participating Experts: 2
Solution Grade: A
 
 
Loading Advertisement...
20091021-EE-VQP-81