I am getting this Error While I try to do BCP
SQLState = S1000, NativeError = 0
Error = [Microsoft][SQL Server Native Client 11.0]Unable to open BCP host data-file
This is my code:
DECLARE @dump_data1 varchar(500)
SET @dump_data1 = 'bcp "select * from IDcountries.dbo.IDs$" queryout "\\NetworkLocation\watchdog.xls" -c -S STRIVEDI\SQLEXPRESS -T'
EXEC xp_cmdshell @dump_data1
I do have all the rights on Network Drive.
This code perfectly works fine for destination of my local drive like C:\
.
I also tried entering -U
and -P
options as well. But, no luck
Can someone please help me on this issue?