您好,登錄后才能下訂單哦!
select log_mode,open_mode ,database_role from v$database; --查看dataguard主備庫狀態(tài) select status from v$instance; --查看數(shù)據(jù)庫狀態(tài) alter database recover managed standby database cancel; --取消日志應(yīng)用 alter database recover managed standby database using current logfile disconnect;--備庫開啟實(shí)時(shí)應(yīng)用 select sequence#,applied from v$archived_log order by sequence#; --備庫若全為yes 則表明standby庫已經(jīng)實(shí)時(shí)復(fù)制了 alter database recover managed standby database disconnect from session;--備庫mount應(yīng)用日志 alter system switch logfile;--主庫切換日志 --啟停dg主庫 alter system set log_archive_dest_state_2 = 'defer'; lsnrctl stop shutdown immediate startup alter system set log_archive_dest_state_2 = 'enable'; --備庫停止 alter database recover managed standby database cancel; shutdown immediate --備庫開啟 startup mount --啟動(dòng)到mount狀態(tài) alter database recover managed standby database disconnect from session; --啟動(dòng)日志應(yīng)用 主備執(zhí)行archive log list 看是否同步,備庫可執(zhí)行select * from v$archive_gap;看是否有延時(shí) alter system switch logfile;--主庫執(zhí)行切換日志,看備庫是否及時(shí)應(yīng)用 日志同步成功后,備庫執(zhí)行 ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;--取消日志應(yīng)用 alter database open;--將備庫打開 alter database recover managed standby database using current logfile disconnect;--備庫開啟實(shí)時(shí)應(yīng)用 select log_mode,open_mode ,database_role from v$database;--檢查備庫狀態(tài)
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。