系统:centos 7.9 64位
数据库:oracle 11.2.0.4 64位
环境:rac(双节点) + dg
问题描述:搭建dg处理联机&standby日志文件的log_file_name_convert参数时,由于少添加“/”,造成联机日志文件未到指定目录路径下.
正确设置:
'+DATA/orcl/onlinelog/','/u01/app/oracle/oradata/','+FRA/orcl/onlinelog/','/u01/app/oracle/oradata/'
错误设置:
'+DATA/orcl/onlinelog/','/u01/app/oracle/oradata','+FRA/orcl/onlinelog/','/u01/app/oracle/oradata'
异常现象:
SQL> select t2.thread#,t1.group#,t1.member,t2.bytes/1024/1024 from v$logfile t1,v$log t2 where t1.group#=t2.group# order by 1,2;

THREAD# GROUP# MEMBER T2.BYTES/1024/1024
---------- ---------- ------------------------------------------------------------ ------------------
1 1 /u01/app/oracle/oradatagroup_1.257.1117373983 50
1 1 /u01/app/oracle/oradatagroup_1.257.1117373983 50
1 2 /u01/app/oracle/oradatagroup_2.258.1117373983 50
1 2 /u01/app/oracle/oradatagroup_2.258.1117373983 50
2 3 /u01/app/oracle/oradatagroup_3.265.1117375589 50
2 3 /u01/app/oracle/oradatagroup_3.259.1117375589 50
2 4 /u01/app/oracle/oradatagroup_4.266.1117375589 50
2 4 /u01/app/oracle/oradatagroup_4.260.1117375589 50

8 rows selected.

SQL> select a.thread#,a.group#,b.member,b.type,a.bytes/1024/1024 MB from v$standby_log a,v$logfile b where a.group#=b.group#;

THREAD# GROUP# MEMBER TYPE MB
---------- ---------- -------------------------------------------------- ------- ----------
1 10 /u01/app/oracle/oradatastandby10.log STANDBY 50
1 10 /u01/app/oracle/oradatastandby10b.log STANDBY 50
1 11 /u01/app/oracle/oradatastandby11.log STANDBY 50
1 11 /u01/app/oracle/oradatastandby11b.log STANDBY 50
1 12 /u01/app/oracle/oradatastandby12.log STANDBY 50
1 12 /u01/app/oracle/oradatastandby12b.log STANDBY 50
2 13 /u01/app/oracle/oradatastandby13.log STANDBY 50
2 13 /u01/app/oracle/oradatastandby13b.log STANDBY 50
2 14 /u01/app/oracle/oradatastandby14.log STANDBY 50
2 14 /u01/app/oracle/oradatastandby14b.log STANDBY 50
2 15 /u01/app/oracle/oradatastandby15.log STANDBY 50
2 15 /u01/app/oracle/oradatastandby15b.log STANDBY 50
说明:可以看到redo日志文件应为” /u01/app/oracle/oradata/group_1.257.1117373983”,standby日志文件应为“/u01/app/oracle/oradata/standby10.log”,其它类似.

以下演示在dg环境下修改主备库redo log和standby log.
1、主库redo
先处理主库redo联机文件.
SQL> select group#,thread#,sequence#,members,status,archived from v$log;

GROUP# THREAD# SEQUENCE# MEMBERS STATUS ARC
---------- ---------- ---------- ---------- ---------------- ---
1 1 77 2 CURRENT YES
2 1 76 2 CLEARING YES
3 2 5 2 CLEARING YES
4 2 6 2 CURRENT YES
取消备库实时应用,设置主备库standby_file_management为manual.
备库操作:
SQL> alter database recover managed standby database cancel;

Database altered.
SQL> alter system set standby_file_management=manual;

System altered.
主库节点1操作:
SQL> alter system set standby_file_management=manual sid='*';

System altered.
SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 CURRENT
2 1 INACTIVE
3 2 INACTIVE
4 2 CURRENT
说明:oracle数据库归档必须要剩两组redo log,所以先添加一组新redo log,在删除状态为inactive的redo log.

