SQLState = S1000, NativeError = 0

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?

+4
source share
2 answers

. . "" " " , SQL Server SQL Server. MSSQLSERVER. .

+3

, , BCP, , , , SQL Server !, , :

exec xp_cmdshell 'net use p:\ \\Server\Folder\Folder\Folder\ /Domain\Login /Password'

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6eca2d62-eb86-4f23-9b86-6f917017f50c/bcp-utility-via-xpcmdshell-and-network-drive?forum=sqlsecurity

0

All Articles