HI - We are using BCP utility to write the query to a text file. When we write to local file it is writing without any issues. However, issue is coming when we write the data to UNC path. Can some one tell me how to access the UNC path to write the data to text file using bcp utility.
select * into ##menu_item_test from menu_item
SET @Stmt = N' BCP "select * from ##menu_item_test " QUERYOUT \\184.108.40.206\Drops -c -T'
EXEC XP_CMDShell @Stmt
I am getting the below error:
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP host data-file