cancel
Showing results for 
Search instead for 
Did you mean: 

startsap / sapcontrol

former_member201054
Contributor
0 Kudos

Hi Experts,

Is sapcontrol alternative of startsap/stopsap?

for which conditions sapcontrol -nr <> -function commands can be effectively used?

Is it possible to start database with sapcontrol command?

Thanks in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

divyanshu_srivastava3
Active Contributor
0 Kudos

Hi Daniel,

Use can use startsap to start:

DB - startsap db hostname

ABAP - startsap r3 hostname

JAVA - startsap j2ee hostname

any instance - for eg J00 - startsap J00 hostname.

Why to use sapcontrol ?

Divyanshu

hemanth2
Product and Topic Expert
Product and Topic Expert
0 Kudos

SAPCONTROL is used by the internal SAP processes. for example if SUM is run, it will try to start/stop using SAPCONTROL. Although it can be used for general housekeeping, startsap/stopsap is all you usually need.

divyanshu_srivastava3
Active Contributor
0 Kudos

Perfectly said, I was asking Daniel why he wants to switch to SAPCONTOL

Former Member
0 Kudos

Interesting remark. But according to official SAP documentation:

"sapcontrol: with sapcontrol (process name on Windows sapcontrol.exe) you can call the functions of the Web service interface from the command field. sapcontrol -h shows the syntax and the available options."

gabriella_kiss
Participant
0 Kudos

Hi,

Back to your original question: both of them take part in the start of sap system.

You can have a better overview about sapcontrol and startsap script here:

SAP Start Service - Architecture of the SAP NetWeaver Application Server - SAP Library

The sapcontrol webservice interface implements a wide variety of of other functions, e,g,

as here already mentioned GetProcessList but GetVersionInfo, ... GetEnvironment, GetStartProfile...


You can see here more detailed infos about sapcontrol web service functions:


http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e24f7b-1ba1-2b10-c0a0-e514b8556...


  

Regards, Gabriella Kiss

divyanshu_srivastava3
Active Contributor
0 Kudos

Hi Daniel,

STARTSAP and STOPSAP are scripts which in turn call other kernel and host programs to startup and SAP environment .

Is sapcontrol alternative of startsap/stopsap?

Not really, sapcontrol more or less is an independent program/web-service interface which is called with additional options, which themselves are C codes.

Refer: for codes and list

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e24f7b-1ba1-2b10-c0a0-e514b8556...

Also, for starting database, at the backend, no sapcontrol is use.

Once you read the above document you know what function are all about.

One the script in VI or notepad and look for function call.

Regards,

Divyanshu

willi_eimler
Contributor
0 Kudos

Hi Daniel,


Is sapcontrol alternative of startsap/stopsap?

yes (but startsap and stopsap uses sapcontrol)


for which conditions sapcontrol -nr <> -function commands can be effectively used?

can be used for scripting


Is it possible to start database with sapcontrol command?

No, the db is started by startdb script.

Best regards

Willi Eimler

former_member201054
Contributor
0 Kudos

Hi Eimler,

Thanks for the reply.

Please give me the usage/troubleshooting examples for sapcontrol for ABAP & JAVA stack systems?

Can it be used in Java stack systems?

Thanks in advance


willi_eimler
Contributor
0 Kudos

Hi Daniel,

you can use the statement:

sapcontrol -nr <Systemnumber> -host <myhostname> -prot NI_HTTP -function Stop

to stop a system.

And:


sapcontrol -nr <Systemnumberl> -host <myhostnameY -prot NI_HTTP -function Start

to start a system.

A system is identified by a systemnumber and a hostname. The statements stops and starts systems regardless of their types.

Best regards

Willi Eimler

former_member201054
Contributor
0 Kudos

Hi,

The mentioned statements would suit for AS-Java system as well?

And these will not do anything with database..right..DB should be started/stopped separately?

Thanks in advance

willi_eimler
Contributor
0 Kudos

Hi Daniel,

yes. Look at the following example:

AS ABAP with systemnumber 01 on host alpha

ASCS with systemnumber 00 on host alpha

Java with systemnumber 04 on host beta

SCS with systemnumber 03 on host beta

Statement to stop the systems:

sapcontrol -nr 01 -host alpha -prot NI_HTTP -function Stop

sapcontrol -nr 00 -host alpha -prot NI_HTTP -function Stop

sapcontrol -nr 04 -host beta -prot NI_HTTP -function Stop

sapcontrol -nr 03 -host beta -prot NI_HTTP -function Stop

You can control the status of the instance with

sapcontrol -nr <sysnr> -host <host> -prot NI_HTTP -function GetProcessList

Best regards

Willi Eimler