Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Customizing output from DTSRun utility

Author  Topic 

allend2010
Starting Member

28 Posts

Posted - 2003-07-24 : 16:36:03
Hello:

I am using DTSRun in a batch file to import a large file. I was wondering if there is a way to customize how the output is displayed on the screen. Currently, I just get a scroll for all of the items that are imported that looks like this:

DTSRun OnProgress: DTSStep_DTSDataPumpTask_1; 1675000 Rows have been transforme
d or copied.; PercentComplete = 0; ProgressCount = 1675000
DTSRun OnProgress: DTSStep_DTSDataPumpTask_1; 1679000 Rows have been transforme
d or copied.; PercentComplete = 0; ProgressCount = 1679000

etc...

What I would like to do is have just the row number and the percentage increment without the scrolling. If anybody knows of a way to do this or if it cannot be done, I would appreciete any help you could provide.

Thanks in advance,
Allen D.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-07-24 : 17:16:24
I was wrong on the last one I answered for you, but...

You can not change the output of dtsrun. To see what options are available, run dtsrun /? at the command prompt.



Tara
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-07-24 : 19:07:34
If you redirect the output from dtsrun into a file, you can use the for command to strip out some of the unnecessary stuff.

Something like:

dtsrun (blah blah dtsrun parameters here) >dtsout.txt

Then you can run:

for /F "tokens=1,2,3* delims=;" %a in (dtsout.txt) do @echo %b %c

That will give you:
 1675000 Rows have been transformed or copied.  PercentComplete = 0
1679000 Rows have been transformed or copied. PercentComplete = 0
If you want to know more, see the Windows help file and look up "for". It's pretty amazing and is just the thing for tweaking output, especially in a batch file.

Go to Top of Page

allend2010
Starting Member

28 Posts

Posted - 2003-07-25 : 11:28:07
Thanks again for your help. I'll work with it.

Al

Go to Top of Page
   

- Advertisement -