![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |