日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Oracle12cR2中的ADG會話保留特性

Oracle 12c R2中有一個不錯的特性,那就是Active Data Guard會話保留,原本的叫法是Preserving Active Data Guard Application Connections

站在用戶的角度思考問題,與客戶深入溝通,找到雙遼網(wǎng)站設(shè)計與雙遼網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗,讓設(shè)計與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個性化、用戶體驗好的作品,建站類型包括:成都網(wǎng)站設(shè)計、做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、域名申請、虛擬主機(jī)、企業(yè)郵箱。業(yè)務(wù)覆蓋雙遼地區(qū)。

怎么理解呢,比如在Active Data Guard上的連接會話,在switchover的過程中會話連接會始終保持不會中斷。這一點(diǎn)聽起來就很有特點(diǎn),能夠提高用戶體驗度,而且是一種相對透明的方式。

到底怎么樣呢,我們來簡單測試一下,先看看默認(rèn)情況下的ADG會話情況,切換的過程就直接使用DG Broker來做了,快。

這是一個12cR2的環(huán)境,也使用了Far Sync。

 
 
 
  1. DGMGRL>show  configuration 
  2.  Configuration - dg_test12cs 
  3.   Protection Mode: MaxPerformance 
  4.   Members: 
  5.   test12cs  - Primary database 
  6.     test_sync - Far sync instance  
  7.     test12css - Physical standby database  
  8.  Fast-Start Failover: DISABLED 
  9.  Configuration Status: 

SUCCESS (status updated 10 seconds ago)我們連接到備庫,備庫現(xiàn)在是ADG模式。

 
 
 
  1. SQL> select open_mode from v$database; 
  2.  OPEN_MODE 
  3.  ---------------------------------------- 

READ ONLY WITH APPLY如果這個時候我們就使用一條語句在備庫端查詢,使用TNS連接,然后DG Broker來切換,切換的情況如下,也是一氣呵成。

 
 
 
  1. DGMGRL> switchover to test12css 
  2.  Performing switchover NOW, please wait... 
  3.  Operation requires a connection to database "test12css" 
  4.  Connecting ... 
  5.  Connected to "test12css" 
  6.  Connected as SYSDBA. 
  7.  New primary database "test12css" is opening... 
  8.  Operation requires start up of instance "test12cs" on database "test12cs" 
  9.  Starting instance "test12cs"... 
  10.  for RDBMS instance 
  11.  ORACLE instance started. 
  12.  Database mounted. 
  13.  Database opened. 
  14.  Connected to "test12cs" 
  15.  Switchover succeeded, new primary is "test12css" 
  16.  DGMGRL>  

在客戶端反復(fù)測試連接的情況如下:

 
 
 
  1. SQL> select count(*) from cat; 
  2.   COUNT(*) 
  3.  ---------- 
  4.         153 
  5.  SQL> / 
  6.   COUNT(*) 
  7.  ---------- 
  8.         153 
  9.  SQL> / 
  10.  select count(*) from cat 
  11.  * 
  12.  ERROR at line 1: 
  13.  ORA-03113: end-of-file on communication channel 
  14.  Process ID: 94489 
  15.  Session ID: 419 Serial number: 62932 

可以看到在切換的過程中,連接被中斷了,而接下來就會徹底斷開連接。

 
 
 
  1. SQL> / 
  2.  ERROR: 
  3.  ORA-03114: not connected to ORACLE 

這里就需要說一下這個特性的情況,其實還涉及到一個參數(shù)standby_db_preserve_states,默認(rèn)是NONE

 
 
 
  1. SQL> show parameter standby_db_preserve_states 
  2.  NAME                                TYPE                  VALUE 
  3.  ------------------------------------ ---------------------- ------ 
  4.  standby_db_preserve_states          string                NONE 

我們設(shè)置為ALL,這個修改需要重啟備庫,我們設(shè)置好之后,再來做switchover

步驟和上面的類似,我們直接來看看效果,始終在這一個會話內(nèi)查看數(shù)據(jù)查詢的情況,整個過程相對平滑,在切換過程中會有一個大約兩秒的停頓,但是連接始終是保持的。

 
 
 
  1. COUNT(*) 
  2. ---------- 
  3.        153 
  4. SQL> / 
  5.  COUNT(*) 
  6. ---------- 
  7.        153 
  8. SQL> / 
  9.  COUNT(*) 
  10. ---------- 
  11.        153       
  12. SQL> / 
  13.  
  14.  COUNT(*) 
  15. ---------- 
  16.        153 
  17. SQL> / 
  18.  COUNT(*) 
  19. ---------- 
  20.        153 

整體來看這個特性確實達(dá)到了預(yù)期的效果,還是蠻不錯的。


網(wǎng)頁標(biāo)題:Oracle12cR2中的ADG會話保留特性
網(wǎng)頁路徑:http://www.5511xx.com/article/dpegeps.html