Home > Archive > MS SQL Server Tools > March 2006 > Re: 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 Re: Urgent! BCP command failed on SQL2000, but okay on SQL7
Erland Sommarskog

2006-03-31, 3:30 am

June (June@discussions.microsoft.com) writes:
> 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%
>
> SQLState = 08001, Native Error=17
> Error=[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does
> not exist or access denied.
>...
>
> I also tried to add parameter with -S server_name\instance
_name.
> I got similar error messages:


Can you connect to this SQL Server by other means on this machine? Is this
a named instance of the default instance?

Normally when you get this error and the server you are trying to connect
to is one the same box, it indicates that that server is not running. It's
not much a problem withg BCP per se.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com