SQL> select t2.thread#,t1.group#,t1.member,t2.bytes/1024/1024 from v$logfile t1,v$log t2 where t1.group#=t2.group# order by 1,2

THREAD# GROUP# MEMBER T2.BYTES/1024/1024
---------- ---------- ------------------------------------------------------------ ------------------
1 1 +DATA/orcl/onlinelog/group_1.257.1117373983 50
1 1 +FRA/orcl/onlinelog/group_1.257.1117373983 50
1 2 +DATA/orcl/onlinelog/group_2.258.1117373983 50
1 2 +FRA/orcl/onlinelog/group_2.258.1117373983 50
2 3 +DATA/orcl/onlinelog/group_3.265.1117375589 50
2 3 +FRA/orcl/onlinelog/group_3.259.1117375589 50
2 4 +DATA/orcl/onlinelog/group_4.266.1117375589 50
2 4 +FRA/orcl/onlinelog/group_4.260.1117375589 50

8 rows selected.

SQL> alter database add logfile thread 1 group 5 ('+DATA/orcl/onlinelog/redo05.log','+FRA/orcl/onlinelog/redo05.log') size 50m reuse;

Database altered.
SQL> alter database add logfile thread 2 group 6 ('+DATA/orcl/onlinelog/redo06.log','+FRA/orcl/onlinelog/redo06.log') size 50m reuse;

Database altered.

SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 CURRENT
2 1 INACTIVE
3 2 INACTIVE
4 2 CURRENT
5 1 UNUSED
6 2 UNUSED

6 rows selected.
SQL> alter database drop logfile group 2;

Database altered.

SQL> alter database drop logfile group 3;

Database altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 INACTIVE
4 2 INACTIVE
5 1 CURRENT
6 2 CURRENT

SQL> alter database add logfile thread 1 group 2 ('+DATA/orcl/onlinelog/redo02.log','+FRA/orcl/onlinelog/redo02.log') size 50m reuse;

Database altered.

SQL> alter database add logfile thread 2 group 3 ('+DATA/orcl/onlinelog/redo03.log','+FRA/orcl/onlinelog/redo03.log') size 50m reuse;

Database altered.

SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 INACTIVE
2 1 UNUSED
3 2 UNUSED
4 2 INACTIVE
5 1 CURRENT
6 2 CURRENT

6 rows selected.

SQL> alter database drop logfile group 1;

Database altered.

SQL> alter database drop logfile group 4;

Database altered.

SQL> alter database add logfile thread 1 group 1 ('+DATA/orcl/onlinelog/redo01.log','+FRA/orcl/onlinelog/redo01.log') size 50m reuse;

Database altered.

SQL> alter database add logfile thread 2 group 4 ('+DATA/orcl/onlinelog/redo04.log','+FRA/orcl/onlinelog/redo04.log') size 50m reuse;

Database altered.

SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 UNUSED
2 1 UNUSED
3 2 UNUSED
4 2 UNUSED
5 1 CURRENT
6 2 CURRENT

6 rows selected.

SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 CURRENT
2 1 UNUSED
3 2 UNUSED
4 2 UNUSED
5 1 INACTIVE
6 2 CURRENT

6 rows selected.

SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 INACTIVE
2 1 CURRENT
3 2 UNUSED
4 2 UNUSED
5 1 INACTIVE
6 2 CURRENT

6 rows selected.
主库节点2操作:
SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.
主库节点1操作:
SQL> r
1* select group#,thread#,status from v$log

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 INACTIVE
2 1 CURRENT
3 2 CURRENT
4 2 UNUSED
5 1 INACTIVE
6 2 INACTIVE

6 rows selected.

SQL> alter database drop logfile group 5;

Database altered.

SQL> alter database drop logfile group 6;

Database altered.

SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 INACTIVE
2 1 CURRENT
3 2 CURRENT
4 2 UNUSED
SQL> select t2.thread#,t1.group#,t1.member,t2.bytes/1024/1024 from v$logfile t1,v$log t2 where t1.group#=t2.group# order by 1,2;

