반응형

0. 본 내용을 위해 선행되어야 하는 자료

 - SAP AP 실행 순서: 2023.02.20 - [SAP BC] - # SAP AP Startup sequence ( SAP AP 실행 순서 )

 

# SAP AP Startup sequence ( SAP AP 실행 순서

SAP Application Server의 작동 순서는 아래와 같다. 0. SAP start and stop procedure - The instance is started by the sapstartsrv process, and not directly by the start service sapstart. Instance는 sapstartsrv process에 의해 시작되며, sapst

leehi0110.tistory.com

 - HANA DB 실행 순서 : 2023.02.10 - [HANA] - # HANA DB Startup sequence ( HANA DB 실행 순서 )

 

# HANA DB Startup sequence ( HANA DB 실행 순서 )

HANA DB의 작동 순서는 아래 그림과 같다. 1. OS Boot -> /etc/init.d/sapinit - During linux startup ( OS Boot ) by default it starts the process listed under /etc/inid.d, our sapstartsrv is part of this process. OS가 부팅되는 동안, /etc/in

leehi0110.tistory.com

 

1. sapcontrol ?

  • sapstartsrv process와의 통신을 통해 시스템을 시작 및 종료 할 수 있는 커맨드 툴이다

        ✓ sapstartsrv ? sap instance를 관리하기 위한 linux service deamon으로, 해당 서비스가 작동하지 않으면  start, stop이 불가능하다.

  • 과거에 사용하던 'startsap' 과 'stopsap' 명령어는 몇몇 이슈가 있어 SAP에서 사용을 권장하지 않고, 2015년부터 더 이상 지원 및 사용이 되지 않는다 (deprecated).

2. SAP SYSTEM vs SAP Instance

  - sapcontrol 명령어를 적절히 사용하기 위해서는 SAP system과 SAP instance의 차이를 알아야 한다.

  ✓  SAP instance

  • SAP Instance는 application 및 database server에 필요한 memory, work process와 같은 자원들의 집합체이다.
  • 또한, Instance는 서버에 설치된 어플리케이션이 실행 및 관리를 담당한다.

    SAP SYSTEM

  • SAP SYSTEM은 하나 이상의 인스턴스를 가진 시스템으로 구성된다.
  • SYSTEM은 인스턴스를 관리하기 위한 다른 프로세스 또한 포함하고 있다.

3. sapcontrol command

  - SAP Document about sapcontrol command : https://help.sap.com/docs/SLTOOLSET/9338236b61554ba194f10c236e0237d0/0a2f54809e064ee68b02fb9fb392bafd.html?version=CURRENT_VERSION&locale=en-US

  - SAP Server에 접속 후, sidadm으로 계정을 전환한다.

  - sapcontrol 메뉴얼 보기

sapcontrol -help

  -  SAP SYSTEM Instance List 확인

  • 아래의 명령어를 사용할 경우 SAP SYSTEM 상의 모든 인스턴스 목록을 조회 할 수 있다.
 sapcontrol -nr <instance number> -function GetSystemInstanceList

  -  SAP Instance status 확인

sapcontrol -nr <instance number> -function GetProcessList

  -  SAP SYSTEM Start / Stop

  • 아래 명령어를 통해 전체 시스템을 종료할 수 있다. 이 때, 하나의 instance number만 입력해도 연관된 인스턴스는 자동으로 종료된다.
  • 해당 명령어를 사용한 후, 상태 확인 명령어 (GetProcessList)를 이용해 시스템이 중지 되는지 확인 할 수 있다.
sapcontrol -nr <instance number> -function StopSystem

  •   아래 명령어를 통해 전체 시스템을 기동하면 된다. 이 때, 하나의 instance number만 입력하여도 연관된 인스턴스는 자동으로 기동된다.
  • 해당 명령어를 사용한 후, 상태 확인 명령어 (GetProcessList)를 이용해 시스템이 기동 되는지 확인 할 수 있다.
sapcontrol -nr <instance number> -function StartSystem

  -  SAP Instance Start / Stop

  • 아래의 명령어를 통해 특정 인스턴스를 종료할 수 있다. 이 때, <instance number>에 적은 인스턴스만 중지되고, 타 인스턴스들은 중지 되지 않는다.
sapcontrol -nr <instance number> -function Stop

  • 아래의 명령어를 통해 특정 인스터스를 기동할 수 있다. 이 때, <instance number>에 적은 인스턴스만 기동되고, 타 인스턴스들은 기동 되지 않는다.
sapcontrol -nr <instance number> -function Start

  -  SAPSTARTSRV service Start / Stop

  • SAP SYSTEM 혹은 Instance를 기동 및 중지 시킬 때, 몇 가지 이슈가 발생하기도 한다. 이 때, 가장 먼저 확인 할 수 있는 부분은 sapstartsrv service의 동작 여부이다.
  • 기본적으로 아래의 명령어들은 운영중에 사용하지 않는다. 그 이유는 sapstartsrv service의 기동에 이상이 있을 경우, sapcontrol command 사용이 불가능하기 때문이다.
ps -ef | grep sapstartsrv

혹은

ps -ef | grep sidadm

  • 특정 instance의 sapstartsrv service를 중지하고 싶은 경우 아래의 명령어를 사용하면 된다.
sapcontrol -nr <instance number> -function StopService

  • 특정 instance의 sapstartsrv service를 기동하고 싶은 경우 아래의 명령어를 사용하면 된다.
sapcontrol -nr <instance number> -function StartService <SID>

 

참조 : https://www.letstalksap.com/2022/01/how-to-properly-startstop-sap-system.html

 

How to properly Start/Stop SAP system through command line ?

Starting/stopping an SAP system is not a critical task, but the method that most of us follow to achieve this is sometimes wrong. A ...

www.letstalksap.com

 

🙋‍♂️ 궁금한 점이나 잘못된 내용을 댓글로 적어주시면 감사하겠습니다 !!

반응형

'SAP > BC' 카테고리의 다른 글

# [SAP] SAP GUI - SAPUILandscape.xml  (0) 2023.05.23
# [SAP] Technical Job ( Stepuser )  (0) 2023.04.04
# [SAP] SAP Version  (0) 2023.02.22
# [SAP] SAP AP Startup sequence ( SAP AP 실행 순서 )  (0) 2023.02.20
# [SAP] SAP Port ( Application Port )  (0) 2023.02.15

+ Recent posts