cancel
Showing results for 
Search instead for 
Did you mean: 

how to get return code of sapcontrol

former_member215981
Active Participant
0 Kudos

Hello

for the following command, how to get the return code of it on windows?

what is the return code of function StopService?

sapcontrol -prot PIPE -host xxxx -nr <instance#> -function StopService

Best Regards,

Yong Luo

Accepted Solutions (1)

Accepted Solutions (1)

shuai_liang
Participant
0 Kudos

Hi Yong,

Maybe you can try the following command.

echo %errorlevel%

Best regards,

Shuai Liang

former_member5374
Associate
Associate
0 Kudos

Hi Guys,

I think this does not display the status return code.

Is there an option to know what is the return code of sapcontrol command execution.

Thanks & BR,

KBV

***********

Hi Guys,

Found the solution in below link:-

http://scn.sap.com/community/windows/blog/2014/06/12/scripting-sapmmc-operations#

BR,

KBV

Answers (1)

Answers (1)

AtulKumarJain
Active Contributor
0 Kudos

Hi Yong,

You can logon to windows server with sidadm user and open the cmd

and excute the above command .

Best Regards,

Atul

former_member215981
Active Participant
0 Kudos

Hello Atul

can the following be used?

Exitcode:

0: Last Webmethod call successfull

1: Last Webmethod call failed, invalid parameter

2: StartWait, StopWait, WaitforStarted, WaitforStopped,

RestartServiceWait timed out

3: GetProcessList succeeded, all processes running correctly

4: GetProcessList succeeded, all processes stopped

Best Regards,

Yong Luo