September 6, 2005 at 3:31 am
Hi All,
Looking for some advice on how to achieve this. I download text files from our Unix Oracle box on a nightly basis to our SQL Server box. I process these files on the SQL box and move them off then to a processed directory, however I then need to log onto the Unix box manually the next morning and move last nights successfully processed files to the Unix processed directory otherwise they will be downloaded again.
I have tried using xp_cmdshell to ftp to site and move the files but to no avail.
All of this is achieved via a job with multiple steps, DTS to download files, SPs to process files and move them.
Does anyone have an idea of how to connect to the Unix box and move the processed files from within the SQL Server environment.
Any advice or comments would be greatly appreciated.
Thanks
Darren
September 7, 2005 at 7:33 am
Darren,
I spent a lot of time doing what you have asked at my last job, and found that there are only really a few ways, and they depend on the flavor of Unix as to which tends to be most effective. What version of Unix are you using, and are both boxes hooked into the same network?
Just as a suggestion, you might want to see if the Unix folks would be willing to install and or use Samba, which will allow Windows Authentication (or a version of it at least) on the Unix box. This would through the ball into their court (not sure if this is good or bad), and you would be able to connect to the Unix drive just as you would any other network drive (given that the permissions into Samba are set that way). Then you could do all the above through either VB Script (inside the DTS), or sp's as you are doing now...
Barring that - there are a few other tricks, but like I said - they are slightly different between the flavors and versions of UNIX, and those little tweaks make all the difference between being somewhat reliable, and very reliable.
Tim Blum
Senior Manager, Outsourced Data Services
Learn2Live at Ureach.com
September 7, 2005 at 12:20 pm
How about ...
After your process is complete upload a 'return' file back to Unix.
(maybe containing the original pathname and the processd pathname)
On Unix (whatever 'flavor') have a cron job to look for the 'return' file
and based onn the contents of the 'return' file move things for you.
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
September 9, 2005 at 8:39 am
Many thanks for your replies. Samba sounds very interesting, and may well work. I am trying to have the Network lads review samba with a possibility of having it installed on a development box.
The version of Unix we are presently running is 5.9
Darren
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply