RAC資料庫啟用歸檔和閃回的步驟

db_wjw發表於2014-08-17
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;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26194851/viewspace-1252601/,如需轉載,請註明出處,否則將追究法律責任。

相關文章