💡 ASM의 장점
- 오라클이 알아서 디스크의 스토리지를 관리
- DBA나 시스템 관리자가 실수로 오라클 파일을 삭제할 가능성이 낮아짐
- 데이터 이행 시 디스크만 빼서 새로운 서버에 붙이기만 하면 끝남

- 새로운 디스크를 추가할 때 서버를 끄지 않아도 됨
[실습1] asmcmd 를 이용해서 오라클 파일들을 엑세스하기
[orcl:~]$ vi .bash_profile
alias sys='export $ORACLE_SID=orcl; sqlplus / as sysdba'
[orcl:~]$ source .bash_profile
[orcl:~]$ sys
SQL*Plus: Release 11.2.0.1.0 Production on Wed Sep 17 13:54:32 2025
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> @tablespace
TABLESPACE FILE_NAME
USERS +DATA/orcl/datafile/users.259.796857625
UNDOTBS1 +DATA/orcl/datafile/undotbs1.258.796857625
SYSAUX +DATA/orcl/datafile/sysaux.257.796857623
SYSTEM +DATA/orcl/datafile/system.256.796857621
EXAMPLE +DATA/orcl/datafile/example.265.796857803
TS01 +DATA/orcl/datafile/ts01.267.1212062749
6 rows selected.
[orcl:~]$ . oraenv
ORACLE_SID = [orcl] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle
[+ASM:~]$
[+ASM:~]$ asmcmd
ASMCMD>
ASMCMD>
ASMCMD> pwd
+
ASMCMD> ls
DATA/
FRA/
ASMCMD> cd data
ASMCMD> ls
ASM/
ORCL/
ASMCMD> cd orcl
ASMCMD> pwd
+data/orcl
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfileorcl.ora
ASMCMD>
ASMCMD> cd datafile
ASMCMD> pwd
+data/orcl/datafile
ASMCMD>
ASMCMD> ls
EXAMPLE.265.796857803
SYSAUX.257.796857623
SYSTEM.256.796857621
TS01.267.1212062749
UNDOTBS1.258.796857625
USERS.259.796857625
ASMCMD>
문제1. control file 이 있는 위치로 이동하시오
SQL> select name from v$controlfile;
NAME
+DATA/orcl/controlfile/current.260.796857737
+FRA/orcl/controlfile/current.256.796857739
[orcl:~]$ . oraenv
ORACLE_SID = [orcl] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle
[+ASM:~]$ asmcmd
ASMCMD> cd data
ASMCMD> ls
ASM/
ORCL/
ASMCMD> cd orcl
ASMCMD> cd controlfile
ASMCMD> ls
Current.260.796857737
ASMCMD>
ASMCMD>