Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BCP [SQL Server Native Client 11.0]Unable to open BCP host data-file

Status
Not open for further replies.
Oct 17, 2006
227
Hi trying to send a file to a folder and having a few issues !

SQL2012

Error = [Microsoft][SQL Server Native Client 11.0]Unable to open BCP host data-file

Exec master..xp_cmdshell 'bcp "select name from sysobjects" queryout "\\SERVERNAME\FileDrop\out.txt" -c -T -S'

I have also tried the path \\SERVERNAME\C$\FileDrop\out.txt


EXEC xp_cmdshell 'ECHO %USERDOMAIN%\%USERNAME%'

NT Service\MSSQLSERVER


Any help would be great
 
As a fix I Created a SQLAdmin account as admin and assigned the SQL service to it and hey presto it now works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top