I get this error while I try to execute BCP
SQLState = S1000, NativeError = 0
Error = [Microsoft] [Native SQL Server 11.0 Client] 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 have all rights to Network Drive.
This code is great for assigning my local drive, for example C:\.
I also tried to enter parameters -Uand -P. But no luck
Can anyone help me with this issue?
source
share