Question : Error = [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server.

Hi

I am trying to run the following Script on a SQL 2005 Express DB

EXEC master.dbo.xp_cmdshell 'BCP FuturERS.dbo.KASSE OUT \\10.10.11.2\c\SQLDUMP\KASSE.csv -Slocalhost -T -w'

It works fine on a SQL 2005 SQL Standard DB.

I have checked that:
SQL Server Browser is running
Xp_cmdshell is enabled
Remote Connections are enables on both TCP/IP and named pipes

However I this get the following error message

Error = [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connecti

Can any one help??

Many thanks

Brasso

Answer : Error = [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server.

Hi

Ok I've sorted it

Was nothing to do with the SQL setup.  This is the script that worked.  I had to use SQL auth as it did not like Windows and I needed the -s".\sqlexpress"

EXEC master.dbo.xp_cmdshell 'BCP FuturERS.dbo.KASSE OUT \\10.10.11.2\c\SQLDumP\KASSE.csv -S".\sqlexpress" -Ufred -P7410 -w'

Thanks for your help though!!
Brasso
Random Solutions  
 
programming4us programming4us