![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm migrating an ACCESS DB to SQL server 2000. I've created the SQL2k DB structure and I have inserted some data. Now I'm migrating all the code, the query and the reports. How can I import the new data in the existing structure I made? I tried with DTS and import wizards but it seems unable to sync a table. It tries to delete and recreate the table but this is impossible because of relations and keys. Another option is to append new data, but I want to append new data and also overwrite the existing one. It seems a very common issue for me but I can't find a solution. Here is an example: Table TipoPratica in SQL 2k with its key and its relations with other tables ID; Name ; ecc the rows are outdated and I need to populate tha table with fresh data from an Access table with the same structure. What is the right way? Thank you very much Diego |
#3
| |||
| |||
|
|
Try to create a DTS by hand. create both the connections, then create a(some) Execute SQL task to delete the data on your destination tables then create your transform data tasks as usual. |
#4
| |||
| |||
|
|
Hello, Try to create a DTS by hand. create both the connections, then create a(some) Execute SQL task to delete the data on your destination tables then create your transform data tasks as usual. Yes. The problem is that I need to update some tables but the relations with other tables prevent the DTS from deleting and rebuilding those tables. Is there a way to pump data, overwriting the existing without checking the relations ? Thank you |
#5
| |||
| |||
|
|
There are a few things you can do depending on what tasks you are using but one option that works for most scenarios is that you can use ALTER TABLE on a table that has foreign key constraints to disable the constraint, e.g. ALTER TABLE table_name NOCHECK CONSTRAINT constraint_name You can then enable the constraint after you are done using ALTER TABLE table_name CHECK CONSTRAINT constraint_name You can find more information and an example in books online under ALTER TABLE. |
![]() |
| Thread Tools | |
| Display Modes | |
| |