Solved

Best way to copy data only from one database to another

Posted on 2013-11-25
1
293 Views
Last Modified: 2016-02-11
I've created a database copy on our development server from a live database on our production server by doing a SQL backup and restore. I've done some work on the development server copy database by adding tables, stored procedures etc. As time's gone on though, the data on the development server is quite out of date. What's the best way of refreshing the data on the development server from the live server without losing any of my new database objects? It's only the table data I want to refresh by the way. Nothing else like stored procedures etc. as I've amended of these as well as creating new ones.
0
Comment
Question by:Grffster
1 Comment
 
LVL 5

Accepted Solution

by:
Lawrence Barnes earned 500 total points
ID: 39675609
I'm handling this with a cross server merge that runs on the development server and pulls data from production in small batches (so the DBA's don't hang you.)


In the source portion of your merge you create a query that morphs the production data into your development data format (additional columns, etc.) and then you use the merge to update, add or delete.

To support the batching (from production to development) you also have a query in the target portion of your merge restricing the records to the same ones as the source.

Then I while-loop these two going from batch to batch until complete...and the DBA's let me live.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now