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] <rkiss_at_opentext_dot_com> wrote:
>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.
>
>"Sue Hoegemeier" wrote:
>
>> 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.
>> <rkiss_at_opentext_dot_com> wrote:
>>
>> >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
>> >
>> >"Steen Persson (DK)" wrote:
>> >
>> >> Roman JR. wrote:
>> >> > 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.
>> >> >
>> >> >
>> >> 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
>> >> Steen
>> >>
>>
>>