THREAD# GROUP# MEMBER T2.BYTES/1024/1024
---------- ---------- ----------------------------------- ------------------
1 1 +DATA/orcl/onlinelog/redo01.log 50
1 1 +FRA/orcl/onlinelog/redo01.log 50
1 2 +DATA/orcl/onlinelog/redo02.log 50
1 2 +FRA/orcl/onlinelog/redo02.log 50
2 3 +DATA/orcl/onlinelog/redo03.log 50
2 3 +FRA/orcl/onlinelog/redo03.log 50
2 4 +DATA/orcl/onlinelog/redo04.log 50
2 4 +FRA/orcl/onlinelog/redo04.log 50

8 rows selected.
小结:主库redo file成功修改.

2、备库redo
修改备库redo log文件.备库redo log无法直接删除,需先设置log_file_name_conver参数.
备库操作:
SQL> create pfile from spfile;

File created.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
主备库关闭监听,阻止文件传输.
[oracle@hisdbdg ~]$ lsnrctl stop
[grid@hisdb1 ~]$ srvctl stop listener
备库修改pfile后以pfile文件启动数据库
[oracle@hisdbdg dbs]$ vi initorcldg.ora
将log_file_name_convert中的redo转换按如下修改,添加“/”.
'+DATA/orcl/onlinelog/','/u01/app/oracle/oradata/','+FRA/orcl/onlinelog/','/u01/app/oracle/oradata/'
备库操作:
SQL> startup nomount pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initorcldg.ora';
ORACLE instance started.

Total System Global Area 1586708480 bytes
Fixed Size 2253624 bytes
Variable Size 989859016 bytes
Database Buffers 587202560 bytes
Redo Buffers 7393280 bytes
SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> show parameter standby

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_archive_dest string ?/dbs/arch
standby_file_management string MANUAL
SQL> select group#,status from v$log;

GROUP# STATUS
---------- ----------------
1 CLEARING
2 CURRENT
3 CURRENT
4 CLEARING
SQL> set line 200
SQL> select a.thread#,a.group#,b.member,b.type,a.bytes/1024/1024 MB from v$log a,v$logfile b where a.group#=b.group#
union all
select a.thread#,a.group#,b.member,b.type,a.bytes/1024/1024 MB from v$standby_log a,v$logfile b where a.group#=b.group#;

THREAD# GROUP# MEMBER TYPE MB
---------- ---------- -------------------------------------------------- ------- ----------
1 1 /u01/app/oracle/oradata/group_1.257.1117373983 ONLINE 50
1 1 /u01/app/oracle/oradata/group_1.257.1117373983 ONLINE 50
1 2 /u01/app/oracle/oradata/group_2.258.1117373983 ONLINE 50
1 2 /u01/app/oracle/oradata/group_2.258.1117373983 ONLINE 50
2 3 /u01/app/oracle/oradata/group_3.265.1117375589 ONLINE 50
2 3 /u01/app/oracle/oradata/group_3.259.1117375589 ONLINE 50
2 4 /u01/app/oracle/oradata/group_4.266.1117375589 ONLINE 50
2 4 /u01/app/oracle/oradata/group_4.260.1117375589 ONLINE 50
1 10 /u01/app/oracle/oradatastandby10.log STANDBY 50
1 10 /u01/app/oracle/oradatastandby10b.log STANDBY 50
1 11 /u01/app/oracle/oradatastandby11.log STANDBY 50

THREAD# GROUP# MEMBER TYPE MB
---------- ---------- -------------------------------------------------- ------- ----------
1 11 /u01/app/oracle/oradatastandby11b.log STANDBY 50
1 12 /u01/app/oracle/oradatastandby12.log STANDBY 50
1 12 /u01/app/oracle/oradatastandby12b.log STANDBY 50
2 13 /u01/app/oracle/oradatastandby13.log STANDBY 50
2 13 /u01/app/oracle/oradatastandby13b.log STANDBY 50
2 14 /u01/app/oracle/oradatastandby14.log STANDBY 50
2 14 /u01/app/oracle/oradatastandby14b.log STANDBY 50
2 15 /u01/app/oracle/oradatastandby15.log STANDBY 50
2 15 /u01/app/oracle/oradatastandby15b.log STANDBY 50

