一、问题描述
dg环境扩容表空间新增的数据文件部分没有传到备库上去,报ORA-16136: Managed Standby Recovery not active
生产环境oracle dataguard不同步处理过程分享
二、分析及处理过程:
2.1 备库上查看v$managed_standby
SQL> select process,status,sequence# from v$managed_standby;
PROCESS STATUS SEQUENCE#
ARCH CLOSING 114516
ARCH CLOSING 114517
ARCH CONNECTED 0
ARCH CLOSING 114518
RFS IDLE 0
RFS WRITING 114519
RFS IDLE 0
7 rows selected.
从上面的输出,可以看出,缺少MRP0进程。
2.2 确认报错信息
SQL> alter database recover managed standby database;
alter database recover managed standby database
*
ERROR at line 1:
ORA-00283: recovery session canceled due to errors
ORA-01111: name for data file 14 is unknown - rename to correct file
ORA-01110: data file 14:
'/data/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00014'
ORA-01157: cannot identify/lock data file 14 - see DBWR trace file
ORA-01111: name for data file 14 is unknown - rename to correct file
ORA-01110: data file 14:
'/data/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00014'
从上面的输出可以看出是14号文件的问题
2.3 备库重新创建14号文件
14号文件本次表空间扩容新增的数据文件。
alter system set standby_file_management=manual;
alter database create datafile '/data/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00014' as '/data/app/oracle/newdata/dataqiye_data9.dbf'
alter system set standby_file_management=auto;
2.4 再次查看警告日志文件
started logmerger process
Tue Jan 30 13:31:35 2018
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 8 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Waiting for thread 1 sequence 114456
Fetching gap sequence in thread 1, gap sequence 114456-114459
Completed: alter database recover managed standby database disconnect from session
Tue Jan 30 13:33:26 2018
FAL[client]: Failed to request gap sequence
GAP - thread 1 sequence 114456-114459
DBID 1477707379 branch 949967087
FAL[client]: All defined FAL servers have been attempted.
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that's sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
日志出现断档,从主库的归档备份中恢复序列号是 sequence 114456-114459的归档日志。
大型站长资讯类网站! https://www.0857zz.com