Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Need to call a batch file from a remote server Expand / Collapse
Posted Wednesday, October 10, 2012 1:08 PM

SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, September 30, 2014 7:10 AM
Points: 251, Visits: 225
Hey guys,

I'm creating a SSIS package and one of the first steps is to stop services on a remote server so I created a batch file on the remote server (NET STOP blah blah...) but now I need a way of calling this file. Any help?
Post #1371087
Posted Wednesday, October 10, 2012 1:37 PM



Group: General Forum Members
Last Login: Today @ 6:13 PM
Points: 14,483, Visits: 38,180
it's been a while since i sued it but PSEXEC from the PSTools suite is designed for executing things on a remote system...there might be some permissions issues if you are trying to use it via tSQL, but that's one possibility.:


help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1371096
Posted Thursday, October 11, 2012 1:08 AM



Group: General Forum Members
Last Login: Today @ 7:59 PM
Points: 7,753, Visits: 18,659
Yes, this is harder than you might think. PSEXEC is what I have used in the past.

Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

Just when you think your code is idiot-proof, the world invents a better idiot.
Post #1371235
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse