--------------------------------------------------------------------------------
Local Machine Information::
Hostname: oratest
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 12c 12.2.0.1.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch (online) 25415713: applied on Thu May 03 09:52:36 CST 2018
Unique Patch ID: 21399806
Created on 19 Jul 2017, 19:55:08 hrs PST8PDT
Bugs fixed:
25415713
--------------------------------------------------------------------------------
OPatch succeeded.
二、清理备库redo
DG备库中的日志大量增长,其中有ORA-19527和ORA-312可以按以下方案处理
注意:本操在备库操作,禁止在主库清理online redo
1.确认为spfile启动的数据库并备份
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u02/oracle/product/db12cr2/db
s/spfileora12c.ora
SQL> create pfile from spfile;
File created.
2.确认主备online redo位置
SQL> select MEMBER from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u02/datafile/ora12c/redo01.log
/u02/datafile/ora12c/redo02.log
/u02/datafile/ora12c/redo03.log
3.确认并修改参数
SQL> show parameter log_file_name_convert
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_file_name_convert string
SQL> alter system set log_file_name_convert = '/u02/datafile/ora12c','/u02/datafile/ora12c' scope=spfile;
System altered.
SQL>
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 1644167168 bytes
Fixed Size 8793352 bytes
Variable Size 553648888 bytes
Database Buffers 1073741824 bytes
Redo Buffers 7983104 bytes
Database mounted.
\SQL> show parameter log_file_name_convert
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_file_name_convert string /u02/datafile/ora12c, /u02/dat
afile/ora12c
如果使用了pfile,则在文本文件中修改,并重启数据库!
*.log_file_name_convert = '/xxxx/xxxx','/xxxx/xxxx'
4. 执行如下命令清空备库上所有的日志组
SQL>alter database clear logfile group 1;
SQL>alter database clear logfile group 2;
SQL>alter database clear logfile group 3;
SQL>alter database clear logfile group 4;
SQL>alter database clear logfile group 5; ---- 有几组online则都清理掉
5. 检查v$log 视图确认日志文件的状态和大小
SQL> select group#,thread#,bytes/1024/1024 mb ,status from v$log; ---- status下全部为UNUSED
6.打开备库日志应用
alter database open read only;
alter database recover managed standby database using current logfile disconnect from session;