Skip to Content
author's profile photo Former Member
Former Member

Stopping/Starting Portal via BAT file on Windows

In our landscape we have the ABAP and JAVA stack installed on separate servers for security reason. We are trying to implement windows updates via SUS and need to automate the stopping and starting of SAP. The bat file that was created works when stopping and starting the ABAP portion of SAP but on the Portal server it will take it down but when trying to start Portal, the J2ee Server will not start, but when I use the SAP MMC all servers starts up without any problem. Below is the start up bat file, any assistance will be greatly appreciated:

REM start of script

PATH=%path%;G:\usr\sap\QBE\SYS\exe\uc\NTAMD64

SET ORACLE_SID=QBE

SET SAPDATA_HOME=K:\ORACLE\QBE

REM

REM

REM ***** starting Oracle Services *****

REM

net start OracleQBE102TNSListener

net start OracleServiceQBE

net start OracleQBE102iSQL*Plus

REM

REM ***** starting SAP services *****

REM

net start SAPOsCol

net start SAPQBE_00

net start SAPQBE_01

REM

REM ***** starting SAP Instances ******

REM

G:\usr\sap\QBE\SYS\exe\uc\NTAMD64\startsap.exe name=QBE nr=00 SAPDIAGHOST=SAPEPQA

G:\usr\sap\QBE\SYS\exe\uc\NTAMD64\startsap.exe name=QBE nr=01 SAPDIAGHOST=SAPEPQA

REM

REM end of script

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Aug 13, 2010 at 12:39 PM

    What do the logfiles say?

    Can you run the script interactive to see what return messages are writen back to the terminal/cmd window?

    What user runs the scripts?

    Cheers,

    Benjamin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2010 at 12:52 PM

    Ben,

    The user that is used to execute this is the <sid>adm, unfortunately the log file did not help any, here is the content of the log file:

    running G:\usr\sap\QBE\SYS\exe\uc\NTAMD64\sapstart.exe name=QEP nr=04 SAPDIAGHOST=SAPEPQA -wait

    SAPSTART finished successfully on SAPEPQA_QEP_04, but at least one process doesn't run correctly:

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2010 at 01:12 PM

    When I use the bat file to start up the system, the all but the J2EE Server does not start. Message Server, Enque Server and the IGS Watchdo will go active with a green status. The only server that does not start is the jcontol (J2EE Server). The over all status of the MMC for the portal turns yellow.

    Add a comment
    10|10000 characters needed characters exceeded

    • I looked up some training material and in TADM10 - Unit4 - Starting and Stopping a SAP NetWeaver AS Java.. the following is stated:

      Under Windows, the SAP system can also be started and stopped without a GUI by
      calling a command by means of the executable files startsap.exe and stopsap.exe. This
      can be done using a simple telnet access.
      To start an instance of the SAP system, open a telnet connection and enter the
      following command: startsap name=<SID> nr=<instance nr.>
      SAPDIAHOST=<hostname>
      To stop an instance of the SAP system, open a telnet connection and enter the
      following command: stopsap name=<SID> nr=<instance nr.>
      SAPDIAHOST=<hostname>
      For the SAPDIAHOST parameter, enter the name of the host on which the instance is
      to be started.

      So the script is correct, its all according to SAP advice... 😔 very strange

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2010 at 03:19 PM

    Ben thank you for your assistace. I have figured out what the problem was and solved it. In the syntax of the startsap, I need to add the start profile for each instance also needed to change the sequence of starting up of the SID. The J2EE Server when started tries to connect to the message server, well the message server is started in the 01 SID so I change the sequence to first start the 01 SID and then the 00 SID and it works perfectly. Thanks again

    Crosby

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.