2012年3月6日星期二

BCP Error

CP Activation Error
-------

The following command runs on several PCs without any problems,
but on one of the computers + user the bcp resulting with error

Env:
Microsoft SQL Server 2000 - 8.00.194 (Intel X86)
SQL Server: win 2000 server
PCs: win 2000 professional

Command:
"bcp" "select a, b from db_name.dbo.tbl_name WHERE (c = 0) ORDER BY a" "queryout" "\\pc-name\dir1\dir2\file-name.p" "-Ssrv" "-T" "-c"

Result:
Starting copy...
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Code page 862 is not supported by SQL Server
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unable to resolve column level collations

BCP copy out failed

Please, help me to solve this problem

HelenaInteresting...you mean different servers, right...

Collation not supported? Hmmmm...

Is this SQL Server or sybase?|||Is there a difference between the computer with the problem and other machines where it's working fine in Windows Regional Settings? mojza|||Hi, Its runs ok on other PCs & for other users. The connection to MSSql 200 it with windows id.
Thanks
H|||Hi,
There is only MsSql server 2000, no Sybase involved.
I Don't know the setting of the computers - whot chell i check ?
Thanks
Helena|||Hi,
Thanks for the hint.
I changed the Windows Regional Settings on the problemathic PC and now BCP works ok.

Thanks again
Helena

BCP Error

Hi I need to create a trigger on a table which bcps the table out to a flat fine. I am getting the error "Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file"
Although if I run the bcp command separately I do not get this error and the command runs successfully. I am using the Exec Master..xp_cmdshell command.

Please advice.

Thanks,
PankajError = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file"

this error occurs when you give the output path as a directory which does not exist. i.e. you give the path as C:\enigma\enigma.txt even though the directory enigma does not exist on your PC. Create the directory and reissue the command. The BCP command only creates a data file ... not the directory

bcp error

when I use bcp with "-c" option I get the following error:

c:\bcp test_db.dbo.table_1 out c:\test_db_new_table.dat -e c:\test_db_new_table.err -c -U sa -P abc

the result is:
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Code page 862 is not supported by SQL Server
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unable to resolve column level collations

but when I execute the same script with "-f" option I do not have any problem
c:\bcp test_db.dbo.table_1 out c:\test_db_new_table.dat -e c:\test_db_new_table.err -U sa -P abc -f c:\bcp.fmt

how can I use the "-c" option when I want to execute BCP from the command line in batch mode
or is it just a problem in the settings of my SQL Server

10x in advanceOriginally posted by ranmel
when I use bcp with "-c" option I get the following error:

c:\bcp test_db.dbo.table_1 out c:\test_db_new_table.dat -e c:\test_db_new_table.err -c -U sa -P abc

the result is:
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Code page 862 is not supported by SQL Server
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unable to resolve column level collations

but when I execute the same script with "-f" option I do not have any problem
c:\bcp test_db.dbo.table_1 out c:\test_db_new_table.dat -e c:\test_db_new_table.err -U sa -P abc -f c:\bcp.fmt

how can I use the "-c" option when I want to execute BCP from the command line in batch mode
or is it just a problem in the settings of my SQL Server

10x in advance

using:

bcp master.dbo.syscolumns out c:\t1.dat -ec:\t1.err -c -Utest -P -SIFOODSV

warning: -C difference form -c

BCP error

Hi,
Env: win2k, mssql 8.00.194, Standard Edition

Please help me to make the following bcp to work.
I want to save RS from store procedure to ascii file, using BCP. The sp creates temporary tables and the final select in sp is exec sp_executesql @.comm.
The following example demonstrates the problem:

declare @.bcpCommand nvarchar(100)
set @.bcpCommand = 'bcp "exec sp_helpdb" queryout "\\kkkk\bcp_dbs.log" -c'
exec master..xp_cmdshell @.bcpCommand

I'm getting the following error:
Password:
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]BCP host-files must contain at least one column
NULL

Thanksdeclare @.bcpCommand nvarchar(100)
set @.bcpCommand = 'bcp "set fmtonly off exec sp_helpdb" queryout "c:\test.txt" -c'
exec master..xp_cmdshell @.bcpCommand|||Damn...who was that (un)masked man??

Very nice...but it's as clear as mud

BOL

Returns only meta data to the client.

Syntax
SET FMTONLY { ON | OFF }

Remarks
No rows are processed or sent to the client as a result of the request when SET FMTONLY is turned ON.

The setting of SET FMTONLY is set at execute or run time and not at parse time.

