프린트 하기

OS환경 : Windows Server 2016 STD (64bit)


DB 환경 : Oracle Database 11.2.0.4


방법 : Windows Server 2016 서버 정상종료 시 oracle shutdown 프로세스

Windows Server 2016 에서 oracle 11g 기동 중 서버 정상 종료시

oracle이 shutdown immediate 로 종료되는지 abort로 종료되는지 확인하는 테스트


db 상태 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
C:\Users\oracle>sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.4.0 Production on 수 7월 15 15:18:16 2020
 
Copyright (c) 19822017, Oracle.  All rights reserved.
 
 
다음에 접속됨:
Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
 
SQL> select status from v$instance;
 
STATUS
------------
OPEN

기동중임



alert log에 종료되는 시간을 확인하기 위해 log switch 1회 실행

1
SQL> alter system switch logfile;



alert log 확인

1
2
3
4
5
6
7
8
.
.
Wed Jul 15 15:19:16 2020
Thread 1 advanced to log sequence 63 (LGWR switch)
  Current log# 3 seq# 63 mem# 0: C:\APP\ORACLE\ORADATA\ORCL\REDO03.LOG
Wed Jul 15 15:19:16 2020
Archived Log entry 14 added for thread 1 sequence 62 ID 0x5dc31fed dest 1:
Wed Jul 15 15:20:08 2020

로그 스위치 내용이 나옴



서버 종료



계속 선택



서버 기동 후 alert log 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
Wed Jul 15 15:19:16 2020
Thread 1 advanced to log sequence 63 (LGWR switch)
  Current log# 3 seq# 63 mem# 0: C:\APP\ORACLE\ORADATA\ORCL\REDO03.LOG
Wed Jul 15 15:19:16 2020
Archived Log entry 14 added for thread 1 sequence 62 ID 0x5dc31fed dest 1:
Wed Jul 15 15:21:16 2020 <- db 종료 로그 없이 바로 기동 로그만 나옴
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Initial number of CPU is 1
Number of processor cores in the system is 1
Number of processor sockets in the system is 1
Picked latch-free SCN scheme 3
Autotune of undo retention is turned on
IMODE=BR
ILAT =27
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Release 11.2.0.4.0 - 64bit Production.
Windows NT Version V6.2  
CPU                 : 1 - type 86641 Physical Cores
Process Affinity    : 0x0x0000000000000000
Memory (Avail/Total): Ph:7428M/8191M, Ph+PgF:7039M/10111M 
VM name             : VMWare Version (6)
Using parameter settings in server-side spfile C:\APP\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\SPFILEORCL.ORA
System parameters with non-default values:
  processes                = 150
  nls_language             = "KOREAN"
  nls_territory            = "KOREA"
  sga_target               = 2464M
  control_files            = "C:\APP\ORACLE\ORADATA\ORCL\CONTROL01.CTL"
  control_files            = "C:\APP\ORACLE\ORADATA\ORCL\CONTROL02.CTL"
  db_block_size            = 8192
  compatible               = "11.2.0.4.0"
  log_archive_dest_1       = "location=C:\app\oracle\arch"
  log_archive_dest         = ""
  log_archive_format       = "%t%s%r.arc"
  undo_tablespace          = "UNDOTBS1"
  remote_login_passwordfile= "EXCLUSIVE"
  db_domain                = ""
  dispatchers              = "(PROTOCOL=TCP) (SERVICE=orclXDB)"
  audit_file_dest          = "C:\APP\ORACLE\ADMIN\ORCL\ADUMP"
  audit_trail              = "DB"
  db_name                  = "orcl"
  open_cursors             = 300
  pga_aggregate_target     = 819M
  diagnostic_dest          = "C:\APP\ORACLE"
Wed Jul 15 15:21:17 2020
PMON started with pid=2, OS id=2760 
Wed Jul 15 15:21:17 2020
PSP0 started with pid=3, OS id=2764 
Wed Jul 15 15:21:18 2020
VKTM started with pid=4, OS id=2800 at elevated priority
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Wed Jul 15 15:21:18 2020
GEN0 started with pid=5, OS id=2804 
Wed Jul 15 15:21:18 2020
DIAG started with pid=6, OS id=2808 
Wed Jul 15 15:21:18 2020
DBRM started with pid=7, OS id=2812 
Wed Jul 15 15:21:18 2020
DIA0 started with pid=8, OS id=2816 
Wed Jul 15 15:21:18 2020
MMAN started with pid=9, OS id=2820 
Wed Jul 15 15:21:18 2020
DBW0 started with pid=10, OS id=2824 
Wed Jul 15 15:21:18 2020
LGWR started with pid=11, OS id=2828 
Wed Jul 15 15:21:18 2020
CKPT started with pid=12, OS id=2832 
Wed Jul 15 15:21:18 2020
SMON started with pid=13, OS id=2836 
Wed Jul 15 15:21:18 2020
RECO started with pid=14, OS id=2840 
Wed Jul 15 15:21:18 2020
MMON started with pid=15, OS id=2844 
Wed Jul 15 15:21:18 2020
MMNL started with pid=16, OS id=2848 
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = C:\app\oracle
Wed Jul 15 15:21:19 2020
alter database mount exclusive
Successful mount of redo thread 1, with mount id 1573659759
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount exclusive
alter database open
Beginning crash recovery of 1 threads
Started redo scan
Completed redo scan
 read 118 KB redo, 9 data blocks need recovery
Started redo application at
 Thread 1: logseq 62, block 121
Recovery of Online Redo Log: Thread 1 Group 2 Seq 62 Reading mem 0
  Mem# 0: C:\APP\ORACLE\ORADATA\ORCL\REDO02.LOG
Recovery of Online Redo Log: Thread 1 Group 3 Seq 63 Reading mem 0
  Mem# 0: C:\APP\ORACLE\ORADATA\ORCL\REDO03.LOG
Completed redo application of 0.03MB
Completed crash recovery at
 Thread 1: logseq 63, block 3, scn 738126
 9 data blocks read, 9 data blocks written, 118 redo k-bytes read
LGWR: STARTING ARCH PROCESSES
Wed Jul 15 15:21:23 2020
ARC0 started with pid=20, OS id=3060 
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Wed Jul 15 15:21:23 2020
ARC1 started with pid=21, OS id=3064 
Wed Jul 15 15:21:23 2020
ARC2 started with pid=22, OS id=3068 
Thread 1 advanced to log sequence 64 (thread open)
Wed Jul 15 15:21:23 2020
ARC3 started with pid=23, OS id=2052 
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the 'no FAL' ARCH
ARC0: Becoming the 'no SRL' ARCH
ARC1: Becoming the heartbeat ARCH
Thread 1 opened at log sequence 64
  Current log# 1 seq# 64 mem# 0: C:\APP\ORACLE\ORADATA\ORCL\REDO01.LOG
Successful open of redo thread 1
SMON: enabling cache recovery
Archived Log entry 15 added for thread 1 sequence 63 ID 0x5dc31fed dest 1:
[2864] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:19140 end:19187 diff:47 (0 seconds)
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is KO16MSWIN949
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Wed Jul 15 15:21:24 2020
QMNC started with pid=24, OS id=2540 
Completed: alter database open

6 번째 줄을 보면 db 종료 로그 없이 바로 기동 로그만 나옴

shutdown abort 명령처럼 db에 종료 신호 없이 바로 서버를 종료한것

90 ~ 103 번째 줄을 보면 비정상종료로 인하여 crash recovery를 하는것을 볼 수 있음



결론

Windows Server 2016 서버 정상종료 시 oracle shutdown immediate 명령이 아닌 db를 강제 종료함



참조 :