标签:
转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/43989607
1、**************************DGMGRL
DGMGRL> show configuration;6 rows selected.
备库被禁用了 prod - Physical standby database (disabled),但可以PHYSICAL STANDBY READ ONLY
分析并解决:
1、查防火墙
vi /etc/seLinux/config
service iptables stop
chkconfig iptables off
chkconfig --list iptables
2、检查参数
*.log_archive_dest_1=‘location="/u01/app/oracle/oradata/PROD1/archive"‘,‘MANDATORY valid_for=(ALL_LOGFILES,ALL_ROLES)‘
*.log_archive_dest_2=‘service="sbdb1"‘,‘ LGWR ASYNC NOAFFIRM delay=0 OPTIONAL compression=DISABLE max_failure=0 max_connections=1 reopen=300 db_unique_name="sbdb1" net_timeout=30 valid_for=(online_logfile,primary_role)‘
dg_config=(SBDB1,prod1)
fal_client=sbdb1
fal_server=prod1
SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01196: file 1 is inconsistent due to a failed media recovery session
ORA-01110: data file 1: ‘/data/oradata/prod/system01.dbf‘
Completed standby crash recovery.
Errors in file /data/oracle/diag/rdbms/prod/prod/trace/prod_ora_13021.trc:
ORA-10458: standby database requires recovery
ORA-01196: file 1 is inconsistent due to a failed media recovery session
ORA-01110: data file 1: ‘/data/oradata/prod/system01.dbf‘
ORA-10458 signalled during: alter database open read only...
Tue Jan 04 17:59:34 2011
Data Guard: Database open failed; restarting redo-apply ...
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVER DISCONNECT USING CURRENT LOGFILE
Attempt to start background Managed Standby Recovery process (prod)
Tue Jan 04 17:59:34 2011
MRP0 started with pid=32, OS id=13081
MRP0: Background Managed Standby Recovery process started (prod)
Serial Media Recovery started
Managed Standby Recovery starting Real Time Apply
Warning: Datafile 1 (/data/oradata/prod/system01.dbf) is infinitely media recovery fuzzy
Standby database will not open with this datafile online!
Warning: Datafile 2 (/data/oradata/prod/sysaux01.dbf) is infinitely media recovery fuzzy
Standby database will not open with this datafile online!
Warning: Datafile 3 (/data/oradata/prod/undotbs01.dbf) is infinitely media recovery fuzzy
Standby database will not open with this datafile online!
Warning: Datafile 4 (/data/oradata/prod/users01.dbf) is infinitely media recovery fuzzy
Standby database will not open with this datafile online!
Warning: Datafile 5 (/data/oradata/prod/haha.dbf) is infinitely media recovery fuzzy
Standby database will not open with this datafile online!
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Waiting for thread 1 sequence 82 (in transit)
Recovery of Online Redo Log: Thread 1 Group 4 Seq 82 Reading mem 0
Mem# 0: /data/oradata/prod/redo04.log
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVER DISCONNECT USING CURRENT LOGFILE
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2220200 bytes
Variable Size 624955224 bytes
Database Buffers 436207616 bytes
Redo Buffers 5554176 bytes
DGMGRL> remove database prod;
Warning: ORA-16620: one or more databases could not be reached for a delete operation
Removed database "prod" from the configuration
DGMGRL> remove database orcl;
Primary database cannot be removed
DGMGRL> remove configuration;
Removed configuration
DGMGRL>
SQL> alter system set dg_broker_start=false;
System altered.
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2220200 bytes
Variable Size 624955224 bytes
Database Buffers 436207616 bytes
Redo Buffers 5554176 bytes
SQL> alter system set dg_broker_start=false;
System altered.
SQL> shutdown immediate;
SQL>Database closed.
SQL>Database dismounted.
SQL>ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2220200 bytes
Variable Size 624955224 bytes
Database Buffers 436207616 bytes
Redo Buffers 5554176 bytes
Database mounted.
Database opened.
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2220200 bytes
Variable Size 624955224 bytes
Database Buffers 436207616 bytes
Redo Buffers 5554176 bytes
Database mounted.
Database opened.
SQL>
删除BROKER:
(1) REMOVE DATABASE PROD1
(2) REMOVE DATABASE SBDB1
(3) REMOVE CONFIGURATION
(4)ALTER SYSTEM SET DG_BROKER_START=FALSE;
(5)shutdown immediate;
(6)startup
(7)alter system switch logfile;
/
/
(8)duplicate target database for standby from active database;
(9)recover managed standby database using current logfile disconnect from session;
(10) 开始配broker
create
add
enable
(11) shutdown immediate;
startup open read only;
(12)startup mount;
alter database flashback on;
(13) alter database open;
OCM 11g升级考试第二场搭建DataGuard遇到: prod - Physical standby database (disabled) 错误
标签:
原文地址:http://blog.csdn.net/guoyjoe/article/details/43989607