dbTalk Databases Forums  

Transfer data from 6.5 database to 2000 database

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


Discuss Transfer data from 6.5 database to 2000 database in the microsoft.public.sqlserver.dts forum.



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

Default Transfer data from 6.5 database to 2000 database - 12-09-2003 , 05:25 AM






Hi all.

I am trying to use as DTS package to import data across from an old SQL 6.5
database to a new 2000 one. I have already used the upgrade wizard to
set-up all the tables and fixed the few minor problems that occurred. I
just want to import the data and overwrite the data that is present already.

The problem I have is that the DTS does not seem to transfer the data in a
sensible order. It does not seem to consider foreign key relatshionships.
What happens is that the package tries to import child records into a table
before the parent records have been created in the master table. This then
complains about the foreign key being violated and cancels the import for
the table concerned. So I end up with about a third of the tables being
transferred successfully and I then have to re-run the import on the
remaining tables.

I need to be able to do this several times over the next few weeks, so I
want to figure out how to get the package to work. Is there some way to
disable all the foreign keys whilst the import is running and then re-enable
them again?

Thanks.

John.



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

Default Re: Transfer data from 6.5 database to 2000 database - 12-09-2003 , 02:21 PM






OK

The way I would do it is this.

If you have the same constraints on your tables in 6.5 as those in 2000 then
you know the data is clean (As far as RI is concerned). I would script out
DROP statements for the constraints or

ALTER TABLE <name> NOCHECK CONSTRAINT ALL

Pump the data then reapply the check constraints. To actually check the
data then you issue a dummy update to the table

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"John Faris" <johnfaris (AT) nospam (DOT) hotmail.com> wrote

Quote:
Hi all.

I am trying to use as DTS package to import data across from an old SQL
6.5
database to a new 2000 one. I have already used the upgrade wizard to
set-up all the tables and fixed the few minor problems that occurred. I
just want to import the data and overwrite the data that is present
already.

The problem I have is that the DTS does not seem to transfer the data in a
sensible order. It does not seem to consider foreign key relatshionships.
What happens is that the package tries to import child records into a
table
before the parent records have been created in the master table. This
then
complains about the foreign key being violated and cancels the import for
the table concerned. So I end up with about a third of the tables being
transferred successfully and I then have to re-run the import on the
remaining tables.

I need to be able to do this several times over the next few weeks, so I
want to figure out how to get the package to work. Is there some way to
disable all the foreign keys whilst the import is running and then
re-enable
them again?

Thanks.

John.





Reply With Quote
  #3  
Old   
John Faris
 
Posts: n/a

Default Re: Transfer data from 6.5 database to 2000 database - 12-10-2003 , 02:52 AM



Thanks Allan.

This does work, I just wondered if there was some easy RI "toggle" for such
purposes.

John.

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
OK

The way I would do it is this.

If you have the same constraints on your tables in 6.5 as those in 2000
then
you know the data is clean (As far as RI is concerned). I would script
out
DROP statements for the constraints or

ALTER TABLE <name> NOCHECK CONSTRAINT ALL

Pump the data then reapply the check constraints. To actually check the
data then you issue a dummy update to the table

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"John Faris" <johnfaris (AT) nospam (DOT) hotmail.com> wrote in message
news:uzx0ZckvDHA.2072 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Hi all.

I am trying to use as DTS package to import data across from an old SQL
6.5
database to a new 2000 one. I have already used the upgrade wizard to
set-up all the tables and fixed the few minor problems that occurred. I
just want to import the data and overwrite the data that is present
already.

The problem I have is that the DTS does not seem to transfer the data in
a
sensible order. It does not seem to consider foreign key
relatshionships.
What happens is that the package tries to import child records into a
table
before the parent records have been created in the master table. This
then
complains about the foreign key being violated and cancels the import
for
the table concerned. So I end up with about a third of the tables being
transferred successfully and I then have to re-run the import on the
remaining tables.

I need to be able to do this several times over the next few weeks, so I
want to figure out how to get the package to work. Is there some way to
disable all the foreign keys whilst the import is running and then
re-enable
them again?

Thanks.

John.







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.