
AWR(Automatic Workload Repository)
sysaux ํ ์ด๋ธ ์คํ์ด์ค
SYS @ ora19dw > @?/rdbms/admin/awrrpt.sql
report_type์ ๊ฐ์ ์
๋ ฅํ์ญ์์ค: html
๊ตฌ 1: select 'Type Specified: ',lower(nvl('&&report_type','html')) report_type from dual
์ 1: select 'Type Specified: ',lower(nvl('html','html')) report_type from dual
Type Specified: html
๊ตฌ 1: select '&&report_type' report_type_def from dual
์ 1: select 'html' report_type_def from dual
๊ตฌ 1: select '&&view_loc' view_loc_def from dual
์ 1: select 'AWR_PDB' view_loc_def from dual
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance Container Name
-------------- -------------- -------------- -------------- --------------
1004651910 ORA19DW 1 ora19dw ora19dw
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ ---------- --------- ---------- ------
* 1004651910 1 ORA19DW ora19dw ora19c
Using 1004651910 for database Id
Using 1 for instance number
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.
num_days์ ๊ฐ์ ์
๋ ฅํ์ญ์์ค: ๊ทธ๋ฅ ์ํฐ์น์ธ์
Listing all Completed Snapshots
Instance DB Name Snap Id Snap Started Snap Level
------------ ------------ ---------- ------------------ ----------
ora19dw ORA19DW 5 29 8์ 2025 14:10 1
6 29 8์ 2025 16:27 1
7 01 9์ 2025 10:30 1
8 01 9์ 2025 12:00 1
9 01 9์ 2025 13:00 1
10 01 9์ 2025 14:00 1
11 01 9์ 2025 15:00 1
12 01 9์ 2025 16:00 1
13 01 9์ 2025 17:00 1
14 02 9์ 2025 16:26 1
15 05 9์ 2025 12:18 1
16 05 9์ 2025 13:00 1
17 05 9์ 2025 14:00 1
18 05 9์ 2025 15:00 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
begin_snap์ ๊ฐ์ ์
๋ ฅํ์ญ์์ค:
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ ---------- --------- ---------- ------
* 1004651910 1 ORA19DW ora19dw ora19c
Using 1004651910 for database Id
Using 1 for instance number
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.
num_days์ ๊ฐ์ ์
๋ ฅํ์ญ์์ค:
Listing all Completed Snapshots
Instance DB Name Snap Id Snap Started Snap Level
------------ ------------ ---------- ------------------ ----------
ora19dw ORA19DW 5 29 8์ 2025 14:10 1
6 29 8์ 2025 16:27 1
7 01 9์ 2025 10:30 1
8 01 9์ 2025 12:00 1
9 01 9์ 2025 13:00 1
10 01 9์ 2025 14:00 1
11 01 9์ 2025 15:00 1
12 01 9์ 2025 16:00 1
13 01 9์ 2025 17:00 1
14 02 9์ 2025 16:26 1
15 05 9์ 2025 12:18 1
16 05 9์ 2025 13:00 1
17 05 9์ 2025 14:00 1
18 05 9์ 2025 15:00 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
begin_snap์ ๊ฐ์ ์
๋ ฅํ์ญ์์ค: 17
end_snap์ ๊ฐ์ ์
๋ ฅํ์ญ์์ค: 18
๋ชจ๋ฐํ ์์ html ํ์ผ ๋ค์ด๋ฐ๊ณ ์ด์ด๋ณด๋ฉด ๋จ

exec dbms_workload_repository.create_snapshot;
select snap_id, begin_interval_time, end_interval_time
from dba_hist_snapshot
order by snap_id asc;
SYS @ ora19dw > connect scott/tiger
์ฐ๊ฒฐ๋์์ต๋๋ค.
SCOTT @ ora19dw >
SCOTT @ ora19dw > select count(*)
from emp, emp, emp, emp, emp, emp, emp, emp, emp, emp, emp;


