DB/Oracle Administrator

데이터파일, 테이블스페이스 정보 확인 SQL

soccerda 2012. 7. 6. 01:17
반응형
 
backup
1
2
3
4
5
6
7
8
9
10
set linesize 100
set pagesize 50
col name for a40
col file# for 99
col status for a15
col time for a20
select a.file#, a.name, b.status, to_char(b.time,'RRRR-MM-DD:HH24:MI:SS') as time
from v$datafile a, v$backup b
where a.file#=b.file#



datafile
1
2
3
4
5
6
7
8
9
10
set linesize 100
set pagesize 50
col tablespace_name for a15
col mb for 999
col status for a10
col file_name for a40
select tablespace_name, bytes/1024/1024 mb, status, file_name
from dba_data_files
order by 4


테이블스페이스
1
2
3
4
5
6
7
8
9
10
11
set linesize 100
set pagesize 50
col tablespace_name for a15
col status for a10
col contents for a15
col segment_space_management for a10
col extent_management for a10
select tablespace_name, status, contents, segment_space_management, extent_management
from dba_tablespaces


로그파일
1
2
3
4
5
6
7
8
9
10
11
12
13
14
set linesize 100
set pagesize 50
col group# for 99
col member for a40
col mb for 999
col status for a10
col archived for a10
col sequence# for 9999
select a.group#, b.member, a.bytes/1024/1024 MB, a.status, a.archived, a.sequence#
from v$log a, v$logfile b
where a.group#=b.group#
order by 1,2


템프파일
1
2
3
4
5
6
7
8
9
10
set linesize 100
set pagesize 50
col tablespace_name for a15
col mb for 999
col file_name for a40
select tablespace_name, bytes/1024/1024 mb, file_name
from dba_temp_files


반응형