ORA-10456: cannot open standby database; media recovery session may be in progress

1. ADG数据库没有打开

SQL> @check
select * from sys.test01 where rowid in(select max(rowid) from sys.test01)
                  *
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only


SELECT dt from sys.checkadg where id =1
                   *
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only



SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-10456: cannot open standby database; media recovery session may be in
progress

SQL>

2. 操作步骤:

# 先在从库停止standby
SQL> alter database recover managed standby database cancel;

Database altered.


SQL> alter database open;

Database altered.


# 启动日志应用
SQL> alter database recover managed standby database using current logfile disconnect;

Database altered.

SQL> 

3. 测试ADG

SQL> @check

FILE_NAME
--------------------------------------------------------------------------------
2019-11-24 13:30:46


DT
------------------------------------------------------------
2019-11-24 14:04:47

SQL> select max(sequence#),thread# from v$archived_log where RESETLOGS_CHANGE# = (SELECT RESETLOGS_CHANGE# FROM V$DATABASE_INCARNATION WHERE STATUS = 'CURRENT') GROUP BY THREAD#;

MAX(SEQUENCE#)    THREAD#
-------------- ----------
    188142      1
    108461      2

SQL> 

SQL> set line 999
SQL> set tab off
SQL> select name, value from v$dataguard_stats;

NAME                             VALUE
-------------------------------- ----------------------------------------------------------------
transport lag                    +00 00:00:00
apply lag                        +00 00:00:00
apply finish time                +00 00:00:00.000
estimated startup time           26

SQL> 

4. 其他

SQL> set tab off
SQL> show parameter fal;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
fal_client                           string
fal_server                           string      orcldg


SQL> alter database recover managed standby database using current logfile disconnect from session;
点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注