dbTalk Databases Forums  

BCP.EXE fails in 90 where it succeeded in 80

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


Discuss BCP.EXE fails in 90 where it succeeded in 80 in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #91  
Old   
Thomas W. Brown
 
Posts: n/a

Default RE: BCP.EXE fails in 90 where it succeeded in 80 - 06-15-2008 , 02:54 AM






"Erland Sommarskog" wrote:

Quote:
Thomas W. Brown (thomas_w_brown (AT) countrywide (DOT) NOSPAM.com) writes:
Well, it was in the original post (just ignore the "..." as previously
commented upon). How's this...

bcp "##temptablename" out "c:\path\tempfilename.bin" -n -S Server -q

Needless to say, replace "Server" above with the name of an actual SQL
2005 Server.

Again, this command line functions correctly using v8.0 of the utility,
but fails with the previously given errors using v9.0 of the utility --
everything else is the same.

The issue is the -q option. If you remove it, it works without specifying
tempdb.

The purpose of -q is to enable quoted identifiers, which you are not
likely to need for a global temp table. For some reason, BCP takes the
object name as the database name when -q is provided. Since that does
not make much sense, I assume that this is a regression bug. I took
the liberty to file a bug on
https://connect.microsoft.com/SQLSer...dbackID=351111

The behaviour is the same in SQL 2008 RC0. Given that there is a workaround,
and this has gone unnoticed for such a long time, I doubt that they will
fix it to SQL 2008 RTM, even less in SQL 2005.

Good to know, thanks!

-- TB


Reply With Quote
  #92  
Old   
sifobo
 
Posts: n/a

Default Re: BCP.EXE fails in 90 where it succeeded in 80 - 06-20-2008 , 06:22 AM






On Jun 13, 3:19*am, Thomas W. Brown
<thomas_w_br... (AT) countrywide (DOT) NOSPAM.com> wrote:
Quote:
I'm trying to BCP out a temporary table (this is actually occuring in an
application and with the connection still open that "owns" the temporary
table, the application launches BCP.EXE to move the data to the file system).

The command line is of the form:
* *bcp "##temptablename...." out "c:\path\tempfilename.bin" -n -S server -q
-a 65535 -T

In the 8.0 version of the utility there is no problem, the BCP out operation
succeeds. *But in the 9.0 version I get a series of errors:

SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user
'username'.
SQLState = IM006, NativeError = 0
Error = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database
"##temptablename..." requested by the login. The login failed.
SQLState = IM006, NativeError = 0
Error = [Microsoft][SQL Native Client]Packet size change not supported by
server, default used

That last error goes away if I take out the "-a 65535" command line option
(although the documentation shows this still as a valid option).

Any and all help on this issue would be most appreciated!

-- TB
Hi Thomas,

May I dont understand your problem completely. But if need help
download our free application Sifobo fro http://www.sifobo.com.


Reply With Quote
  #93  
Old   
sifobo
 
Posts: n/a

Default Re: BCP.EXE fails in 90 where it succeeded in 80 - 06-20-2008 , 06:22 AM



On Jun 13, 3:19*am, Thomas W. Brown
<thomas_w_br... (AT) countrywide (DOT) NOSPAM.com> wrote:
Quote:
I'm trying to BCP out a temporary table (this is actually occuring in an
application and with the connection still open that "owns" the temporary
table, the application launches BCP.EXE to move the data to the file system).

The command line is of the form:
* *bcp "##temptablename...." out "c:\path\tempfilename.bin" -n -S server -q
-a 65535 -T

In the 8.0 version of the utility there is no problem, the BCP out operation
succeeds. *But in the 9.0 version I get a series of errors:

SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user
'username'.
SQLState = IM006, NativeError = 0
Error = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database
"##temptablename..." requested by the login. The login failed.
SQLState = IM006, NativeError = 0
Error = [Microsoft][SQL Native Client]Packet size change not supported by
server, default used

That last error goes away if I take out the "-a 65535" command line option
(although the documentation shows this still as a valid option).

Any and all help on this issue would be most appreciated!

-- TB
Hi Thomas,

May I dont understand your problem completely. But if need help
download our free application Sifobo fro http://www.sifobo.com.


Reply With Quote
  #94  
Old   
sifobo
 
Posts: n/a

Default Re: BCP.EXE fails in 90 where it succeeded in 80 - 06-20-2008 , 06:22 AM



