oracle11g adg主库RESOLVABLE GAP

 admin   2024-12-18 16:14   59 人阅读  23 条评论
SQL> set linesize 500
SQL> select open_mode,database_role,switchover_status from v$database;

OPEN_MODE                                DATABASE_ROLE                    SWITCHOVER_STATUS
---------------------------------------- -------------------------------- ----------------------------------------
READ WRITE                               PRIMARY                          RESOLVABLE GAP

是因为之前备库密码文件有问题导致了gap

把redolog刷新到备库

主库是rac,需要把其他节点关闭,把操作的这个节点启动到mount状态
执行完毕后,要先关闭此实例,再启动所有实例,否则在打开此实例,再打开其它实例会报如下报错
ORA-01183: cannot mount database in SHARED mode

SQL> ALTER SYSTEM FLUSH REDO TO 'orcl';
ALTER SYSTEM FLUSH REDO TO 'orcl'
*
ERROR at line 1:
ORA-01105: mount is incompatible with mounts by other instances


SQL> ALTER SYSTEM FLUSH REDO TO 'orcl';
ALTER SYSTEM FLUSH REDO TO 'orcl'
*
ERROR at line 1:
ORA-01105: mount is incompatible with mounts by other instances


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 2421825536 bytes
Fixed Size                  2255632 bytes
Variable Size             654312688 bytes
Database Buffers         1744830464 bytes
Redo Buffers               20426752 bytes
Database mounted.
这里报错是因为备库没有开启同步
SQL> ALTER SYSTEM FLUSH REDO TO 'orcl';
ALTER SYSTEM FLUSH REDO TO 'orcl'
*
ERROR at line 1:
ORA-16447: Redo apply was not active at the target standby database

备库开启同步
SQL> alter database recover managed standby database disconnect from session;

Database altered.

重新刷新
SQL> ALTER SYSTEM FLUSH REDO TO 'orcl';

System altered.

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2421825536 bytes
Fixed Size                  2255632 bytes
Variable Size             654312688 bytes
Database Buffers         1744830464 bytes
Redo Buffers               20426752 bytes
Database mounted.
Database opened.

刷新后,主库先关闭,在开启,

本文地址:https://liuchunjie.top/?id=786
版权声明:本文为原创文章,版权归 admin 所有,欢迎分享本文,转载请保留出处!

 发表评论


表情

 评论列表