본문 바로가기
DBMS/ORACLE

srvctl stop/start database 명령은 어떤 노드부터 동작할까?

by 드바 2022. 3. 25.

버전 : ORACLE 11.2.0.1

 

srvlctl stop/start database 명령을 사용하여 재기동 진행 시 노드 별 재기동 순서가 있을까? 라는 궁금증이 생겨 테스트 진행

요약:
- stop 은 동시에 진행 됨
- start 는 한 노드 씩 순차적으로 진행됨
- start database 명령으로 기동 시 딱히 정해진 순서는 없어 보임(명령을 실행 한 노드 또는 인스턴스가 중지된 순서 등 여러상황 반복 테스트 시 특별한 규칙을 찾을 수 없었음)
- 노드별 재기동 순서가 있을 경우 인스턴스 레벨로 진행하는 것이 좋다

rac1 노드에서 명령 실행

rac1 -> rac2 순서 stop 진행 rac2 부터 기동됨

[oracle@rac1 ~]$ srvctl stop instance -d RACDB -i racdb1
[oracle@rac1 ~]$ srvctl stop instance -d RACDB -i racdb2
[oracle@rac1 ~]$ srvctl start database -d racdb

# rac1
-- STOP
Fri Mar 25 11:44:31 2022
Shutting down instance (immediate)
...
Fri Mar 25 11:44:45 2022
Instance shutdown complete
-- START
Fri Mar 25 11:46:28 2022
Starting ORACLE instance (normal)
...
Fri Mar 25 11:46:43 2022
QMNC started with pid=40, OS id=8430 
Completed: ALTER DATABASE OPEN


# rac2
-- STOP
Fri Mar 25 11:45:11 2022
Shutting down instance (immediate)
...
Fri Mar 25 11:45:25 2022
Instance shutdown complete
-- START
Fri Mar 25 11:46:05 2022
Starting ORACLE instance (normal)
...
Fri Mar 25 11:46:18 2022
QMNC started with pid=39, OS id=2705 
Completed: ALTER DATABASE OPEN


rac2 -> rac1 순서 stop 진행 rac1 부터 기동됨

[oracle@rac1 ~]$ srvctl stop instance -d RACDB -i racdb2
[oracle@rac1 ~]$ srvctl stop instance -d RACDB -i racdb1
[oracle@rac1 ~]$ srvctl start database -d racdb

# rac1
-- STOP
Fri Mar 25 11:52:53 2022
Shutting down instance (immediate)
...
Fri Mar 25 11:53:07 2022
Instance shutdown complete
-- START
Fri Mar 25 11:54:27 2022
Starting ORACLE instance (normal)
...
Fri Mar 25 11:54:40 2022
QMNC started with pid=39, OS id=10170 
Completed: ALTER DATABASE OPEN


# rac2
-- STOP
Fri Mar 25 11:52:38 2022
Shutting down instance (immediate)
...
Fri Mar 25 11:52:48 2022
Instance shutdown complete
-- START
Fri Mar 25 11:54:50 2022
Starting ORACLE instance (normal)
...
Fri Mar 25 11:55:05 2022
QMNC started with pid=40, OS id=3546 
Completed: ALTER DATABASE OPEN

 

rac2 노드에서 명령 실행

rac1 -> rac2 순서 stop 진행 rac1 부터 기동됨

[oracle@rac2 ~]$ srvctl stop instance -d RACDB -i racdb1
[oracle@rac2 ~]$ srvctl stop instance -d RACDB -i racdb2
[oracle@rac2 ~]$ srvctl start database -d racdb

# rac1
-- stop
Fri Mar 25 11:21:36 2022
Shutting down instance (immediate)
Shutting down instance: further logons disabled
...
Fri Mar 25 11:21:50 2022
Instance shutdown complete
-- start
Fri Mar 25 11:30:15 2022
Starting ORACLE instance (normal)
...
Fri Mar 25 11:30:28 2022
QMNC started with pid=40, OS id=5800 
Completed: ALTER DATABASE OPEN


# rac2
-- stop
Fri Mar 25 11:22:19 2022
Shutting down instance (immediate)
Shutting down instance: further logons disabled
...
Fri Mar 25 11:22:33 2022
Instance shutdown complete
-- start
Fri Mar 25 11:30:39 2022
Starting ORACLE instance (normal)
...
Fri Mar 25 11:30:53 2022
QMNC started with pid=40, OS id=1684 
Completed: ALTER DATABASE OPEN

 

rac2 -> rac1 순서 stop 진행 rac1 부터 기동됨

[oracle@rac2 ~]$ srvctl stop instance -d RACDB -i racdb2
[oracle@rac2 ~]$ srvctl stop instance -d RACDB -i racdb1
[oracle@rac2 ~]$ srvctl start database -d racdb

# rac1
-- stop
Fri Mar 25 11:38:48 2022
Shutting down instance (immediate)
...
Fri Mar 25 11:38:58 2022
Instance shutdown complete
-- start
Fri Mar 25 11:39:26 2022
Starting ORACLE instance (normal)
...
Fri Mar 25 11:39:39 2022
QMNC started with pid=39, OS id=7181 
Completed: ALTER DATABASE OPEN


# rac2
-- STOP
Fri Mar 25 11:38:09 2022
Shutting down instance (immediate)
...
Fri Mar 25 11:38:23 2022
Instance shutdown complete
-- START
Fri Mar 25 11:39:50 2022
Starting ORACLE instance (normal)
...
Fri Mar 25 11:40:04 2022
QMNC started with pid=40, OS id=2248 
Completed: ALTER DATABASE OPEN






댓글