bcp

Whats wrong with this bcp utility?

I am trying to export data into into a text file using bcp utility? I could n't figure out what i am doing wrong here:- Declare @Cmd nvarchar(1000) Declare @Query nvarchar(1000) Declare @Path nvarchar(500) Declare @ServerName nvarchar(500) Declare @UserName nvarchar(50) Declare @Password nvarchar(50) Declare @Delimiter char(1) SET @Pat...

Not able to import large flat file into SQL Server 2008 table

I have an 18GB flat file (40,000,000 records), with fixed column widths (no field terminators), which I would like to read into a SQL Server 2008 R2 table. In addition to the text file with the data, I was given an Excel document with the field names and lengths. There are 270 fields with 465 total characters per record (per row). Using ...

When SQL Server bcps into an empty table with an index what does it do internally?

If I have an empty table with an index and I do a bcp, does SQL Server (internally) drop/disable the index, load the data and then re-apply/enable/build the index? ...

BCP Function sequence error when running proc with parameters

I have been trying to create a stored procedure that uses dynamic SQL to assemble a bcp command to export data from a parameterized stored procedure to a csv file. Was originally getting the host data file access issue that I think was filesystem permissions. Now I consistantly get the fillowing error when I run the proc: SQLState = S...

Does sybase 15 support the bcp api in java?

A long time ago I figured out that bcp is just a little C program that calls the special bit of the sybase client api to do mass data moving into the database. It lies cheats and steals and skips check constraints all in the name of speed. Great, I'm all for it. In sybase 12 I noticed that the api was exposed in the C client library, but...

Facing error with BCP utility?

I am getting the following error: SQLState = S1000, NativeError = 0 Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file NULL while using this bcp utility bcp "select * from database1.dbo.table1" queryout "c:\result.txt" -c -S10.10.10.100\dev -Usa -P123456 -t! Please check. ...

SQL Server: BCP vs SQLCMD - what is more efficient?

I'm writing a program in c# to export SQL Server data from one database and importing it in another. Since these two servers are not connected I need to choose a method such as bcp. What are the differences between these two? Is one more efficient than the other? And in what scenarios? What are the known limitations/compatibility issu...

Running BCP.exe

Hello, I have a system installation consisting of two servers, an application server and a database server. I need to bulk upload csv files generated at the application CSV files from the application t the database server, so I am simply the bcp.exe application. The database server is SQL server 2000 enterprise edition, the applicati...