dbTalk Databases Forums  

Audit DTS rows imported?

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


Discuss Audit DTS rows imported? in the microsoft.public.sqlserver.dts forum.



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

Default Audit DTS rows imported? - 01-26-2005 , 06:17 AM






I have a simple DTS package which imports rows from a text file into a sql
database table.

Connection 1 -> Connection 2

The DTS is just a tab delimited text file (Connection 1) of data going into
a SQL table (Connection 2) with no conversions.

How do I log the rows imported from the text file? I want to write out to a
text file log as the DTS is being performed, so that if the current row being
transferred fails I will know exactly on which row it has stopped. I also
need to read/log data from that row such as the CompanyID field..

Anybody know where I start? This is my first customised DTS job. So is it
possible to place some VB script somewhere and get it to do it?

Any code examples of which COM objects to use will be a bonus.

Thanks in advance.


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

Default Re: Audit DTS rows imported? - 01-26-2005 , 02:03 PM






Personally I would not do this during the import.

I would look to BULK the text file into a working table which resenbles the
file.

You can then insert to the destination from there using TSQL.

This is usually much quicker

Comparing key information after the import will also tell you what went
awry.

--



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


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

Quote:
I have a simple DTS package which imports rows from a text file into a sql
database table.

Connection 1 -> Connection 2

The DTS is just a tab delimited text file (Connection 1) of data going
into
a SQL table (Connection 2) with no conversions.

How do I log the rows imported from the text file? I want to write out to
a
text file log as the DTS is being performed, so that if the current row
being
transferred fails I will know exactly on which row it has stopped. I also
need to read/log data from that row such as the CompanyID field..

Anybody know where I start? This is my first customised DTS job. So is it
possible to place some VB script somewhere and get it to do it?

Any code examples of which COM objects to use will be a bonus.

Thanks in advance.




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

Default Re: Audit DTS rows imported? - 01-27-2005 , 03:07 AM



Hi Allan,

I would still prefer to inject some code at some point in the DTS. The text
file isn't large and will usually only consist of about 10 rows. So speed is
not so important.

Any other suggestions?

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.