본론
나중에 사용할 script에 대한 설명과 script를 모아둠
002
Name
|
|
Description
|
|
Script
|
|
Result
|
|
===============================================
000
Name
|
log.sql
|
Description
|
db 내의 redo logfile 의 번호,크기,시퀀스,상태를 보여준다
|
Script
|
set line 200
col group# for 999
col mb for 999
col member for a45
col seq# for 999
col status for a8
col arc for a5
SELECT a.group# , a.member , b.bytes/1024/1024 MB
, b.sequence# "SEQ#",b.status
FROM v$logfile a,v$log b
WHERE 1=1
AND a.group#=b.group#
ORDER
BY 1,2;
|
Result
|
GROUP#
MEMBER MB SEQ# STATUS
------
--------------------------------------------- ---- ---- --------
1
/u01/app/oracle/oradata/orcl/redo01.log 50
16 INACTIVE
2
/u01/app/oracle/oradata/orcl/redo02.log 50
17 INACTIVE
3
/u01/app/oracle/oradata/orcl/redo03.log 50
18 CURRENT
|
001
Name
|
|
Description
|
RMAN으로 진행되는
BACKUP에 대해 진행상황과 얼마나 남았는지 알수 있는 Query
|
Script
|
select sid,serial#
, context , sofar , totalwork, round(sofar/totalwork*100,2)
"%_COMPLETE"
from v$session_longops
where 1=1
and opname not like 'RMAN%'
and totalwork !=0
and sofar <> totalwork
|
Result
|
1)No rows selected
작업 완료 2)결과도출 작업중 |
002
Name
|
Tbs_info.sql
|
Description
|
현재 TBS이름,MB,File
경로를 표시해주는 Script
|
Script
|
set line 200
col
tablespace_name for a15
col MB for 99999
col file_name for
a60
SELECT
tablespace_name , bytes/1024/1024 MB ,file_name FROM dba_data_files;
|
Result
|
TABLESPACE_NAME MB FILE_NAME
---------------
------ ------------------------------------------------------------
USERS 6
/u01/app/oracle/oradata/orcl/users01.dbf
UNDOTBS1 50
/u01/app/oracle/oradata/orcl/undotbs01.dbf
SYSAUX 540
/u01/app/oracle/oradata/orcl/sysaux01.dbf
SYSTEM 750
/u01/app/oracle/oradata/orcl/system01.dbf
EXAMPLE
326
/u01/app/oracle/oradata/orcl/example01.dbf
TEST 10
/u01/app/oracle/oradata/orcl/test001.dbf
USERS 5
/u01/app/oracle/oradata/orcl/users02.dbf
RTEST 10
/u01/app/oracle/oradata/orcl/rtest01.dbf
8 rows selected.
|
댓글 없음:
댓글 쓰기