๋ง์ฐ์ค ์ฐํด๋ฆญ - kill session ํ๋ฉด
putty์ top์์ 28913๋ฒ์ด ์ฌ๋ผ์ง

ใด SQL Statistics ํด๋ฆญ

exec dbms_workload_repository.create_snapshot;
select snap_id, begin_interval_time, end_interval_time
from dba_hist_snapshot
order by snap_id asc;

SYS @ ora19dw > connect hr/hr
์ฐ๊ฒฐ๋์์ต๋๋ค.
HR @ ora19dw > select count(*)
2 from employees, employees, employees, employees, employees, employees, employees, employees, employees;


SYS @ ora19dw > create tablespace ts50
2 datafile '/u01/app/oracle/oradata/ORA19DW/ts50.dbf' size 10m;
ํ
์ด๋ธ์คํ์ด์ค๊ฐ ์์ฑ๋์์ต๋๋ค.
SYS @ ora19dw > alter database default tablespace ts50;
๋ฐ์ดํ๋ฒ ์ด์ค๊ฐ ๋ณ๊ฒฝ๋์์ต๋๋ค.
SYS @ ora19dw >
SYS @ ora19dw > create temporary tablespace temp200
2 tempfile '/u01/app/oracle/oradata/ORA19DW/temp200.dbf' size 10m;
ํ
์ด๋ธ์คํ์ด์ค๊ฐ ์์ฑ๋์์ต๋๋ค.
SYS @ ora19dw > alter database default temporary tablespace temp200;
๋ฐ์ดํ๋ฒ ์ด์ค๊ฐ ๋ณ๊ฒฝ๋์์ต๋๋ค.

SYS @ ora19dw > select *
2 from database_properties
3 where property_name in ('DEFAULT_PERMANENT_TABLESPACE', 'DEFAULT_TEMP_TABLESPACE');
PROPERTY_NAME
--------------------------------------------------------------------------------
PROPERTY_VALUE
--------------------------------------------------------------------------------
DESCRIPTION
--------------------------------------------------------------------------------
DEFAULT_PERMANENT_TABLESPACE
TS50
Name of default permanent tablespace
DEFAULT_TEMP_TABLESPACE
TEMP200
Name of default temporary tablespace
PROPERTY_NAME
--------------------------------------------------------------------------------
PROPERTY_VALUE
--------------------------------------------------------------------------------
DESCRIPTION
--------------------------------------------------------------------------------

SYS @ ora19dw > alter system set db_recovery_file_dest_size=20g;
์์คํ
์ด ๋ณ๊ฒฝ๋์์ต๋๋ค.
[oracle@ora19c ~]$ export ORACLE_SID=ora19dw
[oracle@ora19c ~]$
[oracle@ora19c ~]$ rman target /
๋ณต๊ตฌ ๊ด๋ฆฌ์: Release 19.0.0.0.0 - Production on ์ 9์ 8 09:50:35 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
๋์ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ ์๋จ: ORA19DW(DBID=1004651910)
RMAN> delete archivelog all;
[oracle@ora19c ~]$ cd /u01/app/oracle/oradata
[oracle@ora19c oradata]$ ls
ORA19 ORA19DW
[oracle@ora19c oradata]$
[oracle@ora19c oradata]$ rm -rf ORA19
[oracle@ora19c oradata]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.8G 0 3.8G 0% /dev/shm
tmpfs 3.8G 9.3M 3.8G 1% /run
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/mapper/ol-root 44G 32G 13G 71% /
/dev/sda1 1014M 234M 781M 23% /boot
tmpfs 768M 0 768M 0% /run/user/1000
tmpfs 768M 12K 768M 1% /run/user/42
[oracle@ora19c oradata]$ sysdw
SQL*Plus: Release 19.0.0.0.0 - Production on ์ 9์ 8 09:53:09 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
๋ค์์ ์ ์๋จ:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SYS @ ora19dw >