dbTalk Databases Forums  

BCP issue

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss BCP issue in the microsoft.public.sqlserver.tools forum.



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

Default BCP issue - 03-06-2010 , 08:23 PM






Hi there,

I'm using SQL Server 2008 and I wrote

Exec Master..xp_cmdshell 'bcp "Select * from Coronado.dbo.immunization"
queryout "C:\mobiledoc\immunization.txt" -c -b1000 -T -Slocalhost'

and I run it everything was fine

Now when I'm run it without the -b option it still run at the 1000 rows
Exec Master..xp_cmdshell 'bcp "Select * from Coronado.dbo.immunization"
queryout "C:\mobiledoc\immunization.txt" -c -T -Slocalhost'

no matter wich database or table i want to export the bcp still export it at
1000 and I want all rows at once

how do I reset the bcp utility to reset the -b option

Thanks,
Oded Dror

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: BCP issue - 03-07-2010 , 07:26 AM






odeddror (odeddror (AT) cox (DOT) net) writes:
Quote:
I'm using SQL Server 2008 and I wrote

Exec Master..xp_cmdshell 'bcp "Select * from Coronado.dbo.immunization"
queryout "C:\mobiledoc\immunization.txt" -c -b1000 -T -Slocalhost'

and I run it everything was fine

Now when I'm run it without the -b option it still run at the 1000 rows
Exec Master..xp_cmdshell 'bcp "Select * from Coronado.dbo.immunization"
queryout "C:\mobiledoc\immunization.txt" -c -T -Slocalhost'

no matter wich database or table i want to export the bcp still export
it at 1000 and I want all rows at once

how do I reset the bcp utility to reset the -b option
When you export data, BCP always prints a message for each 1000 rows
it copies to the output file, no matter the setting of -b.

-b is only useful on input, where it controls how often BCP commits.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

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.