Sei sulla pagina 1di 5

Starting and Stopping the SAP System Using Commands (Unix)

You can start and stop SAP system 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 | -VERSION] [-C | -checkVHost] EXAMPLE

If you want to start an ABAP or dual-stack (ABAP+Java) primary application server 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 primary application server instance J00 that has the virtual host names cic11 and cic12, enter the following commands : startsap -t j2ee -i J00 -v "cic11 cic12"

The following command line options and parameters are available:

Command Line Options (New Style)


Parameter Name [-t | -task <task>] Description Specify task

[-i | -instance <instance>] Specify SAP system instance [-v | -vhost "<virtual hostname>[ <virtual hostname>]*"] [-c | -check] [-h | -help] [-V | -VERSION] [-C | -checkVHost] Specify virtual host names

Check database and SAP instance status Display help Display startsap script version Check virtual host name

Parameters for <task> (New Style)


Parameter Name check Description Check status of database and SAP system instances

Command Line Options (New Style)


Parameter Name r3 | j2ee Description 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. Start or stop ABAP database only Start or stop Java database only Start or stop database and SAP instance Start or stop sapstartsrv program

db jdb all | <blank> startupsrv

Parameters for <instance> where <nn> is the instance number


Parameter Name DVEBMGS<nn> D<nn> ASCS<nn> SCS<nn> J<nn> TRX<nn> ERS<nn> SMDA<nn> W<nn> G<nn> Description ABAP primary application server Instance ABAP additional application server instance ABAP central services instance (ASCS instance) Java central services instance (SCS instance) Java application server instance TREX instance Enqueue replication server instance (ERS instance) Diagnostics agent instance Web services instance Gateway instance

Using Old Style for Command Line Options and Parameters


Using old style, the syntax is as follows: stopsap | stopsap [db|r3|j2ee|all|check|startupsrv] [<instance>] [<virtual hostname>] EXAMPLE

If you want to start an ABAP or dual-stack (ABAP+Java) primary application server 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 primary application server instance DVEBGMS00 that has the virtual host names cic11 and cic12, enter the following commands : startsap j2ee J00 cic11 cic12

The following command line options and parameters are available:

Command Line Options (Old Style)


Parameter Name check [<instance>] [<virtual hostname>] r3 | j2ee [<instance>] [<virtual hostname>] Description Check status of database and SAP system instances

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. Start or stop ABAP database only

db [<instance>] [<virtual hostname>] jdb [<instance>] [<virtual hostname>] all | <blank>

Start or stop Java database only

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

startupsrv

Parameters for <instance> where <nn> is the instance number


Parameter Name DVEBMGS<nn> D<nn> ASCS<nn> SCS<nn> J<nn> TRX<nn> ERS<nn> SMDA<nn> W<nn> G<nn> Description ABAP primary application server Instance ABAP additional application server instance ABAP central services instance (ASCS instance) Java central services instance (SCS instance) Java application server instance TREX instance Enqueue replication server instance (ERS instance) Diagnostics agent instance Web services instance Gateway instance

Prerequisites
Make sure that you have logged on to the physical host of the SAP system instances as user <sapsid>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 primary application server instances, only one primary application server 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.

Procedure
Starting 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 all Old 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 <instance> [-v "<virtual host name>"] Old style:startsap r3|j2ee <instance> [<virtual host name>] Make sure that you adhere to the following sequence when starting the instances: ABAP system: 1. Database instance 2. ERS instance for the ASCS instance (if available) 3. ASCS instance (if available) 4. Primary application server instance 5. Additional application server instances (if available) Java system: 6. Database instance 7. ERS instance for the SCS instance (if available) 8. SCS instance 9. Application server instances Dual-stack (ABAP+Java) system:

10. 11. 12. 13. 14. 15. 16.

Database instance ERS instance for the SCS instance (if available) ERS instance for the ASCS instance (if available) SCS instance ASCS instance (if available) Primary application server instance Additional application server 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 all Old 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 <instance> [-v "<virtual host name>"] Old style:stopsap r3|j2ee <instance> [<virtual host name>] Make sure that you adhere to the following sequence when stopping the instances: ABAP system: 1. Additional application server instances (if available) 2. Primary application server instance 3. ASCS instance (if available) 4. ERS instance for the ASCS instance (if available) 5. Database instance Java system: 6. Application server instances 7. SCS instance 8. ERS instance for the SCS instance (if available) 9. Database instance Dual-stack (ABAP+Java) system: 10. Additional application server instances (if available) 11. Primary application server instance 12. ASCS instance (if available) 13. SCS instance 14. ERS instance for the ASCS instance (if available) 15. ERS instance for the SCS instance (if available) 16. Database instance

Potrebbero piacerti anche