Permissions
SET FMTONLY permissions default to all users.

Examples
This example changes the SET FMTONLY setting to ON and executes a SELECT statement. The setting causes the statement to return the column information only; no rows of data are returned.

SET FMTONLY ON
GO
USE pubs
GO
SELECT *
FROM pubs.dbo.authors
GO|||Thanks for the replay - it works .

BCP Error

I am trying to bcp data out of one table into another copy of the same table
on another server. When I do I get the following error. The cmd that I am
using is:
BCP PricingTables.dbo.OtherAddOn in J:\bcp\OtherAddOn.dat -n -T
It works on 33 of the 35 tables. Both of the tables that fail have a column
called [function] that is char 255. I have tried the command with the '-n'
and without it. Any suggestions?
SQLState = 37000, NativeError = 156 Error = [Microsoft][ODBC SQL Server
Driver][SQL Server]Incorrect syntax near the keyword 'Function'.
You might try the '-q' parameter so that quoted identifiers are used. Also,
save yourself some grief by avoiding reserved words as column names.
Hope this helps.
Dan Guzman
SQL Server MVP
"Rick" <Rick@.discussions.microsoft.com> wrote in message
news:0F740E25-C090-418F-991E-88BAEBFA31EE@.microsoft.com...
>I am trying to bcp data out of one table into another copy of the same
>table
> on another server. When I do I get the following error. The cmd that I am
> using is:
> BCP PricingTables.dbo.OtherAddOn in J:\bcp\OtherAddOn.dat -n -T
> It works on 33 of the 35 tables. Both of the tables that fail have a
> column
> called [function] that is char 255. I have tried the command with the '-n'
> and without it. Any suggestions?
> SQLState = 37000, NativeError = 156 Error = [Microsoft][ODBC SQL Server
> Driver][SQL Server]Incorrect syntax near the keyword 'Function'.

BCP Error

Hi,
I'm trying to bcp data in/out of a sql server instance database and I'm
getting an error. The statement and error are below. The same error happens
at command line and query analyzer. I've been searching online but the
closest thing I can come up with is that it's a serv pack issue (?). Any
thoughts would be great. It works on my local machine. I have sysadmin
rights on the sql server.
Statement:
EXEC master..xp_cmdshell 'bcp CRMDB\SQLSERVER.Healthscience.dbo.events out
c:\temp\events030905.txt -n -T'
SQLState = 08001, NativeError = 14
Error = [Microsoft][ODBC SQL Server Driver][Shared Memory]Invalid
connection.
SQLState = 01000, NativeError = 14
Warning = [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen
(Invalid Instance()).
NULL
Try,
bcp Healthscience.dbo.events out "c:\temp\events030905.txt" -n -S
CRMDB\SQLSERVER -T
AMB
"dfate" wrote:

> Hi,
> I'm trying to bcp data in/out of a sql server instance database and I'm
> getting an error. The statement and error are below. The same error happens
> at command line and query analyzer. I've been searching online but the
> closest thing I can come up with is that it's a serv pack issue (?). Any
> thoughts would be great. It works on my local machine. I have sysadmin
> rights on the sql server.
> Statement:
> EXEC master..xp_cmdshell 'bcp CRMDB\SQLSERVER.Healthscience.dbo.events out
> c:\temp\events030905.txt -n -T'
> SQLState = 08001, NativeError = 14
> Error = [Microsoft][ODBC SQL Server Driver][Shared Memory]Invalid
> connection.
> SQLState = 01000, NativeError = 14
> Warning = [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen
> (Invalid Instance()).
> NULL
>
>

BCP error

I am trying to run a bcp import and I am getting the following error:
Unable to Load BCP resource dll. BCP cannot continue.
Does anyone have any idea what might cause this error?
What happens when you run this from the command line?
C:\>bcp -v
You should get something like:
BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (c) 1991-1998, Microsoft Corp. All Rights Reserved.
Version: 8.00.382
If you do get that, show us what command you are issuing so we can
troubleshoot further. If you still get "Unable to Load BCP resource dll.
BCP cannot continue." then your SQL Server installation is damaged.
We can then look into this.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
msdn.microsoft.com wrote:
> I am trying to run a bcp import and I am getting the following error:
> Unable to Load BCP resource dll. BCP cannot continue.
> Does anyone have any idea what might cause this error?
>
|||I have a different version, do I need a SP applied?
My version is 8.00.194.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||Fraser,
Looks like it, install SP3a.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Fraser Michael wrote:
> I have a different version, do I need a SP applied?
> My version is 8.00.194.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!