您好,登錄后才能下訂單哦!
1.停止Standby
select process, status from v$managed_standby; --查看備庫是否在應用日志進行恢復
alter database recover managed standby database cancel;
shutdown immediate;
2.切換到只讀模式
-----由shutdown模式切換到只讀模式-------
startup nomount;
alter database mount standby database;
alter database open read only;
-----由應用日志模式切換到只讀模式-------
alter database recover managed standby database cancel; -- 取消日志應用
alter database open read only;
3.切換回管理恢復模式
startup nomount;
alter database mount standby database;
alter database recover managed standby database disconnect from session; -- 啟動日志應用
alter database recover managed standby database using current logfile disconnect from session;
4.主庫和備庫之間角色切換
4.1 主庫切換為備庫
alter database commit to switchover to physical standby;
alter database commit to switchover to physical standby with session shutdown;-- 主庫有會話連接的時候
shutdown immediate
startup nomount;
alter database mount standby database;
alter database recover managed standby database disconnect from session;
4.2 從庫切換為主庫
alter database commit to switchover to primary;
shutdown immediate;
startup;
alter system switch logfile;
5.備庫自動使用主庫傳過來的日志進行恢復
alter database recover automatic standby database;
6.更改保護模式
alter database set standby database to maximize protection;
alter database set standby database to maximize availability;
alter database set standby database to maximize performancen;
7.取消自動恢復模式
alter database recover managed standby database cancel;
alter database recover managed standby database finish;
alter database recover managed standby database finish force;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。