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

Sql server job scheduler question Expand / Collapse
Author
Message
Posted Wednesday, April 23, 2008 2:40 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, January 15, 2009 3:19 PM
Points: 4, Visits: 16
Folks,

I know that we can kick off batch files and exes through the sql server job scheduler using EXEC xp_cmdshell ...
Is there a way to accomplish the following through Sql server job scheduler

kickoff an exe on a remote machine meaning execute the exe on another machine (run it from the remote machine not run from the current machine)

Thanks
smx
Post #489589
Posted Thursday, April 24, 2008 8:38 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 10, 2010 5:07 AM
Points: 2,732, Visits: 23,078
You need a utility like RCMD that will allow remote command line execution.

Post #489987
Posted Thursday, April 24, 2008 9:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, January 15, 2009 3:19 PM
Points: 4, Visits: 16
is rcmd available on a win 2003 machine

can we use rcmd from sql server job scheduler ?

any thoughts would be appreciated
thanks
Post #490039
Posted Thursday, April 24, 2008 9:53 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 10, 2010 5:07 AM
Points: 2,732, Visits: 23,078
RCMD is a command line utility that remote executes a command on another machine. There are dozens of tools like it available. Look at what is in the server 2003 resource kit - I think it comes with something.

You can run anything that can be run from the command line using the SQL Agent - assuming you have permissions set up appropriately.
Post #490070
Posted Thursday, April 24, 2008 10:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, January 15, 2009 3:19 PM
Points: 4, Visits: 16
mike, thanks for your reply..in win 2003 i did check the windows recource kits\tools

I could not find an equivalent for the rcmd

i found elsewhere that there is a remote.exe but that is bit different.

do you have any suggestions ?

thanks
Post #490085
Posted Thursday, April 24, 2008 10:36 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 10, 2010 5:07 AM
Points: 2,732, Visits: 23,078
It looks like remote.exe is the correct utility from MS.

There are third party utilities available also - search in your favorite search engine.
Post #490105
Posted Thursday, April 24, 2008 2:14 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, January 15, 2009 3:19 PM
Points: 4, Visits: 16
here is what I did

used PsExec
I setup a sql server job with the following

EXEC xp_cmdshell 'c:\psexec.exe -s \\machineName-u "uname" -p "pwd" -accepteula C:\RemoteProgram.exe'
Post #490306
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse