Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

SQL Server 2000 Import Log

I have a DTS package setup to import 4 excel files into 4 different tables in the same database. All of the imports are taken care of in one package. Is there a way to setup the package to write the number of files imported for each file to a text file? It could even be "File1 - 50 records". I want to use this for audit purposes. I appreciate any help, thanks!!
[363 byte] By [cartmanskids] at [2007-11-11 7:15:29]
# 1 Re: SQL Server 2000 Import Log
when i use csv files and i use osql commands I trap the output of the command into a txt file it gives the information you are looking for just like a batch file , so try executing your DTS package with a osql command and use the >>txtfile to get it into a log

Here is a sample of what i do
call :sql %Database% "DataTable truncation" "DELETE FROM dbo."%TableName%
call :bulkcopy %Database% %TableName% "DataTable .csv"

The log i get is like below

Starting copy...

2 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.): total 1

Hope this helps
srinivas_s at 2007-11-11 23:47:52 >