20 rows selected.
SQL> alter database add logfile thread 1 group 5 ('/u01/app/oracle/oradata/redo5.log','/u01/app/oracle/oradata/redo5B.log') size 50m reuse;

Database altered.
SQL> alter database add logfile thread 2 group 6 ('/u01/app/oracle/oradata/redo6.log','/u01/app/oracle/oradata/redo6B.log') size 50m reuse;

Database altered.
SQL> select group#,status from v$log;

GROUP# STATUS
---------- ----------------
1 CLEARING
2 CURRENT
3 CURRENT
4 CLEARING
5 UNUSED
6 UNUSED

6 rows selected.
说明:clear后再drop.
SQL> alter database clear logfile group 1;

Database altered.

SQL> alter database clear logfile group 4;

Database altered.

SQL> alter database drop logfile group 1;

Database altered.

SQL> alter database drop logfile group 4;

Database altered.
SQL> select group#,status from v$log;

GROUP# STATUS
---------- ----------------
2 CURRENT
3 CURRENT
5 UNUSED
6 UNUSED

SQL> alter database add logfile thread 1 group 1 ('/u01/app/oracle/oradata/redo1.log','/u01/app/oracle/oradata/redo1B.log') size 50m reuse;

Database altered.

SQL> alter database add logfile thread 2 group 4 ('/u01/app/oracle/oradata/redo4.log','/u01/app/oracle/oradata/redo4B.log') size 50m reuse;

Database altered.

SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 UNUSED
2 1 CURRENT
3 2 CLEARING
4 2 UNUSED
5 1 UNUSED
6 2 UNUSED

6 rows selected.
接着处理group 2,group 3.
[oracle@hisdbdg dbs]$ lsnrctl start
[grid@hisdb1 ~]$ srvctl start listener
备库操作:
SQL> select a.thread#,a.group#,b.member,b.type,a.bytes/1024/1024 MB from v$log a,v$logfile b where a.group#=b.group#
union all
select a.thread#,a.group#,b.member,b.type,a.bytes/1024/1024 MB from v$standby_log a,v$logfile b where a.group#=b.group#

THREAD# GROUP# MEMBER TYPE MB
---------- ---------- ------------------------------------------------------------ ------- ----------
1 1 /u01/app/oracle/oradata/redo1.log ONLINE 50
1 1 /u01/app/oracle/oradata/redo1B.log ONLINE 50
1 2 /u01/app/oracle/oradata/group_2.258.1117373983 ONLINE 50
1 2 /u01/app/oracle/oradata/group_2.258.1117373983 ONLINE 50
2 3 /u01/app/oracle/oradata/group_3.265.1117375589 ONLINE 50
2 3 /u01/app/oracle/oradata/group_3.259.1117375589 ONLINE 50
2 4 /u01/app/oracle/oradata/redo4.log ONLINE 50
2 4 /u01/app/oracle/oradata/redo4B.log ONLINE 50
1 5 /u01/app/oracle/oradata/redo5.log ONLINE 50
1 5 /u01/app/oracle/oradata/redo5B.log ONLINE 50
2 6 /u01/app/oracle/oradata/redo6.log ONLINE 50

THREAD# GROUP# MEMBER TYPE MB
---------- ---------- ------------------------------------------------------------ ------- ----------
2 6 /u01/app/oracle/oradata/redo6B.log ONLINE 50
1 10 /u01/app/oracle/oradatastandby10.log STANDBY 50
1 10 /u01/app/oracle/oradatastandby10b.log STANDBY 50
1 11 /u01/app/oracle/oradatastandby11.log STANDBY 50
1 11 /u01/app/oracle/oradatastandby11b.log STANDBY 50
1 12 /u01/app/oracle/oradatastandby12.log STANDBY 50
1 12 /u01/app/oracle/oradatastandby12b.log STANDBY 50
2 13 /u01/app/oracle/oradatastandby13.log STANDBY 50
2 13 /u01/app/oracle/oradatastandby13b.log STANDBY 50
2 14 /u01/app/oracle/oradatastandby14.log STANDBY 50
2 14 /u01/app/oracle/oradatastandby14b.log STANDBY 50

