Oracle11gR2 RAC環境歸檔模式的配置案例一則
在10g及以前的資料庫版本,將非歸檔的RAC資料庫改成歸檔的RAC資料庫,需要將cluster_database先設定為false,然後按單例項的設定歸檔方法。
在10gR2中和11g,不再需要將cluster_database設定為false,將非歸檔的RAC資料庫改成歸檔的RAC資料庫,方法與單例項設定歸檔模式是一樣的。
如下是Linux上11g的配置過程:
先關閉節點2的例項:
[root@dbserv2 ~]# su - oracle
-bash-3.2$ sqlplus / as sysdba
SQL> show parameter db_reco
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +FRADG
db_recovery_file_dest_size big integer 8388608
db_recovery_file_dest_size太小,需要配置大一點兒。如果db_recovery_file_dest的也沒有值可以透過如下命令配置
alter system set db_recovery_file_dest='/home/oracle/flash' scope=spfile; --/home/oracle/flash看具體情況而定。
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
在節點1上開始配置操作:
[root@dbserv1 ~]# su - oracle
-bash-3.2$ sqlplus / as sysdba
SQL> alter system set db_recovery_file_dest_size=900G;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
SQL> alter database archivelog;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 12202
Next log sequence to archive 12203
Current log sequence 12203
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
SQL> alter system switch logfile;
System altered.
SQL> alter system archive log current;
System altered.
SQL> show parameter db_reco
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +FRADG
db_recovery_file_dest_size big integer 900G
SQL> exit
啟動節點2的例項:
SQL> startup mount
ORACLE instance started.
Database mounted.
SQL> alter system set db_recovery_file_dest_size=900G; --感覺這一步驟也是沒有必要的
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 10919
Next log sequence to archive 0
Current log sequence 10920
SQL> alter database open;
Database altered.
在作業系統層面切換grid使用者後,檢視是否生成歸檔日誌;
歸檔的預設生成位置為 db_recovery_file_dest/instance_name/archivelog/date/下:
-bash-3.2$ su - grid
口令:
[grid@dbserv1 ~]$ asmcmd
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED NORMAL N 512 4096 1048576 29299 28373 9767 9303 0 Y CRS_DG/
MOUNTED EXTERN N 512 4096 1048576 3145725 1459524 0 1459524 0 N DATADG/
MOUNTED EXTERN N 512 4096 1048576 2217980 2122735 0 2122735 0 N FRADG/
ASMCMD> cd fradg
ASMCMD> cd testdb
ASMCMD> ls
ARCHIVELOG/
CONTROLFILE/
ONLINELOG/
TEMPFILE/
ASMCMD> cd archivelog
ASMCMD> ls
2013_07_10/
ASMCMD> cd 2013_07_10
ASMCMD> ls
thread_1_seq_12203.266.820417985
thread_1_seq_12204.269.820418287
thread_2_seq_10919.264.820417835
thread_2_seq_10920.265.820417837
thread_2_seq_10921.267.820418319
thread_2_seq_10922.268.820418609
ASMCMD> cd ..
ASMCMD> cd ..
說明已有歸檔資料。有了歸檔日誌後,還需要配置週期清理指令碼,要不說不定那天會佔滿磁碟空間。
另外,如下文件也值得參考。
How To Enable Archive Logging In RAC Environment [ID 1186764.1]Applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.2.0.2 - Release: 10.1 to 11.2
Information in this document applies to any platform.
GoalHow to enable database archivelog in RAC configuration?
SolutionThe following steps need to be taken to enable archive logging in a RAC database environment:
-- shutdown immediate all database instances
$ srvctl stop database -d
-- startup database in mount mode
$ srvctl start database -d
-- enable archvive logging
$ sqlplus / as sysdba
sql> alter database archivelog;
sql> exit;
-- stop database
$ srvctl stop database -d
-- restart all database instances
$ srvctl start database -d
-- verify archiving is enabled by means of:
sql> archive log list;
You might need to set your log_archive_dest(_n) parameters to a shared location in each spfile, but the log_archive_start parameter does not need to be set anymore as of 10g (see Note 274302.1).
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18841027/viewspace-1060705/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- KingbaseES RAC部署案例之---SAN環境構建RAC
- rac歸檔模式/非歸檔模式下檔案建至本地儲存修復方法-ORA-01157模式
- 一、環境配置
- RAC環境修改spfile的位置
- Oracle RAC 環境 引數檔案的啟動順序Oracle
- TiDB 在餓了麼歸檔環境的應用TiDB
- Laravel 配置多環境env檔案Laravel
- ORACLE11GR2 RAC檔案系統變更成ASM EXTEND RAC及高可用測試OracleASM
- RMAN之環境配置(一)
- app自動化測試環境配置:adb環境配置、monkey環境配置、appium環境配置大全APP
- RAC開啟資料庫歸檔資料庫
- Oracle RAC 環境下的連線管理Oracle
- 一個案例入門補環境
- ubuntu系統環境配置檔案的區別Ubuntu
- DM8 配置DMDSC主備環境(rac到單節點 )
- 一次對requirements環境的配置UIREM
- AspNetCore配置多環境log4net配置檔案NetCore
- 環境配置
- Oracle RAC一鍵部署001(主機環境校驗)Oracle
- RAC和ASM環境下打patchASM
- 手工清理19c RAC環境
- RAC環境下建立物理DATAGUARD(1)
- RAC環境下建立物理DATAGUARD(2)
- SpringMVC基本環境搭建(配置檔案模板模板)SpringMVC
- 配置開發環境、生成環境、測試環境開發環境
- 用Node寫一條配置環境的指令
- 記錄一則clear重做日誌檔案的案例
- 一、虛擬機器環境配置虛擬機
- Java環境下載、配置環境、編寫我的第一個Java程式Java
- 從環境搭建到迴歸神經網路案例,帶你掌握Keras神經網路Keras
- Oracle RAC 11gR2開啟歸檔Oracle
- RAC環境下的SEQUENCE對應用的影響
- ApacheCordovaforios環境配置ApacheiOS
- Linux環境配置Linux
- vue – 環境配置Vue
- JAV A環境配置
- Flutter環境配置Flutter
- 配置python環境Python
- nerfstudio環境配置