# 기존 DB에서처럼 Parameter파일을
생성해주시면
됩니다.(create pfile from spfile;)
SPFILE이 2개의 Diskgroup에
그대로
존재
하는데
어떤 SPFILE을
보고
올라올지
궁금하였는데
테스트
결과
새로
생성해준(=가장
최근에
생성된) SPFILE을
바라보고 ASM이 Start 되는
것으로
보였습니다.
Diskgroup 간의
이동이
필요할
때
적용하시면
됩니다.
1. ASM 접속하여 SPFILE 위치
확인
[oracle@11g-single-asm ~]$ . oraenv
ORACLE_SID = [SASM1] ? +ASM
The Oracle base has been changed from /u01/app/oracle to /u01/app/grid
[oracle@11g-single-asm ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Fri Dec 4 08:00:53 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Automatic Storage Management option
SQL> show parameter spfile
NAME TYPE VALUE
———————————— ———– ——————————
spfile string +CRS/asm/asmparameterfile/regi
stry.253.894893135
2. SPFILE을 PFILE로
만들어 LOCAL에
저장
SQL> create pfile=’/tmp/pfile+ASM.ora’ from spfile;
File created.
3. PFILE을
이용하여 SPFILE을 ASM영역에
생성
SQL> create spfile=’+DATA’ from pfile=’/tmp/pfile+ASM.ora’;
File created.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Automatic Storage Management option
4. HAS(or CRS) 재기동
[oracle@11g-single-asm ~]$ su –
암호:
[root@11g-single-asm ~]# cd /u01/app/grid/product/11.2.0.4/grid/bin/
[root@11g-single-asm bin]# ./crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ’11g-single-asm’
CRS-2673: Attempting to stop ‘ora.CRS.dg’ on ’11g-single-asm’
CRS-2673: Attempting to stop ‘ora.racdb.db’ on ’11g-single-asm’
CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ’11g-single-asm’
CRS-2677: Stop of ‘ora.racdb.db’ on ’11g-single-asm’ succeeded
CRS-2673: Attempting to stop ‘ora.DATA.dg’ on ’11g-single-asm’
CRS-2677: Stop of ‘ora.DATA.dg’ on ’11g-single-asm’ succeeded
CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ’11g-single-asm’ succeeded
CRS-2677: Stop of ‘ora.CRS.dg’ on ’11g-single-asm’ succeeded
CRS-2679: Attempting to clean ‘ora.CRS.dg’ on ’11g-single-asm’
CRS-2681: Clean of ‘ora.CRS.dg’ on ’11g-single-asm’ succeeded
CRS-2673: Attempting to stop ‘ora.asm’ on ’11g-single-asm’
CRS-2677: Stop of ‘ora.asm’ on ’11g-single-asm’ succeeded
CRS-2673: Attempting to stop ‘ora.cssd’ on ’11g-single-asm’
CRS-2677: Stop of ‘ora.cssd’ on ’11g-single-asm’ succeeded
CRS-2673: Attempting to stop ‘ora.evmd’ on ’11g-single-asm’
CRS-2677: Stop of ‘ora.evmd’ on ’11g-single-asm’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ’11g-single-asm’ has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@11g-single-asm bin]# ./crsctl start has
CRS-4123: Oracle High Availability Services has been started.
[root@11g-single-asm bin]# exit
Logout
5. ASM 인스턴스에서 SPFILE의
위치
확인
[oracle@11g-single-asm ~]$ echo $ORACLE_SID
+ASM
[oracle@11g-single-asm ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Fri Dec 4 08:15:21 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Automatic Storage Management option
SQL> show parameter spfile
NAME TYPE VALUE
———————————— ———– ——————————
spfile string +DATA/asm/asmparameterfile/reg
istry.253.897552133
SQL> select name, state from v$asm_diskgroup;
NAME STATE
—————————— ———–
DATA MOUNTED
CRS MOUNTED
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Automatic Storage Management option]
6. 기존 SPFILE 삭제
[oracle@11g-single-asm ~]$ asmcmd -p
ASMCMD [+] > ls
CRS/
DATA/
ASMCMD [+] > cd crs
ASMCMD [+crs] > ls
ASM/
ASMCMD [+crs] > cd asm
ASMCMD [+crs/asm] > ls
ASMPARAMETERFILE/
ASMCMD [+crs/asm] > cd asmparameterfile
ASMCMD [+crs/asm/asmparameterfile] > ls
REGISTRY.253.894893135
ASMCMD [+crs/asm/asmparameterfile] > rm REGISTRY.253.894893135
ASMCMD [+crs/asm/asmparameterfile] > ls
ASMCMD-8002: entry ‘asm’ does not exist in directory ‘+crs/’
ASMCMD [+crs/asm/asmparameterfile] >