Groups | Blog | Home
all groups > sql server dts > april 2006 >

sql server dts : How to break the output file to smaller files - xp_cmdshell


ad
4/27/2006 7:20:01 PM
Hi,
I am using bcp and xp_cmdshell to produce output text file in sql server
2000. The size of the output file is so big. Is there any way to break the
file into small files (for example 500 records per each file) ?
Is there any option using the xp_cmdshell?

Thanks,
Aravind
Allan Mitchell
4/28/2006 12:23:31 PM
We could do this very easily in SSIS which is of course little consolation.
In DTS I suppose you could loop over the source and pick up a certain range
each time until no more rows were exported. You would dynamically change the
destination text file name and location on each iteration of the loop Why
would you want to split a file up like this?

It would make importing the data again a bit of a pain.

--


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com


[quoted text, click to view]

AddThis Social Bookmark Button