![]() | |
#91
| |||
| |||
|
|
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. |
#92
| |||
| |||
|
|
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 |
#93
| |||
| |||
|
|
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 |
#94
| |||
| |||
|
|
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 |
#95
| |||
| |||
|
|
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 |
#96
| |||
| |||
|
|
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 |
#97
| |||
| |||
|
|
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 |
#98
| |||
| |||
|
|
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 |
#99
| |||
| |||
|
|
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 |
#100
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |