Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
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,Tim
eStamp,
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 Serv
er 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 do
es 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!

Report this thread to moderator Post Follow-up to this message
Old Post
June
03-31-06 01:27 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server Tools archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 07:36 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006