暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

ORA-16024归档引发宕机故障

原创 Wow! 2024-02-02
77

总体思路:停止集群->进入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


完美解决!










最后修改时间:2024-02-02 15:19:20
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论