這篇文章主要介紹“oracle11g dataguard如何切換”,在日常操作中,相信很多人在oracle11g dataguard如何切換問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”oracle11g dataguard如何切換”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!
成都創(chuàng)新互聯(lián)公司是一家專(zhuān)注于做網(wǎng)站、網(wǎng)站設(shè)計(jì)與策劃設(shè)計(jì),登封網(wǎng)站建設(shè)哪家好?成都創(chuàng)新互聯(lián)公司做網(wǎng)站,專(zhuān)注于網(wǎng)站建設(shè)10多年,網(wǎng)設(shè)計(jì)領(lǐng)域的專(zhuān)業(yè)建站公司;建站業(yè)務(wù)涵蓋:登封等地區(qū)。登封做網(wǎng)站價(jià)格咨詢(xún):189808205751.查看主庫(kù)是否滿(mǎn)足切換條件
SQL> select switchover_status from v$database; SWITCHOVER_STATUS ---------------------------------------- TO STANDBY
有時(shí)候會(huì)顯示 SESSION ACTIVE,這表示當(dāng)前還有活動(dòng)的會(huì)話(huà)連接。
2.執(zhí)行下面的命令切換
SQL> alter database commit to switchover to physical standby; Database altered.
如果第一步切換條件查看顯示 SESSION ACTIVE,那么在這里使用下面命令
SQL> alter database commit to switchover to physical standby WITH SESSION SHUTDOWN;
3.關(guān)閉數(shù)據(jù)庫(kù)重啟到 mount
SQL> shutdown immediate; ORA-01012: not logged on SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@oraclerac2 ~]$ sqlplus "/ as sysdba" SQL*Plus: Release 11.2.0.4.0 Production on Wed Aug 1 17:45:33 2018 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount; ORACLE instance started. Total System Global Area 2.1379E+10 bytes Fixed Size 2262656 bytes Variable Size 2885683584 bytes Database Buffers 1.8455E+10 bytes Redo Buffers 36073472 bytes Database mounted.
4.用 Read Only 模式打開(kāi)
SQL> alter database open read only; Database altered.
5.啟動(dòng) Redo 應(yīng)用模式
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION; Database altered.
6.切換后查看角色
SQL> select database_role,switchover_status from v$database; DATABASE_ROLE SWITCHOVER_STATUS -------------------------------- ---------------------------------------- PHYSICAL STANDBY TO PRIMARY
7.以上操作都是原來(lái)的主庫(kù)完成的,下面的操作在原來(lái)的備庫(kù)完成
8.查看 Standby Database 是否滿(mǎn)足切換條件
SQL> select database_role,switchover_status from v$database; DATABASE_ROLE SWITCHOVER_STATUS -------------------------------- ---------------------------------------- PHYSICAL STANDBY TO PRIMARY
9.執(zhí)行下面命令進(jìn)行切換
SQL> alter database commit to switchover to primary; Database altered.
10.打開(kāi)數(shù)據(jù)庫(kù)
SQL> alter database open; Database altered.
11.切換后查看角色
SQL> select database_role,switchover_status from v$database; DATABASE_ROLE SWITCHOVER_STATUS -------------------------------- ---------------------------------------- PRIMARY TO STANDBY
到此,關(guān)于“oracle11g dataguard如何切換”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)?lái)更多實(shí)用的文章!
分享文章:oracle11gdataguard如何切換-創(chuàng)新互聯(lián)
本文鏈接:http://vcdvsql.cn/article6/jjeog.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、做網(wǎng)站、品牌網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、搜索引擎優(yōu)化、移動(dòng)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容
全網(wǎng)營(yíng)銷(xiāo)推廣知識(shí)