"오라클 ASM"의 두 판 사이의 차이
DB CAFE
1번째 줄: | 1번째 줄: | ||
− | = ASM 이란?= | + | = ASM 이란? = |
https://docs.oracle.com/cd/E11882_01/server.112/e18951/asm_util001.htm#OSTMG01620 | https://docs.oracle.com/cd/E11882_01/server.112/e18951/asm_util001.htm#OSTMG01620 | ||
57번째 줄: | 57번째 줄: | ||
<source lang=sql> | <source lang=sql> | ||
− | col name format a10 | + | -- col name format a10 |
− | col USABLE_FILE_GB format 999,999.00 | + | -- col USABLE_FILE_GB format 999,999.00 |
− | col TOTAL_GB format 999,999.00 | + | -- col TOTAL_GB format 999,999.00 |
− | col FREE_GB format 999,999.00 | + | -- col FREE_GB format 999,999.00 |
− | col USABLE_CALC_GB format 999,999.00 | + | -- col USABLE_CALC_GB format 999,999.00 |
select group_number "Group#", | select group_number "Group#", | ||
− | |||
name, | name, | ||
− | |||
total_mb/1024 TOTAL_GB, | total_mb/1024 TOTAL_GB, | ||
− | + | round((total_mb - USABLE_FILE_MB)/1024,2) USED_GB, | |
− | |||
− | |||
USABLE_FILE_MB/1024 USABLE_FILE_GB, | USABLE_FILE_MB/1024 USABLE_FILE_GB, | ||
− | + | free_mb/1024 FREE_GB, | |
− | |||
− | |||
100-round(free_mb/total_mb*100) "usgae(%)", | 100-round(free_mb/total_mb*100) "usgae(%)", | ||
((FREE_MB - REQUIRED_MIRROR_FREE_MB))/1024 USABLE_CALC_GB, | ((FREE_MB - REQUIRED_MIRROR_FREE_MB))/1024 USABLE_CALC_GB, |
2019년 12월 4일 (수) 14:52 판
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
목차
1 ASM 이란?[편집]
https://docs.oracle.com/cd/E11882_01/server.112/e18951/asm_util001.htm#OSTMG01620
1.1 ASM Disk 그룹 조회[편집]
SELECT group_number,name,state,total_mb,free_mb
FROM v$asm_diskgroup;
1.2 ASM Disk 조회[편집]
select group_number,disk_number,name,mount_status,path,total_mb
from gv$asm_disk;
1.3 ASM File 조회[편집]
select group_number,file_number,round((bytes/1024/1024),1) MB, redundancy,type
from v$asm_file;
1.4 Disk 그룹/패스 조회[편집]
SELECT g.name DG_NAME, d.path PATH, d.total_mb DISK_SIZE_MB,
g.database_compatibility DB_COMPATIBILITY,
g.compatibility ASM_COMPATIBILITY
FROM v$asm_disk d
, v$asm_diskgroup g
WHERE g.group_number=d.group_number;
1.5 (빅파일) 테이블 스페이스생성[편집]
https://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#OSTMG10205
CREATE BIGFILE TABLESPACE TS_XXX_D01 DATAFILE
SIZE 1G AUTOEXTEND ON NEXT 50M MAXSIZE 30G
LOGGING
DEFAULT
NO INMEMORY
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
1.6 테이블 스페이스 정보 조회[편집]
select group_number
, name
, TOTAL_MB
, FREE_MB
from V$asm_disk_stat;
-- col name format a10
-- col USABLE_FILE_GB format 999,999.00
-- col TOTAL_GB format 999,999.00
-- col FREE_GB format 999,999.00
-- col USABLE_CALC_GB format 999,999.00
select group_number "Group#",
name,
total_mb/1024 TOTAL_GB,
round((total_mb - USABLE_FILE_MB)/1024,2) USED_GB,
USABLE_FILE_MB/1024 USABLE_FILE_GB,
free_mb/1024 FREE_GB,
100-round(free_mb/total_mb*100) "usgae(%)",
((FREE_MB - REQUIRED_MIRROR_FREE_MB))/1024 USABLE_CALC_GB,
type, state
from v$asm_diskgroup;