公司的一套oracle11gRAC(2节点)的数据库,用的存储是ASM,操作系统是RHEL
只有一个控制文件,昨天我准备增加一个控制文件, 在sqlplus 中
alter system set control_files='+DATA/kabiz/controlfile/current.260.797421353, +ARCH/kabiz/controlfile/current.256.797421353' scope=spfile;
运行这个命令后才发现不知道怎么在 ASM下复制新的控制文件,导致数据库不管在nomount,mount状态下都启动不了
(spfile,controlfile,datafile 都在ASM下)
ORA-15124: ASM file name '+DATA/kabiz/controlfile/current.260.797421353, +ARCH/kabiz/controlfile/current.256.797421353' contains an invalid alias name
解决办法:
1. 登录sqlplus,将spfile二进制文件转存为pfile文本文件
SQL> create pfile='/u01/oracle/db_1/dbs/pfile.ora' from spfile='+DATA/KABIZ/spfilekabiz.ora'
2. 修改pfile文件中controlfiles参数指定的控制文件所在位置,查找ASM里的
控制文件可通过asmcmd命令查找
环境变量设置:
export ORACLE_SID=+ASM
export ORACLE_HOME=/u01/oracle/grid
运行asmcmd命令
[oracle@qaora02 dbs]$ asmcmd
ASMCMD> ls
ARCH/
DATA/
ASMCMD> cd DATA
ASMCMD> ls
ASM/
KABIZ/
ASMCMD> cd KABIZ
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfilekabiz.ora
ASMCMD> cd CONTROLFILE
ASMCMD> ls
Current.260.797421353
ASMCMD> pwd
+DATA/KABIZ/CONTROLFILE
ASMCMD>
***************************************************
pfile里部分内容
***************************************************
*.audit_file_dest='/u01/oracle/admin/kabiz/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='+DATA/kabiz/controlfile/Current.260.797421353'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
把oracle环境变量修改回来,
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/oracle/db_1
[oracle@qaora02 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 18 15:18:31 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile=/u01/oracle/db_1/dbs/pfile.ora
ORACLE instance started.
Total System Global Area 3140026368 bytes
Fixed Size 2217464 bytes
Variable Size 2415921672 bytes
Database Buffers 704643072 bytes
Redo Buffers 17244160 bytes
Database mounted.
SQL> show parameter control_file;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA/kabiz/controlfile/curren
t.260.797421353
SQL> alter database open;
SQL> create SPFILE='+DATA/kabiz/spfilekabiz.ora' from pfile='/u01/oracle/db_1/dbs/pfile.ora';
File created.
SQL> shutdown immediate;
SQL> startup;
ORACLE instance started.
Total System Global Area 3140026368 bytes
Fixed Size 2217464 bytes
Variable Size 2415921672 bytes
Database Buffers 704643072 bytes
Redo Buffers 17244160 bytes
Database mounted.
Database opened.
SQL>
©著作权归作者所有:来自51CTO博客作者ontherd的原创作品,如需转载,请注明出处,否则将追究法律责任
asmORA-15124
共同学习,写下你的评论
评论加载中...
作者其他优质文章