## 유저정보 (유저생성순으로 맨아래 일반 사용계정만 확인/시스템 및 나머지 옵션 계정은 제외)
select username, created, account_status
from dba_users
order by 2;
## DATA SIZE(GB) 확인 (조건절 owner에 일반 사용자계정 입력)
-- 테이블
select sum(bytes)/power(2,30) "GB"
from dba_segments
where owner in ('username')
and segment_type like 'TABLE%';
-- LOB
select sum(bytes)/power(2,30) "GB"
from dba_segments
where owner in (' username ')
and segment_type like 'LOB%';
-- 인덱스
select sum(bytes)/power(2,30) "GB"
from dba_segments
where owner in (' username ')
and segment_type like 'INDEX%';
## 인덱스 수 확인(타입이 NORMAL = BTREE)
select index_type, count(*)
from dba_indexes
where owner in (' username ')
group by index_type
order by 1;
## 오브젝트 갯수(PL/SQL, VIEW, DB*LINK 등등..)
col owner for a15
col object_type for a15
select object_type, count(*)
from dba_objects
where owner in (' username ')
group by object_type
order by 1,2;
'Database > Oracle' 카테고리의 다른 글
[Oracle] PLSQL Developer에서 sysdba로 접속하기 (0) | 2024.06.25 |
---|---|
[Oracle] Oracle Data Pump - expdp / impdp (0) | 2022.07.12 |
[Oracle] Trigger 상태 확인 (0) | 2022.06.28 |
[Oracle] 테이블(Table) 삭제하기- DROP TABLE (0) | 2022.06.19 |
[Oracle] Column 값 변화 시점 구하기- SQL (0) | 2022.06.13 |
댓글