1、RAC数据库调整为归档模式步骤:
SQL> alter system set cluster_database=false scope=spfile sid='orcl1'; SQL> alter system set db_recovery_file_dest='+ORAFLASH' scope=spfile; SQL> alter system set db_recovery_file_dest_size=20g scope=spfile; $ srvctl stop database -d orcl $ sqlplus / as sysdba; SQL> startup mount; SQL> alter database archivelog; SQL> alter system set cluster_database=true scope=spfile sid='orcl1'; SQL> shutdown immediate; $ srvctl start database -d orcl SQL> select name,log_mode,flashback_on from v$database; |
2、RAC数据库启动闪回特性步骤:
确认数据已经运行在归档模式中:
SQL> archive log list; SQL> alter system set cluster_database=false scope=spfile sid='orcl1'; SQL> alter system set db_recovery_file_dest='+ORAFLASH' scope=spfile; SQL> alter system set db_recovery_file_dest_size=20g scope=spfile; $ srvctl stop database -d orcl SQL> startup mount; SQL> alter database flashback on; SQL> alter system set cluster_database=true scope=spfile sid='orcl1'; SQL> shutdown immediate; $ srvctl start database -d orcl |
注意:可以根据需要为特定的表空间打开或关闭闪回:
SQL> alter tablespace users flashback on;
SQL> alter tablespace users flashback off;
SQL> select name,log_mode,flashback_on from v$database;