1.停止Standby
盤龍網(wǎng)站建設(shè)公司成都創(chuàng)新互聯(lián),盤龍網(wǎng)站設(shè)計制作,有大型網(wǎng)站制作公司豐富經(jīng)驗。已為盤龍上千家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\成都外貿(mào)網(wǎng)站制作要多少錢,請找那個售后服務(wù)好的盤龍做網(wǎng)站的公司定做!
select process, status from v$managed_standby; --查看備庫是否在應(yīng)用日志進(jìn)行恢復(fù)
alter database recover managed standby database cancel;
shutdown immediate;
2.切換到只讀模式
-----由shutdown模式切換到只讀模式-------
startup nomount;
alter database mount standby database;
alter database open read only;
-----由應(yīng)用日志模式切換到只讀模式-------
alter database recover managed standby database cancel; -- 取消日志應(yīng)用
alter database open read only;
3.切換回管理恢復(fù)模式
startup nomount;
alter database mount standby database;
alter database recover managed standby database disconnect from session; -- 啟動日志應(yīng)用
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.備庫自動使用主庫傳過來的日志進(jìn)行恢復(fù)
alter database recover automatic standby database;
6.更改保護(hù)模式
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.取消自動恢復(fù)模式
alter database recover managed standby database cancel;
alter database recover managed standby database finish;
alter database recover managed standby database finish force;
網(wǎng)站欄目:oracledataguard日常維護(hù)命令總結(jié)
分享地址:http://m.rwnh.cn/article8/jcgjop.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信公眾號、外貿(mào)網(wǎng)站建設(shè)、企業(yè)建站、網(wǎng)站設(shè)計公司、用戶體驗、微信小程序
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)