Starting and Stopping SAP Systems and Instances Using Commands (Unix)

5
Starting and Stopping SAP Systems and Instances Using Commands (Unix) You can start and stop SAP systems and instances using the startsap  and stopsap commands. You can use command line options to specify these commands. Command line options are available in new style or old style. Using New Style for Command Line Options and Parameters Using new style, the syntax is as follows stopsap | stopsap [-t | -task <task>] [-i | -instance <instance>] [-v | -vhost "<virtual hostname>[ <virtual hostname>]*"][-c | -check] [-h | -help] [-V | -VERSIO] [-! | -checkVost] !xample "f you want to start an A#AP or dual$stac% &A#AP'(ava) central instance #VE$%&S''  that has the virtual host names cic(( and cic(), enter the following commands startsap-t r -i #VE$%&S'' -v "cic(( cic()" "f you want to start a (ava central instance +!'' that has the virtual host names cic(( and cic(), enter the following commands startsap -t ,)ee -i +!''-v "cic(( cic()" !nd of the example. *he following command line options and parameters are available Command Line Options (New Style) Parameter Name Description [-t | -task <task>] Specify tas% [-i | -instance <instance>] Specify SAP system instance [-v | -vhost "<virtual hostname>[ <virtual hostname>]*"] Specify virtual host names [-c | -check] Chec% database and SAP instance status [-h | -help] +isplay help [-V | -VERSIO] +isplay startsap  script version [-! | -checkVost] Chec% virtual host name Parameters for tas!" (New Style) Parameter Name Description check Chec% status of database and SAP system instances r | ,)ee Start or stop SAP instances only. You can use either r or ,)ee, regardless if the instance to be started or stopped is an A#AP or (ava instance.

description

Starting and Stopping SAP Systems and Instances Using Commands (Unix)

Transcript of Starting and Stopping SAP Systems and Instances Using Commands (Unix)

  • Starting and Stopping SAP Systems and Instances Using Commands (Unix) You can start and stop SAP systems and instances using the startsap and stopsap commands.You can use command line options to specify these commands. Command line options are available in

    new style or old style.Using New Style for Command Line Options and ParametersUsing new style, the syntax is as follows:stopsap | stopsap [-t | -task ] [-i | -instance ] [-v | -vhost "[ ]*"][-c | -check] [-h | -help] [-V | -VERSION] [-C | -checkVHost]

    Example

    If you want to start an ABAP or dual-stack (ABAP+Java) central instance DVEBGMS00 that has the virtual host names cic11 and cic12, enter the following commands :startsap-t r3 -i DVEBGMS00 -v "cic11 cic12" If you want to start a Java central instance JC00 that has the virtual host names cic11 and cic12, enter the following commands :startsap -t j2ee -i JC00-v "cic11 cic12"

    End of the example.

    The following command line options and parameters are available:

    Command Line Options (New Style)Parameter Name Description[-t | -task ] Specify task[-i | -instance ] Specify SAP system instance[-v | -vhost "[ ]*"]

    Specify virtual host names

    [-c | -check] Check database and SAP instance status[-h | -help] Display help[-V | -VERSION] Display startsap script version[-C | -checkVHost] Check virtual host nameParameters for (New Style)Parameter Name Descriptioncheck Check status of database and SAP system instancesr3 | j2ee Start or stop SAP instances only. You can use either r3 or j2ee,

    regardless if the instance to be started or stopped is an ABAP or Java

    instance.

  • Command Line Options (New Style)Parameter Name Description[-t | -task ] Specify task[-i | -instance ] Specify SAP system instancedb Start or stop ABAP database onlyjdb Start or stop Java database onlyall | Start or stop database and SAP instancestartupsrv Start or stop sapstartsrv program

    Parameters for where is the instance numberParameter Name DescriptionDVEBMGS ABAP central InstanceD ABAP dialog instanceASCS ABAP central services instance (ASCS instance)SCS Java central services instance (SCS instance)J Java central instanceTRX TREX instanceERS Enqueue replication server instance (ERS instance)SMDA Diagnostics agent instanceW Web services instanceG Gateway instance

    Using Old Style for Command Line Options and ParametersUsing old style, the syntax is as follows:stopsap | stopsap [db|r3|j2ee|all|check|startupsrv] [] []

    Example

    If you want to start an ABAP or dual-stack (ABAP+Java) central instance DVEBGMS00 that has the virtual host names cic11 and cic12, enter the following commands :startsap r3 DVEBGMS00 cic11 cic12 If you want to start a Java central instance DVEBGMS00 that has the virtual host names cic11 and cic12, enter the following commands :startsap j2ee JC00 cic11 cic12

    End of the example.

    The following command line options and parameters are available:

    Command Line Options (Old Style)Parameter Name Descriptioncheck [] []

    Check status of database and SAP system instances

    r3 | j2ee [] []

    Start or stop SAP instances only. You can use either r3 or j2ee, regardless if the instance to be started or stopped is an ABAP or Java instance.

    db [] [

  • Command Line Options (Old Style)Parameter Name Descriptioncheck [] []

    Check status of database and SAP system instances

    r3 | j2ee [] []

    Start or stop SAP instances only. You can use either r3 or j2ee, regardless if the instance to be started or stopped is an ABAP or Java instance.

    hostname>]jdb [] []

    Start or stop Java database only

    all | Start or stop database and all SAP system instances running on the same physical host

    startupsrv Start or stop sapstartsrv programParameters for where is the instance numberParameter Name DescriptionDVEBMGS ABAP central InstanceD ABAP dialog instanceASCS ABAP central services instance (ASCS instance)SCS Java central services instance (SCS instance)JC Java central instanceJ Java dialog instanceTRX TREX instanceERS Enqueue replication server instance (ERS instance)SMDA Diagnostics agent instanceW Web services instanceG Gateway instance

    Prerequisites Make sure that you have logged on to the physical host of the SAP system instances as

    user adm. Make sure that the host names defined in the DNS server match the names of the SAP

    system instance hosts. In particular, keep in mind that host names are case-sensitive. For

    example, if the names of the SAP system instance hosts are in upper case, but the same host

    names are defined in the DNS server in lower case, starting and stopping the system does not

    work.

    If you want to use startsap or stopsap (for example, in a script) and require the fully qualified name of these SAP scripts, create a link to the startsap script in the home directory of the corresponding user.

    You cannot use startsap or stopsap commands in a switchover cluster environment. Therefore in a high-availability (HA) system you must use the failover cluster software of your HA partner to start or stop instances running on the switchover cluster.

  • You cannot use startsap or stopsap commands to start or stop database-specific tools. For more information about how to start or stop database-specific tools, see the database-

    specific information in this documentation and the documentation from the database

    manufacturer.

    Make sure that no SAP instance is running before you execute stopsap on a standalone database server. No automatic check is made.

    When you use stopsap in a Multiple Components in One Database (MCOD) system with two central instances, only one central instance and the database are shut down. Therefore, you must first stop the other SAP system or make sure that it has already been stopped.

    ProcedureStarting an SAP System

    If you want to start all SAP system instances running on the same host, execute the

    following command:

    New style: startsap or startsap -t allOld style:startsap or startsap all If you want to start SAP system instances separately, enter the following command:

    New style:startsap -t r3|j2ee -i [-v ""]Old style:startsap r3|j2ee []Make sure that you adhere to the following sequence when starting the instances:

    ABAP system:1. Database instance

    2. Central instance

    3. Dialog instances (if available)

    Java system: 4. Database instance

    5. SCS instance

    6. Central instance

    7. Dialog instances (if available)

    Dual-stack (ABAP+Java) system: 8. Database instance

    9. SCS instance

    10. Central instance

    11. Dialog instances (if available)

  • Stopping an SAP System

    If you want to stop all SAP system instances running on the same host, execute the

    following command:

    New style: stopsap or stopsap -t allOld style:stopsap or stopsap all If you want to stop SAP system instances separately, enter the following command:

    New style:stopsap -t r3|j2ee -i [-v ""]Old style:stopsap r3|j2ee []Make sure that you adhere to the following sequence when stopping the instances:

    ABAP system:1. Dialog instances (if available)

    2. Central instance

    3. Database instance

    Java system: 4. Dialog instances (if available)

    5. Central instance

    6. SCS instance

    7. Database instance

    Dual-stack (ABAP+Java) system: 8. Dialog instances (if available)

    9. Central instance

    10. SCS instance

    11. Database instance