dataguard备库开启闪回

环境:

OS:Centos 7

DB:18C 2节点RAC的ADG

 

下面的操作在rac的一个节点上执行即可

 

1.检查闪回是否开启
SQL> select flashback_on from V$database;

FLASHBACK_ON
------------------
NO

 

2.查看当前是否设置了闪回的相关参数
SQL> show parameters db_recovery_file_dest;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +DATA
db_recovery_file_dest_size big integer 16224M

默认是一天
SQL> show parameters db_flashback_retention_target

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target integer 1440
SQL>


若是没有设置,那么如下命令设置
SQL> alter system set db_recovery_file_dest_size=16G scope=both;
SQL> alter system set db_recovery_file_dest='+DATA' scope=both;
SQL> alter systemset db_flashback_retention_target=1440;

 


3.退出日志应用
SQL> alter database recover managed standby database cancel;

Database altered.

 


4.开启闪回
SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog; ##已经开启了归档就不需要执行
SQL> alter database flashback on;
SQL> alter database open;

 

5.重新应用日志
SQL> alter database recover managed standby database using current logfile disconnect from session;

6.打开pdb
SQL> alter pluggable database all open;

Pluggable database altered.

 

7.查看闪回情况
SQL> select flashback_on from V$database;

FLASHBACK_ON
------------------
YES

posted @ 2021-07-29 17:05  slnngk  阅读(318)  评论(0编辑  收藏  举报