Bcp error
-
Hi All We have just upgaded our old sql server from 2000 to a 2005 cluster server I am now having problems running some bcp commands The command i am running is exec master..xp_cmdshell 'bcp "select fileoutput from [new_db]..[Invoice_Table] order by roworder" queryout c:\invoice\template\customer.html -c -o c:\invoice\template\bcpOutput.txt' the error i am getting is User name not provided, either use -U to provide the user name or use -T for Trusted Connection i have tried to add in -U and -P but then get the below SQLState = 08001, NativeError = 2 Error = [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2]. SQLState = HYT00, NativeError = 0 Error = [Microsoft][SQL Native Client]Login timeout expired SQLState = 08001, NativeError = 2 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 connections. i have also tried adding in exec master..xp_cmdshell 'bcp "select fileoutput from [new_db]..[Invoice_Table] order by roworder" queryout c:\invoice\template\customer.html -c -o -STCSQL1\sqlcluster c:\invoice\template\bcpOutput.txt' but i get the same error saying it could not open a connection to SQL server Can anyone help at all ?
-
Hi All We have just upgaded our old sql server from 2000 to a 2005 cluster server I am now having problems running some bcp commands The command i am running is exec master..xp_cmdshell 'bcp "select fileoutput from [new_db]..[Invoice_Table] order by roworder" queryout c:\invoice\template\customer.html -c -o c:\invoice\template\bcpOutput.txt' the error i am getting is User name not provided, either use -U to provide the user name or use -T for Trusted Connection i have tried to add in -U and -P but then get the below SQLState = 08001, NativeError = 2 Error = [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2]. SQLState = HYT00, NativeError = 0 Error = [Microsoft][SQL Native Client]Login timeout expired SQLState = 08001, NativeError = 2 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 connections. i have also tried adding in exec master..xp_cmdshell 'bcp "select fileoutput from [new_db]..[Invoice_Table] order by roworder" queryout c:\invoice\template\customer.html -c -o -STCSQL1\sqlcluster c:\invoice\template\bcpOutput.txt' but i get the same error saying it could not open a connection to SQL server Can anyone help at all ?
Didn't figure out if you have used all -P, -U and -S at the same time. If not, provide username, password and instancename for command arguments. Also check that the server is listening named pipes since it seems to be configured as the protocol for the client component. Hope this helps, MIka