|
Home > Archive > MS SQL Server Tools > March 2006 > Urgent! BCP command failed on SQL2000, but okay on SQL7
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Urgent! BCP command failed on SQL2000, but okay on SQL7
|
|
|
| Hi,
Environment: Win2000, SQL2000
Both the command file and SQL2000 are installed on the same machine.
I have a command file with the following SQL statement:
bcp "SELECT * FROM [%dbname%].[dbo].[%1] WHERE DATEDIFF(hour,TimeSt
amp,
DATEADD(n, - DATEPART(n,getdate()
), getdate())) <=24" queryout %CurDate%.tmp
-U -P -f %formatfile%
I can run this file on a machine with SQL7 installed, but have error when I
run it on a machine with SQL2000. Here is the error:
SQLState = 08001, Native Error=17
Error=[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not
exist or access denied.
SQLState = 01000, Native Error=2
Warning=[Microsoft][ODBC SQL Server Driver][Shared
Memory]ConnectionOpe
n(Connect()).
I also tried to add parameter with -S server_name\instance
_name.
I got similar error messages:
SQLState = 08001, Native Error=17
Error=[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
exist or access denied.
SQLState = 01000, Native Error=2
Warning=[Microsoft][ODBC SQL Server
Driver]& #91;DBNETLIB]Connect
ionOpen(Connect()).
Does anyone know where is the problem? How can I fix it?
Thanks for the support!
|
|
|
|
|