>When I run exec master..xp_cmdshell 'bcp ##temp_text out \\servername\sharename\filename.txt -c' I receive the following error
>
>SQLState = 08001, NativeError = 17
>Error = [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.
>SQLState = 01000, NativeError = 2
>Warning = [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).
>
>I successfully run the command on another server without any problems or errors. I verified the share's security. I can successfully run exec master..xp_cmdshell 'bcp dir c:\ > \\servername\sharename\filename.txt'
Does SQL Server consider it as a trusted connection? If you're using a Windows account, then the two servers need to be in the same domain. Otherwise, you're better off using a username (-U) and password (-P).
Christopher Reed
"The oxen are slow, but the earth is patient."