- 问题描述
1,12.1.0.2 RAC环境
2,未使用DBCA建库,直接使用rman备份进行恢复
3,使用ASM存储
在进行spfile创建时报错
SQL> create spfile='+DATADG/orcl/spfileaorcl.ora' from pfile='/home/oracle/pfile.ora';
create spfile='+DATADG/orcl/spfileorcl.ora' from pfile='/home/oracle/pfile.ora'
*
ERROR at line 1:
ORA-17502: ksfdcre:4 Failed to create file +DATADG/orcl/spfileorcl.ora
ORA-15001: diskgroup "DATADG" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
- 分析
1,检查磁盘组状态
sqlplus / as sysasm
SQL> select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DATADG MOUNTED
CRS MOUNTED
RECDG MOUNTED
磁盘状态正常。
2,检查oracle执行文件(网上查到的)
$ cd $ORACLE_HOME/bin
$ ll sqlplus
-rwxr-x--x 1 oracle oinstall 9439 Jul 29 10:38 sqlplus
$ ll oracle
-rwsr-s--x 1 oracle oinstall 324606464 Jul 29 16:15 oracle
发现oracle文件属组为oinstall,而磁盘属组为asmadmin,故无操作权限,因此报错。
- 处理
chown oracle:asmadmin $ORACLE_HOME/bin/oracle
ps:在进行dbca建库时,会对oracle执行文件修改为 oracle:asmadmin 6751 (-rwsr-s–x)