Groups | Blog | Home
all groups > sql server new users > september 2005 >

sql server new users : remote.exe


Roman JR.
9/26/2005 6:00:09 AM
Hi,

Can anyone give me a sample syntax if I want to execute a batch file on a
remote server using SQL SERVER job (using CmdExec) and remote.exe

My server name is: KOZEL
My network share and batch file to execute: \\kozel\cognos\call_option4.bat

How would my remote.exe syntax look?

Thank you,

Regards

Roman JR.

Roman JR.
9/26/2005 7:22:03 AM
Hi Steen,

I have alredy tried that approach, but the .bat file is not executed using
the xp_cmdshell TSQL command.

I am looking for a remote.exe syntax.

Thanks

Roman

[quoted text, click to view]
Roman JR.
9/26/2005 10:39:04 AM
Hi,

Does anyone know a command to execute batch file remotely. The command has
to launch the processs remotely.

Thank You,

Roman

[quoted text, click to view]
Steen Persson (DK)
9/26/2005 3:51:43 PM
[quoted text, click to view]
Hi

You could use the command xp_cmdshell. You can look up the syntax in
Books On Line, but the syntax would be something like -

EXEC xp_cmdshell '\\Kozel\Cognos\Call_option4.bat'

Regards
Sue Hoegemeier
9/26/2005 5:37:47 PM
Did you try using something like openquery so that it is
actually passed to the other server to execute?
Or execute the batch file in a job on the remote server and
start the job on the remote server with openquery or using a
linked server.

-Sue

On Mon, 26 Sep 2005 07:22:03 -0700, Roman JR.
[quoted text, click to view]
Roman JR.
9/27/2005 11:09:02 AM
Hi Sue,

Openquery will not work because I am trying to execute a batch file from a
database server and batch file exists on the application server and there is
no local SQL SERVER client intalled.

I guess am I looking for a tool that will allow me remotly execute a batch
file from a command line. User executing a command line is not (cannot be due
to security reasons) part of the local admin group.

Thank you,

Regards,

Roman JR.

[quoted text, click to view]
Sue Hoegemeier
9/27/2005 4:11:12 PM
Okay...not a SQL server question really. You just want to
use nothing but remote to execute a batch file on another
server.
It's something like:
remote.exe 2 IPaddress \\UNCPathToBatch
You can execute remote.exe /? to see the parameters you can
use.

-Sue

On Tue, 27 Sep 2005 11:09:02 -0700, Roman JR.
[quoted text, click to view]
AddThis Social Bookmark Button