dbTalk Databases Forums  

How to break the output file to smaller files - xp_cmdshell

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


Discuss How to break the output file to smaller files - xp_cmdshell in the microsoft.public.sqlserver.dts forum.



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

Default How to break the output file to smaller files - xp_cmdshell - 04-27-2006 , 09:20 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


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

Default Re: How to break the output file to smaller files - xp_cmdshell - 04-28-2006 , 11:23 AM






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


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

Quote:
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




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.