On Jun 13, 3:19*am, Thomas W. Brown
<thomas_w_br... (AT) countrywide (DOT) NOSPAM.com> wrote:
Quote:
I'm trying to BCP out a temporary table (this is actually occuring in an
application and with the connection still open that "owns" the temporary
table, the application launches BCP.EXE to move the data to the file system).

The command line is of the form:
* *bcp "##temptablename...." out "c:\path\tempfilename.bin" -n -S server -q
-a 65535 -T

In the 8.0 version of the utility there is no problem, the BCP out operation
succeeds. *But in the 9.0 version I get a series of errors:

SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user
'username'.
SQLState = IM006, NativeError = 0
Error = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database
"##temptablename..." requested by the login. The login failed.
SQLState = IM006, NativeError = 0
Error = [Microsoft][SQL Native Client]Packet size change not supported by
server, default used

That last error goes away if I take out the "-a 65535" command line option
(although the documentation shows this still as a valid option).

Any and all help on this issue would be most appreciated!

-- TB
Hi Thomas,

May I dont understand your problem completely. But if need help
download our free application Sifobo fro http://www.sifobo.com.


Reply With Quote
  #95  
Old   
sifobo
 
Posts: n/a

Default Re: BCP.EXE fails in 90 where it succeeded in 80 - 06-20-2008 , 06:22 AM



On Jun 13, 3:19*am, Thomas W. Brown
<thomas_w_br... (AT) countrywide (DOT) NOSPAM.com> wrote:
Quote:
I'm trying to BCP out a temporary table (this is actually occuring in an
application and with the connection still open that "owns" the temporary
table, the application launches BCP.EXE to move the data to the file system).

The command line is of the form:
* *bcp "##temptablename...." out "c:\path\tempfilename.bin" -n -S server -q
-a 65535 -T

In the 8.0 version of the utility there is no problem, the BCP out operation
succeeds. *But in the 9.0 version I get a series of errors:

SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user
'username'.
SQLState = IM006, NativeError = 0
Error = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database
"##temptablename..." requested by the login. The login failed.
SQLState = IM006, NativeError = 0
Error = [Microsoft][SQL Native Client]Packet size change not supported by
server, default used

That last error goes away if I take out the "-a 65535" command line option
(although the documentation shows this still as a valid option).

Any and all help on this issue would be most appreciated!

-- TB
Hi Thomas,

May I dont understand your problem completely. But if need help
download our free application Sifobo fro http://www.sifobo.com.


Reply With Quote
  #96  
Old   
sifobo
 
Posts: n/a

Default Re: BCP.EXE fails in 90 where it succeeded in 80 - 06-20-2008 , 06:22 AM



On Jun 13, 3:19*am, Thomas W. Brown
<thomas_w_br... (AT) countrywide (DOT) NOSPAM.com> wrote:
Quote:
I'm trying to BCP out a temporary table (this is actually occuring in an
application and with the connection still open that "owns" the temporary
table, the application launches BCP.EXE to move the data to the file system).

The command line is of the form:
* *bcp "##temptablename...." out "c:\path\tempfilename.bin" -n -S server -q
-a 65535 -T

In the 8.0 version of the utility there is no problem, the BCP out operation
succeeds. *But in the 9.0 version I get a series of errors:

SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user
'username'.
SQLState = IM006, NativeError = 0
Error = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database
"##temptablename..." requested by the login. The login failed.
SQLState = IM006, NativeError = 0
Error = [Microsoft][SQL Native Client]Packet size change not supported by
server, default used

That last error goes away if I take out the "-a 65535" command line option
(although the documentation shows this still as a valid option).

Any and all help on this issue would be most appreciated!

-- TB
Hi Thomas,

May I dont understand your problem completely. But if need help
download our free application Sifobo fro http://www.sifobo.com.


Reply With Quote
  #97  
Old   
sifobo
 
Posts: n/a

Default Re: BCP.EXE fails in 90 where it succeeded in 80 - 06-20-2008 , 06:22 AM



On Jun 13, 3:19*am, Thomas W. Brown
<thomas_w_br... (AT) countrywide (DOT) NOSPAM.com> wrote:
Quote:
I'm trying to BCP out a temporary table (this is actually occuring in an
application and with the connection still open that "owns" the temporary
table, the application launches BCP.EXE to move the data to the file system).

The command line is of the form:
* *bcp "##temptablename...." out "c:\path\tempfilename.bin" -n -S server -q
-a 65535 -T

In the 8.0 version of the utility there is no problem, the BCP out operation
succeeds. *But in the 9.0 version I get a series of errors:

SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user
'username'.
SQLState = IM006, NativeError = 0
Error = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database
"##temptablename..." requested by the login. The login failed.
SQLState = IM006, NativeError = 0
Error = [Microsoft][SQL Native Client]Packet size change not supported by
server, default used

That last error goes away if I take out the "-a 65535" command line option
(although the documentation shows this still as a valid option).

Any and all help on this issue would be most appreciated!

-- TB
Hi Thomas,

May I dont understand your problem completely. But if need help
download our free application Sifobo fro http://www.sifobo.com.


Reply With Quote
  #98  
Old   
sifobo
 
Posts: n/a

Default Re: BCP.EXE fails in 90 where it succeeded in 80 - 06-20-2008 , 06:22 AM



On Jun 13, 3:19*am, Thomas W. Brown
<thomas_w_br... (AT) countrywide (DOT) NOSPAM.com> wrote:
Quote:
I'm trying to BCP out a temporary table (this is actually occuring in an
application and with the connection still open that "owns" the temporary
table, the application launches BCP.EXE to move the data to the file system).

The command line is of the form:
* *bcp "##temptablename...." out "c:\path\tempfilename.bin" -n -S server -q
-a 65535 -T

In the 8.0 version of the utility there is no problem, the BCP out operation
succeeds. *But in the 9.0 version I get a series of errors:

SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user
'username'.
SQLState = IM006, NativeError = 0
Error = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database
"##temptablename..." requested by the login. The login failed.
SQLState = IM006, NativeError = 0
Error = [Microsoft][SQL Native Client]Packet size change not supported by
server, default used

That last error goes away if I take out the "-a 65535" command line option
(although the documentation shows this still as a valid option).

Any and all help on this issue would be most appreciated!

-- TB
Hi Thomas,

May I dont understand your problem completely. But if need help
download our free application Sifobo fro http://www.sifobo.com.


Reply With Quote
  #99  
Old   
sifobo
 
Posts: n/a

Default Re: BCP.EXE fails in 90 where it succeeded in 80 - 06-20-2008 , 06:22 AM



On Jun 13, 3:19*am, Thomas W. Brown
<thomas_w_br... (AT) countrywide (DOT) NOSPAM.com> wrote:
Quote:
I'm trying to BCP out a temporary table (this is actually occuring in an
application and with the connection still open that "owns" the temporary
table, the application launches BCP.EXE to move the data to the file system).

The command line is of the form:
* *bcp "##temptablename...." out "c:\path\tempfilename.bin" -n -S server -q
-a 65535 -T

In the 8.0 version of the utility there is no problem, the BCP out operation
succeeds. *But in the 9.0 version I get a series of errors:

SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user
'username'.
SQLState = IM006, NativeError = 0
Error = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database
"##temptablename..." requested by the login. The login failed.
SQLState = IM006, NativeError = 0
Error = [Microsoft][SQL Native Client]Packet size change not supported by
server, default used

That last error goes away if I take out the "-a 65535" command line option
(although the documentation shows this still as a valid option).

Any and all help on this issue would be most appreciated!

-- TB
Hi Thomas,

May I dont understand your problem completely. But if need help
download our free application Sifobo fro http://www.sifobo.com.


Reply With Quote
  #100  
Old   
sifobo
 
Posts: n/a

Default Re: BCP.EXE fails in 90 where it succeeded in 80 - 06-20-2008 , 06:22 AM



On Jun 13, 3:19*am, Thomas W. Brown
<thomas_w_br... (AT) countrywide (DOT) NOSPAM.com> wrote:
Quote:
I'm trying to BCP out a temporary table (this is actually occuring in an
application and with the connection still open that "owns" the temporary
table, the application launches BCP.EXE to move the data to the file system).

The command line is of the form:
* *bcp "##temptablename...." out "c:\path\tempfilename.bin" -n -S server -q
-a 65535 -T

In the 8.0 version of the utility there is no problem, the BCP out operation
succeeds. *But in the 9.0 version I get a series of errors:

SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user
'username'.
SQLState = IM006, NativeError = 0
Error = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database
"##temptablename..." requested by the login. The login failed.
SQLState = IM006, NativeError = 0
Error = [Microsoft][SQL Native Client]Packet size change not supported by
server, default used

That last error goes away if I take out the "-a 65535" command line option
(although the documentation shows this still as a valid option).

Any and all help on this issue would be most appreciated!

-- TB
Hi Thomas,

May I dont understand your problem completely. But if need help
download our free application Sifobo fro http://www.sifobo.com.


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.