Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How do I run a batch file stored on one server from another? Expand / Collapse
Author
Message
Posted Thursday, November 25, 2010 3:32 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, May 9, 2013 7:44 AM
Points: 19, Visits: 111
I have BIDS running on my local machine, but am trying to create a package that will be posted on the Integration Services of my production server. In my package, I wanted to run a batch file that is stored on my Production server, but I can't figure out how to get it done. The data flows create 2 files and store them on the production server. The rename.bat file is supposed to rename the two files to include a timestamp and then the ForEach container/FTP Task combo is to take a copy of one of these files and upload it to another server in a different location.

I can get this all done when I have the rename.bat locally on my machine, but now that I'm trying to modify the package to work on the production server I can't get the rename.bat to work! I have put a copy of the rename.bat in the identical folder on the production server, but again, I'm running the BIDS locally, so the Execute Process Task runs the remote rename.bat as though it was on my local machine, and doesn't rename the files that are created on my production server.

How can I get this done? Thanks for all the help!
Post #1026584
Posted Thursday, November 25, 2010 4:23 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Sunday, September 7, 2014 11:27 PM
Points: 7,164, Visits: 13,257
Why don't you simply use the RenameFile option of the FileSystem task?
I don't see any reason to call a .bat file to do it...




Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1026589
Posted Thursday, November 25, 2010 4:28 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, May 9, 2013 7:44 AM
Points: 19, Visits: 111
Sounds interesting... but can I use that to rename with a timestamp? How would I do that?

That would definitely ease my troubles....
Post #1026591
Posted Thursday, November 25, 2010 4:43 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Sunday, September 7, 2014 11:27 PM
Points: 7,164, Visits: 13,257
bajanpoet (11/25/2010)
Sounds interesting... but can I use that to rename with a timestamp? How would I do that?

That would definitely ease my troubles....


I'm sure this link will help you to resolve the issue.




Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1026596
Posted Friday, November 26, 2010 7:17 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, May 9, 2013 7:44 AM
Points: 19, Visits: 111
Thanks. You got me looking in another direction, and I've decided to use expressions to build the filenames with the timestamp at the beginning and so eliminate the rename step all together :) I'm still fairly new to SSIS, and didn't know how much ways there are to achieve the same objective.

Thanks again!
Post #1026773
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse