Solved

Best way to copy data only from one database to another

Posted on 2013-11-25
1
301 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

792 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