总体思路:停止集群->进入sqlplus->创建pfile->修改pfile里面参数文件->pfile启动实例->通过pfile创建spfile->启动数据库
引发原因:log_archived_dest_1中的参数写错了,ASM归档里面需要写‘location='+ARCH'',不需要添加其他参数;
1、现象:ORA-16024: parameter LOG_ARCHIVE_DEST_1 cannot be parsed

SQL> !oerr ora 16042
16042, 00000, "user requested cancel immediate of redo apply"
// *Cause: Redo apply was canceled immediately per user request. Processing of
// the current archive log file has been interrupted and, therefore,
// the database is in an inconsistent state.
// *Action: No action is required.
2、解决过程
通过srvctl命令找到spfile文件存在位置
[oracle@rac2 ~]$ srvctl config database -d racdb
Database unique name: racdb
Database name: racdb
Oracle home: /u01/app/oracle/product/19.3.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/RACDB/PARAMETERFILE/spfile.268.1147480897
Password file: +DATA/RACDB/PASSWORD/pwdracdb.256.1147479903
Domain:
Start options: open
Stop options: immediate
停止集群
[oracle@rac2 ~]$ srvctl stop database -d racdb
复制spfile指定到pfile作为临时文件,如果报错可以将ASM中的spfile 'cp +DATA/RACDB/PARAMETERFILE/spfile.268.1147480897 /home/grid' 将spfile更改为oracle用户权限放在/home/oracle下面,sql里面指定'create pfile from spfile='create pfile from spfile='/home/oracle/spfile.268.1147480897'(默认创建完的文件存放在$ORACLE_HOME/dbs/)
单节点操作:
SQL> create pfile from spfile='+DATA/RACDB/PARAMETERFILE/spfile.268.1147480897';
SQL> startup pfile='/home/oracle/initracdb2.ora';
ORACLE instance started.
Total System Global Area 3288331520 bytes
Fixed Size 8901888 bytes
Variable Size 721420288 bytes
Database Buffers 2550136832 bytes
Redo Buffers 7872512 bytes
Database mounted.
Database opened.
SQL> create spfile='+DATA/RACDB/PARAMETERFILE/spfileracdb.ora' from pfile='/home/oracle/initracdb2.ora';
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 3288331520 bytes
Fixed Size 8901888 bytes
Variable Size 721420288 bytes
Database Buffers 2550136832 bytes
Redo Buffers 7872512 bytes
Database mounted.
Database opened.
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/RACDB/PARAMETERFILE/spfileracdb.ora
4、启动另一个节点,查看spfile文件
SQL> startup
ORACLE instance started.
Total System Global Area 3288331520 bytes
Fixed Size 8901888 bytes
Variable Size 721420288 bytes
Database Buffers 2550136832 bytes
Redo Buffers 7872512 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/RACDB/PARAMETERFILE/spfileracdb.ora
完美解决!




