I'm trying to export data to txt file having arabic filename using xp_cmdshell
It is working fine. the problem is when I tried to name the file in arabic i got this error message
SQLState = S1000, NativeError = 0 Error = [Microsoft][SQL Server Native Client 10.0]Unable to open BCP host data-file
Find below the query:
EXEC xp_cmdshell N'bcp "SELECT FirstName,LastName,Salary FROM MyDB.dbo.Employee" queryout "\\myserver\FDS\سسيسي.txt" -SFDSLAP\SQLR2 -UmyUser -PmyPass -T -w -t "'
This error happens with me when the file is opened by another program and sometimes when the path specified will create a new directory.