I have two servers lets call them A and B. Server A is in one domain and Server B is in another domain. I've created a local login on both servers and given it the same username and password. I've given this account access to share(s) on each server so it can read and write to the specified folders.
So I logon to Server A using the above username and run the following bcp command:
bcp "select * from dbName.dbo.tableName with (nolock) where date > 'Jun 30 2008 11:55PM'" queryout "\\<ip address>\Share\tblName_09-03-08.txt" -c -S<ip address> -U"userName" -P"password". Where the "ip address" is the IP of Server B.
This is executed using the stored procedure master.dbo.xp_cmdshell and fails with the error message: "Unable to open bcp host data-file." However, when I open a command window and execute the same bcp commmand it works fine.
I guessing this is a permissions issue but I'm at a loss of how to fix it. Any ideas?
Thanks
So I logon to Server A using the above username and run the following bcp command:
bcp "select * from dbName.dbo.tableName with (nolock) where date > 'Jun 30 2008 11:55PM'" queryout "\\<ip address>\Share\tblName_09-03-08.txt" -c -S<ip address> -U"userName" -P"password". Where the "ip address" is the IP of Server B.
This is executed using the stored procedure master.dbo.xp_cmdshell and fails with the error message: "Unable to open bcp host data-file." However, when I open a command window and execute the same bcp commmand it works fine.
I guessing this is a permissions issue but I'm at a loss of how to fix it. Any ideas?
Thanks