配置ADG 产生ORA-10458错误

在配置oracle11g active dataguard 时,启动备库数据库提示如下信息,

SQL> startup force
ORACLE instance started.


Total System Global Area  776646656 bytes
Fixed Size                  2257272 bytes
Variable Size             507514504 bytes
Database Buffers          260046848 bytes
Redo Buffers                6828032 bytes
Database mounted.
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oracle/database/oradata/inds1/system01.dbf'


下面,我们看看这几个ORA 信息的解释

[oracle@node02 trace]$ oerr ora 01110
01110, 00000, "data file %s: '%s'"
// *Cause:  Reporting file name for details of another error. The reported
//          name can be of the old file if a data file move operation is
//          in progress.
// *Action: See associated error message.

[oracle@node02 trace]$ oerr ora 01152
01152, 00000, "file %s was not restored from a sufficiently old backup "
// *Cause:  An incomplete recovery session was started, but an insufficient
//         number of logs were applied to make the database consistent. This
//         file is still in the future of the last log applied. The most
//         likely cause of this error is forgetting to restore the file
//         from a backup before doing incomplete recovery.
// *Action: Either apply more logs until the database is consistent or
//         restore the database file from an older backup and repeat recovery.

[oracle@node02 trace]$ oerr ora 10458
10458, 00000, "standby database requires recovery"
// *Cause:  A standby database was in a state requiring media recovery
//          when an attempt was made to open the standby database.
// *Action: Perform the necessary recovery and open the standby database.
//

也就说 standby database 不能够进行介质回复,我们再次检查参数设置  log_archive_dest_2

在Primay database 查询  LOG_ARCHIVE_DEST_2


SQL> show parameter LOG_ARCHIVE_DEST_2

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
log_archive_dest_2                   string                 SERVICE=INDS1 SYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=INDS2
                                                            
 
在standby database查询 LOG_ARCHIVE_DEST_2

SQL> show parameter LOG_ARCHIVE_DEST_2

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
log_archive_dest_2                   string                 SERVICE=INDS2 SYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=INDS1



参数值 SERVICE=INDS1 是错误的,需要在primary database 设置未SERVICE=INDS2 , 因为我们在tnsname.ora 文件中设置了INDS2为standby database 的 net service . 
同时在standby database 修改参数log_archive_dest_2。


The SERVICE attribute, which is a mandatory attribute for a redo transport destination, must be the first attribute specified in the attribute list. The SERVICE attribute is used to specify the Oracle Net service name used to connect to the redo transport destination. The service name must be resolvable through an Oracle Net naming method to an Oracle Net connect descriptor that matches the Oracle Net listener(s) at the redo transport destination. The connect descriptor must specify that a dedicated server connection be used, unless that is the default connection type for the redo transport destination.                                             


最后,分别重新设置primary database 和standby database参数

--primary database
 alter system set log_archive_dest_2='SERVICE=INDS2 SYNC NOAFFIRM   VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=INDS2' scope=both;

--standby database
 alter system set log_archive_dest_2='SERVICE=INDS1 SYNC NOAFFIRM   VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=INDS1' scope=both;

最后 分别重启实例,standby可以正常启动,应该

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;


SQL> select process, client_process, sequence#, status from v$managed_standby;


PROCESS            CLIENT_PROCESS    SEQUENCE# STATUS
------------------ ---------------- ---------- ------------------------
ARCH               ARCH                      0 CONNECTED
ARCH               ARCH                      0 CONNECTED
ARCH               ARCH                      0 CONNECTED
ARCH               ARCH                      0 CONNECTED
ARCH               ARCH                      0 CONNECTED
ARCH               ARCH                     10 CLOSING
ARCH               ARCH                      0 CONNECTED
ARCH               ARCH                      0 CONNECTED
RFS                UNKNOWN                   0 IDLE
RFS                ARCH                      0 IDLE
MRP0               N/A                      11 APPLYING_LOG


PROCESS            CLIENT_PROCESS    SEQUENCE# STATUS
------------------ ---------------- ---------- ------------------------
RFS                LGWR                     11 IDLE
RFS                UNKNOWN                   0 IDLE


13 rows selected.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27039319/viewspace-2135189/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27039319/viewspace-2135189/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值