dbTalk Databases Forums  

DTS and Identity Columns

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


Discuss DTS and Identity Columns in the microsoft.public.sqlserver.dts forum.



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

Default DTS and Identity Columns - 12-06-2004 , 10:57 AM






Hello All,

I was trying to transfer a set of Records from a table (SourceTable) in one
database to a table (TargetTable) in
another database. The TargetTable has an additional IDENTITY column which is
set to get inserted automatically
- ie, I have UN-Checked the "Enable Identity Insert" check box in the
Options Tab of the Transform Data Task
Properties.

To get the trasnfer done , I created a "Transform Data Task" between the two
connections pointing to the Source
and Destination databases respectively.

I also had to update a log file with the total number of records
transferred, total number of records errored and for
this I created an ActiveX script for the "Pump Complete" phase filter and
introduced the needed code.

But everytime, I run this package it gives the following error :
[Error Description:Insert error, column 3 ('SeqID', DBTYPE_I4), status 10:
Integrity violation; attempt to insert
NULL data or data which violates constraints.]

But the package executes fine when I remove this ActiveX script
Transformation. Note that this script merely updates
a log file. I read somewhere that I could address this issue by changing the
"Max Error Count" in the Options tab to
something very large ( set it to 9999 which is the max allowed). But I'm
sure that this would also result in an error
when the records in the source table are more than 9999 (which is the max
that one can set the error count to).
In my case all the source records will result in an error since IDENTITY
column (in TagrgetTable table that is) is a
mandatory column.

Would any one know how to address this ? Any help will be highly appreciated
!!

Thanks,
Gopi



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

Default Re: DTS and Identity Columns - 12-06-2004 , 12:36 PM






Does this article help any?

Problems With IDENTITY() and the DataPump task.
(http://www.sqldts.com/default.aspx?293)

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Gopinath R" <gopinathr (AT) healthasyst (DOT) com> wrote

Quote:
Hello All,

I was trying to transfer a set of Records from a table (SourceTable) in
one database to a table (TargetTable) in
another database. The TargetTable has an additional IDENTITY column which
is set to get inserted automatically
- ie, I have UN-Checked the "Enable Identity Insert" check box in the
Options Tab of the Transform Data Task
Properties.

To get the trasnfer done , I created a "Transform Data Task" between the
two connections pointing to the Source
and Destination databases respectively.

I also had to update a log file with the total number of records
transferred, total number of records errored and for
this I created an ActiveX script for the "Pump Complete" phase filter and
introduced the needed code.

But everytime, I run this package it gives the following error :
[Error Description:Insert error, column 3 ('SeqID', DBTYPE_I4), status 10:
Integrity violation; attempt to insert
NULL data or data which violates constraints.]

But the package executes fine when I remove this ActiveX script
Transformation. Note that this script merely updates
a log file. I read somewhere that I could address this issue by changing
the "Max Error Count" in the Options tab to
something very large ( set it to 9999 which is the max allowed). But I'm
sure that this would also result in an error
when the records in the source table are more than 9999 (which is the max
that one can set the error count to).
In my case all the source records will result in an error since IDENTITY
column (in TagrgetTable table that is) is a
mandatory column.

Would any one know how to address this ? Any help will be highly
appreciated !!

Thanks,
Gopi




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.