I am creating a job that, if the file exists, copy it from the Linux server where it resides to a Windows server on the network.
I have been unable to determine the exact syntax of the xp_cmdshell to get into the Linux server and grab the file.
Here are a couple things I've tried:
I don't know the syntax for adding a username and password to the xp_cmdshell command. Oh, and the command I would be using with xp_cmdshell is "copy", right?
Any help is MUCH appreciated!
-MK
I have been unable to determine the exact syntax of the xp_cmdshell to get into the Linux server and grab the file.
Here are a couple things I've tried:
Code:
EXEC master..xp_cmdshell "'copy \\LinuxServName\dir1\dir2\FileName /U 'username' /P 'password' \\LocalSrvName\LocalFileName'"
EXEC master..xp_cmdshell 'copy "'\\LinuxServName\dir1\dir2\file' /U 'username' /P 'password' \\LocalSrvName\LocalFileName'
I don't know the syntax for adding a username and password to the xp_cmdshell command. Oh, and the command I would be using with xp_cmdshell is "copy", right?
Any help is MUCH appreciated!
-MK