내맘대로긍정이 알려주는
Oracle 23ai 신기능
무료 세미나 발표자료
OS환경 : Oracle Linux 7.6 (64bit)
DB 환경 : Oracle Database 19.3.0.0
방법 : 오라클 19c ASH 리포트 수집 방법
ASH 리포트는 2가지 타입으로 출력할수 있음
'html' HTML format (default)
'text' Text format
html 타입이 기본값이고 text 형식으로도 출력이 가능함
이 게시글에선 ASH 리포트를 수집하는 방법을 설명함
sqlplus 접속
1
|
$ sqlplus / as sysdba
|
ASH 리포트 수집
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
순서1. ASH 리포트 출력용 sql 실행
SQL> @?/rdbms/admin/ashrpt.sql
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
순서2. ASH 리포트 출력 타입 입력, 엔터 입력시 기본값인 html 타입으로 선택됨
Enter value for report_type: html (ASH 리포트 출력 타입 입력)
Type Specified: html
old 1: select '&&report_type' report_type_def from dual
new 1: select 'html' report_type_def from dual
old 1: select '&&view_loc' view_loc_def from dual
new 1: select 'AWR_PDB' view_loc_def from dual
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
3209222764 ORACLE19 1 oracle19
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ ---------- --------- ---------- ------
* 3209222764 1 ORACLE19 oracle19 oel7
Defaults to current database
Using database id: 3209222764
Enter instance numbers. Enter 'ALL' for all instances in a
RAC cluster or explicitly specify list of instances (e.g., 1,2,3).
Defaults to current instance.
Using instance number(s): 1
ASH Samples in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Oldest ASH sample available: 07-Jan-20 02:00:09 [ ###### mins in the past]
Latest ASH sample available: 30-Jan-24 13:28:24 [ 0 mins in the past]
Specify the timeframe to generate the ASH report
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter begin time for report:
-- Valid input formats:
-- To specify absolute begin time:
-- [MM/DD[/YY]] HH24:MI[:SS]
-- Examples: 02/23/03 14:30:15
-- 02/23 14:30:15
-- 14:30:15
-- 14:30
-- To specify relative begin time: (start with '-' sign)
-- -[HH24:]MI
-- Examples: -1:15 (SYSDATE - 1 Hr 15 Mins)
-- -25 (SYSDATE - 25 Mins)
Defaults to -15 mins
순서3. ASH 리포트를 보려는 시작 시간 입력([MM/DD[/YY]] HH24:MI[:SS])
Enter value for begin_time: 01/30/24 13:20:00 (ASH 리포트를 보려는 시작 시간 입력)
Report begin time specified: 01/30/24 13:20:00
Enter duration in minutes starting from begin time:
Defaults to SYSDATE - begin_time
Press Enter to analyze till current time
순서4. ASH 리포트를 보려는 종료 시간 입력(분)
ex) 10입력시 시작시간에서 10분뒤까지의 ASH 리포트를 출력함 Enter value for duration: 10 (ASH 리포트를 보려는 종료 시간 입력(분))
Report duration specified: 10
Using 30-Jan-24 13:20:00 as report begin time
Using 30-Jan-24 13:30:00 as report end time
Specify Slot Width (using ashrpti.sql) for 'Activity Over Time' section
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Explanation:
-- In the 'Activity Over Time' section of the ASH report,
-- the analysis period is divided into smaller slots
-- and top wait events are reported in each of those slots.
-- Default:
-- The analysis period will be automatically split upto 10 slots
-- complying to a minimum slot width of
-- 1 minute, if the source is V$ACTIVE_SESSION_HISTORY or
-- 5 minutes, if the source is AWR_(PDB/ROOT)_ACTIVE_SESS_HISTORY.
Specify Slot Width in seconds to use in the 'Activity Over Time' section:
Defaults to a value as explained above:
Slot Width specified:
Specify Report Targets (using ashrpti.sql) to generate the ASH report
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Explanation:
-- ASH Report can accept "Report Targets",
-- like a particular SQL statement, or a particular SESSION,
-- to generate the report on. If one or more report targets are
-- specified, then the data used to generate the report will only be
-- the ASH samples that pertain to ALL the specified report targets.
-- Default:
-- If none of the report targets are specified,
-- then the target defaults to all activity in the database instance.
Specify SESSION_ID (eg: from V$SESSION.SID) report target:
Defaults to NULL:
SESSION report target specified:
Specify SQL_ID (eg: from V$SQL.SQL_ID) report target:
Defaults to NULL: (% and _ wildcards allowed)
SQL report target specified:
Specify WAIT_CLASS name (eg: from V$EVENT_NAME.WAIT_CLASS) report target:
[Enter 'CPU' to investigate CPU usage]
Defaults to NULL: (% and _ wildcards allowed)
WAIT_CLASS report target specified:
Specify SERVICE_HASH (eg: from V$ACTIVE_SERVICES.NAME_HASH) report target:
Defaults to NULL:
SERVICE report target specified:
Specify MODULE name (eg: from V$SESSION.MODULE) report target:
Defaults to NULL: (% and _ wildcards allowed)
MODULE report target specified:
Specify ACTION name (eg: from V$SESSION.ACTION) report target:
Defaults to NULL: (% and _ wildcards allowed)
ACTION report target specified:
Specify CLIENT_ID (eg: from V$SESSION.CLIENT_IDENTIFIER) report target:
Defaults to NULL: (% and _ wildcards allowed)
CLIENT_ID report target specified:
Specify PLSQL_ENTRY name (eg: "SYS.DBMS_LOB.*") report target:
Defaults to NULL: (% and _ wildcards allowed)
PLSQL_ENTRY report target specified:
Specify CONTAINER name (eg: NAME from V$PDBS) report target:
Defaults to NULL: (% and _ wildcards allowed)
CONTAINER report target specified:
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is ashrpt_1_0130_1330.html. To use this name,
press to continue, otherwise enter an alternative.
순서5. ASH 리포트의 출력 파일명 입력, 엔터 입력시 위에 있는 ashrpt_1_0130_1330.html 기본 이름으로 저장됨
(나의 경우 시작날짜_시간_종료날짜_시간_ashrpt_sid.html 로 지정함)
Enter value for report_name: 20240130_1320_20240130_1330_ashrpt_oracle19.html
Using the report name 20240130_1320_20240130_1330_ashrpt_oracle19.html
Summary of All User Input
-------------------------
Format : HTML
DB Id : 3209222764
Inst num : 1
Begin time : 30-Jan-24 13:20:00
End time : 30-Jan-24 13:30:00
Slot width : Default
Report targets : 0
Report name : 20240130_1320_20240130_1330_ashrpt_oracle19.html
.
.
(ASH 리포트 생성중)
.
.
End of Report
Report written to 20240130_1320_20240130_1330_ashrpt_oracle19.html
완료됨
|
출력파일 로컬 pc나 gui를 볼수있는 화면에서 실행해서 ASH 리포트 확인
ASH 리포트 출력파일 샘플
text 타입
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
|
$ cat 20240130_1320_20240130_1330_ashrpt_oracle19.txt
ASH Report For ORACLE19/oracle19
DB Name DB Id Instance Inst Num Release RAC Host
------------ ----------- ------------ -------- ----------- --- ------------
ORACLE19 3209222764 oracle19 1 19.0.0.0.0 NO oel7
CPUs SGA Size Buffer Cache Shared Pool ASH Buffer Size
---- ------------------ ------------------ ------------------ ------------------
2 1,024M (100%) 252M (24.6%) 264M (25.8%) 4.0M (0.4%)
In-memory Area Size
------------------
0.0M (0.0%)
Analysis Begin Time: 30-Jan-24 13:20:00
Analysis End Time: 30-Jan-24 13:30:00
Elapsed Time: 10.0 (mins)
Begin Data Source: V$ACTIVE_SESSION_HISTORY
End Data Source: V$ACTIVE_SESSION_HISTORY
Sample Count: 77
Average Active Sessions: 0.13
Avg. Active Session per CPU: 0.06
Report Target: None specified
Top User Events DB/Inst: ORACLE19/oracle19 (Jan 30 13:20 to 13:30)
No data exists for this section of the report.
-------------------------------------------------------------
Top Background Events DB/Inst: ORACLE19/oracle19 (Jan 30 13:20 to 13:30)
Avg Active
Event Event Class % Activity Sessions
----------------------------------- --------------- ---------- ----------
CPU + Wait for CPU CPU 90.91 0.12
control file parallel write System I/O 7.79 0.01
DIAG idle wait Idle 1.30 0.00
-------------------------------------------------------------
|
html 타입
리포트 수집 방법 및 AWR 관련 링크
오라클 19c AWR 란 ( https://positivemh.tistory.com/1013 )
오라클 19c AWR 리포트 수집 방법 ( https://positivemh.tistory.com/1012 )
오라클 19c ASH 리포트 수집 방법 ( https://positivemh.tistory.com/1011 )
오라클 19c AWR 비교 리포트 수집 방법 ( https://positivemh.tistory.com/1014 )
오라클 19c AWR 에 저장된 정보 확인(awrinfo.sql) ( https://positivemh.tistory.com/780 )
오라클 19c AWR 데이터 export 방법 ( https://positivemh.tistory.com/836 )
오라클 무료 모니터링 툴 ASH Viewer 설치 가이드 ( https://positivemh.tistory.com/966 )
참조 :
https://docs.oracle.com/en/database/oracle/oracle-database/19/tgdba/gathering-database-statistics.html#GUID-56AEF38E-9400-427B-A818-EDEC145F7ACD
https://www.oracle.com/technetwork/oem/grid-control/overview/con9715-bestkeptsecrets-2806698.pdf
https://docs.oracle.com/en/database/oracle/oracle-database/19/tgdba/analyzing-sampled-data.html#GUID-A40B1029-D042-41B6-B596-C77BDCEC722B
https://docs.oracle.com/en/database/oracle/oracle-database/19/tgdba/measuring-database-performance.html#GUID-270E36D0-D7D7-4235-8280-CA3EDD68F8E6
'ORACLE > Admin' 카테고리의 다른 글
오라클 19c AWR 란 (0) | 2024.01.30 |
---|---|
오라클 19c AWR 리포트 수집 방법 (0) | 2024.01.30 |
오라클 19c 인덱스 생성시 nologging 옵션 속도 차이 확인 (0) | 2024.01.28 |
오라클 19c sqlplus spool 파일명에 날짜 넣는 방법 (0) | 2024.01.26 |
오라클 19c 파티션 테이블 DDL 작업 시 인덱스 영향도 확인 (0) | 2024.01.25 |