THREAD# GROUP# MEMBER TYPE MB
---------- ---------- ------------------------------------------------------------ ------- ----------
2 15 /u01/app/oracle/oradatastandby15.log STANDBY 50
2 15 /u01/app/oracle/oradatastandby15b.log STANDBY 50

24 rows selected.
SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 UNUSED
2 1 CURRENT
3 2 CLEARING
4 2 CURRENT
5 1 UNUSED
6 2 UNUSED

6 rows selected.
主库节点1操作:
SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.
说明:主库切换日志直到备库group 2、group 3状态为clearing.
备库操作:
SQL> select group#,thread#,status from v$log;

GROUP# THREAD# STATUS
---------- ---------- ----------------
1 1 CURRENT
2 1 CLEARING
3 2 CLEARING
4 2 CURRENT
5 1 UNUSED
6 2 UNUSED

6 rows selected.
SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database clear logfile group 2;

Database altered.

SQL> alter database clear logfile group 3;

Database altered.

SQL> alter database drop logfile group 2;

Database altered.

SQL> alter database drop logfile group 3;

Database altered.

SQL> alter database add logfile thread 1 group 2 ('/u01/app/oracle/oradata/redo2.log','/u01/app/oracle/oradata/redo2B.log') size 50m reuse;

Database altered.

SQL> alter database add logfile thread 2 group 3 ('/u01/app/oracle/oradata/redo3.log','/u01/app/oracle/oradata/redo3B.log') size 50m reuse;

Database altered.

SQL> alter database drop logfile group 5;

Database altered.

SQL> alter database drop logfile group 6;

Database altered.
SQL> select a.thread#,a.group#,b.member,b.type,a.bytes/1024/1024 MB from v$log a,v$logfile b where a.group#=b.group#
union all
select a.thread#,a.group#,b.member,b.type,a.bytes/1024/1024 MB from v$standby_log a,v$logfile b where a.group#=b.group#;

THREAD# GROUP# MEMBER TYPE MB
---------- ---------- ------------------------------------------------------------ ------- ----------
1 1 /u01/app/oracle/oradata/redo1.log ONLINE 50
1 1 /u01/app/oracle/oradata/redo1B.log ONLINE 50
1 2 /u01/app/oracle/oradata/redo2.log ONLINE 50
1 2 /u01/app/oracle/oradata/redo2B.log ONLINE 50
2 3 /u01/app/oracle/oradata/redo3.log ONLINE 50
2 3 /u01/app/oracle/oradata/redo3B.log ONLINE 50
2 4 /u01/app/oracle/oradata/redo4.log ONLINE 50
2 4 /u01/app/oracle/oradata/redo4B.log ONLINE 50
1 10 /u01/app/oracle/oradatastandby10.log STANDBY 50
1 10 /u01/app/oracle/oradatastandby10b.log STANDBY 50
1 11 /u01/app/oracle/oradatastandby11.log STANDBY 50

THREAD# GROUP# MEMBER TYPE MB
---------- ---------- ------------------------------------------------------------ ------- ----------
1 11 /u01/app/oracle/oradatastandby11b.log STANDBY 50
1 12 /u01/app/oracle/oradatastandby12.log STANDBY 50
1 12 /u01/app/oracle/oradatastandby12b.log STANDBY 50
2 13 /u01/app/oracle/oradatastandby13.log STANDBY 50
2 13 /u01/app/oracle/oradatastandby13b.log STANDBY 50
2 14 /u01/app/oracle/oradatastandby14.log STANDBY 50
2 14 /u01/app/oracle/oradatastandby14b.log STANDBY 50
2 15 /u01/app/oracle/oradatastandby15.log STANDBY 50
2 15 /u01/app/oracle/oradatastandby15b.log STANDBY 50

20 rows selected.
小结:备库redo log文件成功修改.

3、备库standby log
现处理备库standby log,直接删除后重建.
确保RFS进程为关闭状态.
SQL> select process,status from v$managed_standby;

PROCESS STATUS
--------- ------------
ARCH CONNECTED
ARCH CONNECTED
ARCH CONNECTED
ARCH CONNECTED
SQL> alter database drop logfile group 10;

