TimesTen手動主備切換(ASP模式)[TimesTen運維基礎]
TimesTen在ASP模式下,主備切換是日常運維中比較經常需要實施的操作,雖然我們可以配置HACMP自動切換,但是手動切換也是難免的,無論是配置自動切換還是手動切換。具體的操作步驟基本一致。
1、切換前注意事項:
a、檢查主備同步狀態,如若有日誌複製堆積,則需要等其日誌追平。
b、主備切換需要將主備節點上承載的業務全部停止,切換後,必須檢查主備角色狀況,及主備節點複製狀況,保證主備關係正常。
2、手動主備切換步驟
--註釋定時指令碼
#crontab -e
#:%s/^/#/g
--主節點檢視主備複製日誌堆積情況
ttrepadmin -log
ttisql -connstr -v 1 -e "call ttbookmark;bye;"
--複製日誌無堆積,通知開發商停業務,必須停止所有的業務程式.
--檢查ckpt狀態,若正處於ckpt執行狀態,需等待其執行完成(Completed 狀態),才可進行主備切換.
ttisql -connstr -v 1 -e "call ttckpthistory;bye;"
--停止當前主節點Cache Agent程式:
ttadmin -cacheStop
或
ttisql -connstr -v 1 -e "call ttcachestop;bye;"
--主備事務保持一致(主節點執行)
ttisql -connstr -v 1 -e "call ttRepSubscriberWait(,,,,-1);bye;"
--停止主節點複製程式
ttadmin -repStop
或
ttisql -connstr -v 1 -e "call ttrepstop;bye;"
--將原主節點的狀態置為 idle狀態
ttisql -connstr -v 1 -e "call ttRepDeactivate;call ttrepstateget;bye;"
--將備機的狀態置為 active 狀態
ttisql -connstr -v 1 -e "call ttrepstateset('ACTIVE');call ttrepstateget;bye;"
--啟動新主節點複製程式
ttadmin -repStart
或
ttisql -connstr -v 1 -e "call ttrepstart;bye;"
--啟動新主節點Cache Agent程式
ttadmin -cacheStart
或
ttisql -connstr -v 1 -e "call ttcachestart;bye;"
--檢查主備節點角色情況
ttisql -connstr -v 1 -e "call ttrepstateget;bye;"
--檢查主備複製及Cache Group重新整理狀態:
ttisql -connstr -v 1 -e "call ttbookmark;bye;"
ttisql -connstr -v 1 -e "select 'PERM' type,
to_char(round(perm_allocated_size/1024)),
to_char(round(perm_in_use_size/1024)),
to_char(round(perm_in_use_high_water/1024)),
to_char(round(perm_in_use_size*100/perm_allocated_size,2))
from sys.monitor
union all
select 'TEMP' type,
to_char(round(temp_allocated_size/1024)),
to_char(round(temp_in_use_size/1024)),
to_char(round(temp_in_use_high_water/1024)),
to_char(round(temp_in_use_size*100/temp_allocated_size,2))
from sys.monitor;
call ttBlockInfo;bye;"
--檢查操作日誌
--檢查Data Store狀態
--檢查錯誤日誌
--通知開發商啟動應用
--啟動定時任務
=========================End===========================================================
1、切換前注意事項:
a、檢查主備同步狀態,如若有日誌複製堆積,則需要等其日誌追平。
b、主備切換需要將主備節點上承載的業務全部停止,切換後,必須檢查主備角色狀況,及主備節點複製狀況,保證主備關係正常。
2、手動主備切換步驟
--註釋定時指令碼
#crontab -e
#:%s/^/#/g
--主節點檢視主備複製日誌堆積情況
ttrepadmin -log
ttisql -connstr
--複製日誌無堆積,通知開發商停業務,必須停止所有的業務程式.
--檢查ckpt狀態,若正處於ckpt執行狀態,需等待其執行完成(Completed 狀態),才可進行主備切換.
ttisql -connstr
--停止當前主節點Cache Agent程式:
ttadmin -cacheStop
或
ttisql -connstr
--主備事務保持一致(主節點執行)
ttisql -connstr
--停止主節點複製程式
ttadmin -repStop
或
ttisql -connstr
--將原主節點的狀態置為 idle狀態
ttisql -connstr
--將備機的狀態置為 active 狀態
ttisql -connstr
--啟動新主節點複製程式
ttadmin -repStart
或
ttisql -connstr
--啟動新主節點Cache Agent程式
ttadmin -cacheStart
或
ttisql -connstr
--檢查主備節點角色情況
ttisql -connstr
--檢查主備複製及Cache Group重新整理狀態:
ttisql -connstr
ttisql -connstr
to_char(round(perm_allocated_size/1024)),
to_char(round(perm_in_use_size/1024)),
to_char(round(perm_in_use_high_water/1024)),
to_char(round(perm_in_use_size*100/perm_allocated_size,2))
from sys.monitor
union all
select 'TEMP' type,
to_char(round(temp_allocated_size/1024)),
to_char(round(temp_in_use_size/1024)),
to_char(round(temp_in_use_high_water/1024)),
to_char(round(temp_in_use_size*100/temp_allocated_size,2))
from sys.monitor;
call ttBlockInfo;bye;"
--檢查操作日誌
--檢查Data Store狀態
--檢查錯誤日誌
--通知開發商啟動應用
--啟動定時任務
=========================End===========================================================
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24930246/viewspace-1173726/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- TimesTen常用維護內建的儲存過程[TimesTen運維基礎]儲存過程運維
- Linux下TimesTen主備搭建、重建cache group、重建備機操作[TimesTen運維]Linux運維
- CheckPoint沒有執行-Checkpointing Not Occurring[TimesTen運維基礎]運維
- TimesTen重建備機標準操作[TimesTen運維]運維
- TimesTen-CacheGroup配置操作指導[TimesTen運維]運維
- TimesTen IX鎖及用途介紹[TimesTen運維]運維
- 配置TimesTen客戶端連線[TimesTen運維]客戶端運維
- TimesTen運維技能檢測題-基礎篇運維
- Timesten cache database的準備Database
- Oracle與TimesTen記憶體資料庫Cache Group同步效率與TimesTen主備資料同步機制研究Oracle記憶體資料庫
- 主備切換(failover)AI
- 主備切換的準備工作
- Timesten問題診斷手冊總結
- mysql主從複製+主備切換MySql
- TimesTen學習(三)遠端連線TimesTen資料庫資料庫
- Data Guard主備庫切換
- 主備切換的準備工作(二)
- Timesten學習1
- Timesten學習2
- timesten client dsn 配置client
- Step by Step TimesTen --- ttIsqlSQL
- Oracle 單機切換為主備Oracle
- DataGuard主備庫切換步驟
- MySQL 主備庫切換記錄MySql
- TimesTen計算和配置TimesTen的ttmesg日誌儲存空間
- timesten配置只讀同步
- TimesTen錯誤總結
- TimesTen生成加密密碼加密密碼
- linux運維基礎2Linux運維
- 【DG】Data Guard主備庫Switchover切換
- Mysql 5.6 Master和Slave 主備切換MySqlAST
- 轉~timesten系列六:定義複製,實現timesten的高可用性
- TimesTen支援的連線數
- 轉~timesten系列一:簡介
- Timesten11g建立datastoreAST
- Timesten11G安裝
- 深色模式適配和主題切換模式
- 【DG】Data Guard主備庫Failove切換AI