SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How do I run a batch file stored on one server from another?


How do I run a batch file stored on one server from another?

Author
Message
bajanpoet
bajanpoet
SSC-Enthusiastic
SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)

Group: General Forum Members
Points: 105 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! :-)
LutzM
LutzM
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23207 Visits: 13559
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
bajanpoet
bajanpoet
SSC-Enthusiastic
SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)

Group: General Forum Members
Points: 105 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....
LutzM
LutzM
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23207 Visits: 13559
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
bajanpoet
bajanpoet
SSC-Enthusiastic
SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)SSC-Enthusiastic (105 reputation)

Group: General Forum Members
Points: 105 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 Smile I'm still fairly new to SSIS, and didn't know how much ways there are to achieve the same objective.

Thanks again!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search