dbTalk Databases Forums  

Data Movement from Prod to Dev

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Data Movement from Prod to Dev in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ed
 
Posts: n/a

Default Data Movement from Prod to Dev - 03-31-2005 , 05:51 PM






Hi,
I am asked to move all data from one database in Production to Development
everynight.
When I try to use the Import/Export Wizard, it fails because when the data
in Development Server is droped, it will violate the Foreign Key Constraint
because it drops One side of the table first without dropping many side.

What I can think of to achieve that is to script out all the contraints
first and after the DTS migration, add all the contraint scripts back in.
Or
I create a package and look at the ERD to delete the Many side data in
tables first then delete the One side tables and when I do the data
transformation, I will insert the One side first, then Many side.

Which way is better or any better soluction?

Thanks

Ed

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Data Movement from Prod to Dev - 04-01-2005 , 12:41 AM






If you are really moving ALL the database then a far simpler and tighter
solution is BACKUP and RESTORE

Allan

"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote


Quote:
Hi,
I am asked to move all data from one database in Production to Development
everynight.
When I try to use the Import/Export Wizard, it fails because when the data
in Development Server is droped, it will violate the Foreign Key Constraint
because it drops One side of the table first without dropping many side.

What I can think of to achieve that is to script out all the contraints
first and after the DTS migration, add all the contraint scripts back in.
Or
I create a package and look at the ERD to delete the Many side data in
tables first then delete the One side tables and when I do the data
transformation, I will insert the One side first, then Many side.

Which way is better or any better soluction?

Thanks

Ed


Reply With Quote
  #3  
Old   
Ed
 
Posts: n/a

Default Re: Data Movement from Prod to Dev - 04-01-2005 , 09:49 AM



Alan,
Thanks for your suggestion. How am I able to schedule a job that will
move the backup file from Prod to Dev and restore it from Dev?

Thanks again.

Ed

"Allan Mitchell" wrote:

Quote:
If you are really moving ALL the database then a far simpler and tighter
solution is BACKUP and RESTORE

Allan

"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote in message
news:Ed (AT) discussions (DOT) microsoft.com:

Hi,
I am asked to move all data from one database in Production to Development
everynight.
When I try to use the Import/Export Wizard, it fails because when the data
in Development Server is droped, it will violate the Foreign Key Constraint
because it drops One side of the table first without dropping many side.

What I can think of to achieve that is to script out all the contraints
first and after the DTS migration, add all the contraint scripts back in.
Or
I create a package and look at the ERD to delete the Many side data in
tables first then delete the One side tables and when I do the data
transformation, I will insert the One side first, then Many side.

Which way is better or any better soluction?

Thanks

Ed



Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Data Movement from Prod to Dev - 04-02-2005 , 12:29 AM



This is what I do

Create a BACKUP job on Prod.
Have it backup to a location on the Network or even the Dev server

This is where we can branch into two

Method 1

1. On the dev server have a table that takes the location of the BACKUP
2. On there is a trigger which does your RESTORE (ON INSERT)

Method 2

Have the production job kick off a RESTORE job on the Dev server .


Allan




"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote


Quote:
Alan,
Thanks for your suggestion. How am I able to schedule a job that will
move the backup file from Prod to Dev and restore it from Dev?

Thanks again.

Ed

"Allan Mitchell" wrote:

If you are really moving ALL the database then a far simpler and tighter
solution is BACKUP and RESTORE

Allan

"Ed" <Ed (AT) discussions (DOT) microsoft.com> wrote in message
news:Ed (AT) discussions (DOT) microsoft.com:

Hi,
I am asked to move all data from one database in Production to Development
everynight.
When I try to use the Import/Export Wizard, it fails because when the data
in Development Server is droped, it will violate the Foreign Key Constraint
because it drops One side of the table first without dropping many side.

What I can think of to achieve that is to script out all the contraints
first and after the DTS migration, add all the contraint scripts back in.
Or
I create a package and look at the ERD to delete the Many side data in
tables first then delete the One side tables and when I do the data
transformation, I will insert the One side first, then Many side.

Which way is better or any better soluction?

Thanks

Ed




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.