Database altered.

SQL> alter database drop logfile group 11;

Database altered.

SQL> alter database drop logfile group 12;

Database altered.

SQL> alter database drop logfile group 13;

Database altered.

SQL> alter database drop logfile group 14;

Database altered.

SQL> alter database drop logfile group 15;

Database altered.
SQL> alter database add standby logfile thread 1 group 10 ('/u01/app/oracle/oradata/standby10.log','/u01/app/oracle/oradata/standby10B.log') size 50m;

Database altered.

SQL> alter database add standby logfile thread 1 group 11 ('/u01/app/oracle/oradata/standby11.log','/u01/app/oracle/oradata/standby11B.log') size 50m;

Database altered.

SQL> alter database add standby logfile thread 1 group 12 ('/u01/app/oracle/oradata/standby12.log','/u01/app/oracle/oradata/standby12B.log') size 50m;

Database altered.

SQL> alter database add standby logfile thread 2 group 13 ('/u01/app/oracle/oradata/standby13.log','/u01/app/oracle/oradata/standby13B.log') size 50m;

Database altered.

SQL> alter database add standby logfile thread 2 group 14 ('/u01/app/oracle/oradata/standby14.log','/u01/app/oracle/oradata/standby14B.log') size 50m;

Database altered.

SQL> alter database add standby logfile thread 2 group 15 ('/u01/app/oracle/oradata/standby15.log','/u01/app/oracle/oradata/standby15B.log') size 50m;

Database altered.
SQL> set lines 200 pages 9999 long 5000
SQL> col member for a80
SQL> select a.thread#,a.group#,b.member,b.type,a.bytes/1024/1024 MB from v$log a,v$logfile b where a.group#=b.group#
union all
select a.thread#,a.group#,b.member,b.type,a.bytes/1024/1024 MB from v$standby_log a,v$logfile b where a.group#=b.group#;

THREAD# GROUP# MEMBER TYPE MB
---------- ---------- -------------------------------------------------------------------------------- ------- ----------
1 1 /u01/app/oracle/oradata/redo1.log ONLINE 50
1 1 /u01/app/oracle/oradata/redo1B.log ONLINE 50
1 2 /u01/app/oracle/oradata/redo2.log ONLINE 50
1 2 /u01/app/oracle/oradata/redo2B.log ONLINE 50
2 3 /u01/app/oracle/oradata/redo3.log ONLINE 50
2 3 /u01/app/oracle/oradata/redo3B.log ONLINE 50
2 4 /u01/app/oracle/oradata/redo4.log ONLINE 50
2 4 /u01/app/oracle/oradata/redo4B.log ONLINE 50
1 10 /u01/app/oracle/oradata/standby10.log STANDBY 50
1 10 /u01/app/oracle/oradata/standby10B.log STANDBY 50
1 11 /u01/app/oracle/oradata/standby11.log STANDBY 50
1 11 /u01/app/oracle/oradata/standby11B.log STANDBY 50
1 12 /u01/app/oracle/oradata/standby12.log STANDBY 50
1 12 /u01/app/oracle/oradata/standby12B.log STANDBY 50
2 13 /u01/app/oracle/oradata/standby13.log STANDBY 50
2 13 /u01/app/oracle/oradata/standby13B.log STANDBY 50
2 14 /u01/app/oracle/oradata/standby14.log STANDBY 50
2 14 /u01/app/oracle/oradata/standby14B.log STANDBY 50
2 15 /u01/app/oracle/oradata/standby15.log STANDBY 50
2 15 /u01/app/oracle/oradata/standby15B.log STANDBY 50

20 rows selected.
[oracle@hisdbdg dbs]$ lsnrctl start
SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

SQL> alter system set standby_file_management=auto;

System altered.
主库操作:
SQL> show parameter standby

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_archive_dest string ?/dbs/arch
standby_file_management string MANUAL
SQL> alter system set standby_file_management=auto sid='*';

System altered.

结论:主备库redo&standby log文件均已成功修改.最后记得备库生成spfile,然后以spfile重启数据库.
参考网址:https://codeleading.com/article/90542859240/