chumphrey 12211 (8/24/2011)
Thanks for the reply. I guess I was wondering if there was a way to "alias" the named instance to avoid making programming changes to the migrated code? Guess that would defeat the purpose of naming the instance.
You can certainly create an alias for the local server name however I am not sure aliases ever come into play when -S is not supplied. bcp uses the Native Client and it appears to use Named Pipes by default when -S is not supplied. From your error message:
Error = [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server .
SQLState = 08001, NativeError = 2
This is likely the Named Pipe it is trying to use, as this is how you would address a default instance:
I have no default instance on my machine so I just tried creating an alias for the above Named Pipe name but could not get bcp to redirect to my named instance using either Protocol TCP/IP or Named Pipes. If you figure it out please post back. Good luck!
__________________________________________________________________________________________________There are no special teachers of virtue, because virtue is taught by the whole community. --Plato