티스토리 뷰
obj_stat.sql
=> 현재 데이터베이스 내에 생성되어 있는 모든 객체의 종류와 개수를 분석하여 출력
col ta format 999,999 heading 'Tables'
col ind format 999,999 heading 'Indexs'
col sy format 999,999 heading 'Synonyms'
col se format 999,999 heading 'Sequences'
col ve format 999,999 heading 'Views'
col clu format 999,999 heading 'Clusters'
col dbl format 999,999 heading 'Database|Links'
col pkg format 999,999 heading 'Packages'
col pkb format 999,999 heading 'Package|Bodies'
col pro format 999,999 heading 'Procedures'
set verify off
compute sum of ta on report
compute sum of ow on report
compute sum of sy on report
compute sum of se on report
compute sum of ind on report
compute sum of ve on report
compute sum of clu on report
compute sum of dbl on report
compute sum of pkg on report
compute sum of pkb on report
compute sum of pro on report
break on report
spool objstat.lst
set heading on
select owner ow,
sum(decode(object_type,'TABLE',1,0)) ta,
sum(decode(object_type,'INDEX',1,0)) ind,
sum(decode(object_type,'SYNONYM',1,0)) sy,
sum(decode(object_type,'SEQUENCE',1,0)) se,
sum(decode(object_type,'VIEW',1,0)) ve,
sum(decode(object_type,'CLUSTER',1,0)) clu,
sum(decode(object_type,'DATABASE LINK',1,0)) dbl,
sum(decode(object_type,'PACKAGE',1,0)) pkg,
sum(decode(object_type,'PACKAGE BODY',1,0)) pkb,
sum(decode(object_type,'PROCEDURE',1,0)) pro
from dba_objects
group by owner
/
prompt
spool off
* db_space.sql
=> 현재 데이터 파일 내에 사용된 공간과 남아 있는 공간이 얼마나 되는지 확인
set pagesize 66
set echo off
set feedback off
set verify off
ttitle 'Disk Usage'
spool db_space.lst
create or replace view tbspace (
tablespace_name, asize, used )
as
select tablespace_name, sum(bytes), 0
from dba_data_files
group by tablespace_name
union
select tablespace_name, 0, sum(bytes)
from dba_extents
group by tablespace_name
/
col col0 format a20 heading 'Tablespace'
col col1 format 999,999 heading 'Size(KB)'
col col2 format 999,999 heading 'Used(KB)'
col col3 format 999,999 heading 'Free(KB)'
select tablespace_name col0,
sum(asize) / (1024*1024) col1,
sum(used) / (1024*1024) col2,
(sum(asize)-sum(used)) / (1024*1024) col3
from tbspace
group by tablespace_name
/
drop view tbspace
/
spool off
'7. Oracle ' 카테고리의 다른 글
오라클 DB 공부해보자! 책이든. 모바일이든.뭐든. (0) | 2019.01.10 |
---|---|
[오라클 튜닝] instance 튜닝4 (0) | 2018.12.13 |
[오라클 튜닝] instance 튜닝2 (0) | 2018.12.13 |
[오라클 튜닝] sql 튜닝 (0) | 2018.12.13 |
ORACLE 트러블 슈팅(성능 고도화 원리와 해법!) (0) | 2018.12.13 |
- Total
- Today
- Yesterday
- K8s
- 스토리지 클레스
- 테라폼
- CVE 취약점 점검
- 코로나19
- directory copy 후 startup 에러
- 오라클 트러블 슈팅(성능 고도화 원리와 해법!)
- 오라클 홈디렉토리 copy 후 startup 에러
- startup 에러
- 설치하기(HP-UX)
- 여러서버 컨트롤
- 오라클
- ubuntu
- Oracle
- [오라클 튜닝] instance 튜닝2
- 튜닝
- 5.4.0.1072
- 우분투
- pod 상태
- 키알리
- 오라클 인스턴트클라이언트(InstantClient) 설치하기(HP-UX)
- 커널
- 버쳐박스
- [오라클 튜닝] sql 튜닝
- 앤시블
- ORACLE 트러블 슈팅(성능 고도화 원리와 해법!)
- 트리이스
- (InstantClient) 설치하기(HP-UX)
- MSA
- 쿠버네티스
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |