您好,登錄后才能下訂單哦!
oracle rac環境中怎么開啟歸檔,相信很多沒有經驗的人對此束手無策,為此本文總結了問題出現的原因和解決方法,通過這篇文章希望你能解決這個問題。
oracle rac 歸檔設置需要不像單實例設置簡單,開啟過程需要注意一些細節
歸檔開啟思路:
1:查看數據庫是否開啟歸檔
2:創建共享目錄(歸檔一定要放在共享存儲上)
3:將rac設置成單實例模式
4:分別關閉各個節點實例
5:將其中一個節點啟動到mount狀態,開啟歸檔,設置歸檔路徑,格式,并打開數據庫還原rac模式
6: 打開所有節點數據庫
7:查看數據庫歸檔參數設置是否生效
8:切換歸檔,查看歸檔是否正常工作
1、查詢歸檔當前信息
SQL> show parameter recovery NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string db_recovery_file_dest_size big integer 0 recovery_parallelism integer 0
2、查詢是否開戶歸檔日志
SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination /oracle/app/oracle/product/11.2.0/db_1/dbs/arch Oldest online log sequence 35 Next log sequence to archive 36 Current log sequence 36
說明:從當前查詢是已開始歸檔模式了,但是規定路徑不對要重新修改
3、查詢集群參數
SQL> show parameter cluster NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cluster_database boolean TRUE cluster_database_instances integer 2 cluster_interconnects string
4、關閉另外一個節點數據庫
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
5、在當前正常節點修改集群為單節點模式
SQL> alter system set cluster_database=false scope=spfile; System altered.
6、配置閃回大小
SQL> alter system set db_recovery_file_dest_size=2G scope=both; System altered.
7、配置歸檔日志路徑,配置在DG中
SQL> alter system set db_recovery_file_dest='+DGRECOVERY'scope=both; System altered.
8、關閉當前節點數據庫
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
9.把當前節點數據庫啟動到mount狀態中修改歸檔
SQL> startup mount ORACLE instance started. Total System Global Area 784998400 bytes Fixed Size 2257352 bytes Variable Size 331353656 bytes Database Buffers 448790528 bytes Redo Buffers 2596864 bytes Database mounted.
10.查詢當前數據庫是處于什么狀態
SQL> select status from v$instance 2 ; STATUS ------------ MOUNTED
11.修改數據庫歸檔
SQL> alter database archivelog; Database altered.
12.恢復數據庫雙節點實例
SQL> alter system set cluster_database=true scope=spfile; System altered.
13.打開數據庫
SQL> alter database open; Database altered.
14.查詢當前數據庫狀態
SQL> select status from v$instance; STATUS ------------ OPEN
15、查詢數據庫集群狀態
SQL> show parameter cluster NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cluster_database boolean TRUE cluster_database_instances integer 2 cluster_interconnects string
16、再啟動另外一個節點
startup
17、切換歸檔日志,判斷是否切換成功
SQL> alter system switch logfile; System altered.
18、查詢歸檔中數據
ASMCMD> pwd +DGRECOVERY/RAC/ARCHIVELOG/2017_06_13 ASMCMD> ls thread_1_seq_37.256.946542069 thread_1_seq_38.257.946542129 thread_1_seq_39.258.946542133 thread_1_seq_40.260.946542135 thread_1_seq_41.261.946543367 thread_1_seq_42.262.946543369 thread_1_seq_43.264.946543373 thread_1_seq_44.265.946543375 thread_1_seq_45.266.946543377 thread_1_seq_46.267.946543377 thread_1_seq_47.269.946544929 thread_2_seq_4.259.946542029 thread_2_seq_5.263.946543265 thread_2_seq_6.268.946543277
看完上述內容,你們掌握oracle rac環境中怎么開啟歸檔的方法了嗎?如果還想學到更多技能或想了解更多相關內容,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。