I am having problem creating/copying txt file in a remote computer using the xp_cmdshell cmd from Query Analyzer:
Got the following errror message when execute:
exec master..xp_cmdshell 'copy D:\result.txt \\<myservername>\<myfoldername>\result.txt'
(where I have permission to write on \\<myservername>\<myfoldername>\result.txt)
Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file
However, when copying it locally, like the following:
exec master..xp_cmdshell 'copy D:\result.txt D:\abc\result.txt'
This is working fine without problem.
Any ideas? Thanks in advace.
Got the following errror message when execute:
exec master..xp_cmdshell 'copy D:\result.txt \\<myservername>\<myfoldername>\result.txt'
(where I have permission to write on \\<myservername>\<myfoldername>\result.txt)
Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file
However, when copying it locally, like the following:
exec master..xp_cmdshell 'copy D:\result.txt D:\abc\result.txt'
This is working fine without problem.
Any ideas? Thanks in advace.