欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

oracle11gR2搭建dataguard


1、搭建環(huán)境

鋼城網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)公司!從網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、成都響應(yīng)式網(wǎng)站建設(shè)公司等網(wǎng)站項目制作,到程序開發(fā),運(yùn)營維護(hù)。創(chuàng)新互聯(lián)公司于2013年成立到現(xiàn)在10年的時間,我們擁有了豐富的建站經(jīng)驗和運(yùn)維經(jīng)驗,來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)公司。

 主庫   oracle11gR2    備庫 oracle11gR2

 db_name orcl            orcl

 db_unique_name orcl       standby239

 配置host文件

 主庫:primaryHost     備庫:standbyHost

 

 準(zhǔn)備庫都置于歸檔模式。

2、配置靜態(tài)監(jiān)聽

 主備庫都配置

 listener.ora

    SID_LIST_LISTENER =    

       (SID_LIST =    

            (SID_DESC =    

              (SID_NAME = CLRExtProc)    

              (ORACLE_HOME = /data/oracle/product/11.2.0/dbhome_1)    

              (PROGRAM = extproc)    

            )    

            (SID_DESC =    

              (GLOBAL_DBNAME = orcl)    

              (ORACLE_HOME = /data/oracle/product/11.2.0/dbhome_1)    

              (SID_NAME = orcl)       

            )       

        ) 

    SID_LIST_LISTENER =    

       (SID_LIST =    

            (SID_DESC =    

              (SID_NAME = CLRExtProc)    

              (ORACLE_HOME = /data/oracle/product/11.2.0/dbhome_1)    

              (PROGRAM = extproc)    

            )    

            (SID_DESC =    

              (GLOBAL_DBNAME = standby239)    

              (ORACLE_HOME = /data/oracle/product/11.2.0/dbhome_1)    

              (SID_NAME = orcl)       

            )       

        )

  配置tnsnames.ora

  主備庫配置

    standby239 =    

      (DESCRIPTION =    

        (ADDRESS = (PROTOCOL = TCP)(HOST = standbyHost)(PORT = 1521))    

        (CONNECT_DATA =    

          (UR = A)    

          (SERVER = DEDICATED)    

          (SERVICE_NAME = standby239)    

        )    

      )    

    

    ORCL =    

      (DESCRIPTION =    

        (ADDRESS = (PROTOCOL = TCP)(HOST = primaryHost)(PORT = 1521))    

        (CONNECT_DATA =    

          (UR = A)    

          (SERVER = DEDICATED)    

          (SERVICE_NAME = orcl)    

        )    

      )  

3、主備庫生成密碼文件

   使用orapwd

    orapwd file=$ORACLE_HOME/dbs/orapworcl password=xxxxx ignorecase=Y  

4、生成standbylog

     alter database add standby logfile ('/data/oracle/flash_recovery_area/orcl/standby/standby07.log') size 50m;    

     alter database add standby logfile ('/data/oracle/flash_recovery_area/orcl/standby/standby05.log') size 50m;    

     alter database add standby logfile ('/data/oracle/flash_recovery_area/orcl/standby/standby04.log') size 50m;    

     alter database add standby logfile ('/data/oracle/flash_recovery_area/orcl/standby/standby06.log') size 50m;

5、修改dg參數(shù)

  主庫

   alter system set db_unique_name=orcl scope=spfile;

   alter system set log_archive_config='dg_config=(orcl,standby239)' scope=both;

   alter system set log_archive_dest_1='location=/data/oracle/flash_recovery_area/ORCL valid_for=(all_logfiles,all_roles) db_unique_name=orcl' scope=both;  

   alter system set log_archive_dest_2='service=standby239 async lgwr valid_for=(online_logfiles,primary_role) db_unique_name=standby239' scope=both;  

   alter system set log_archive_dest_state_1=enable scope=both;

   alter system set log_archive_dest_state_2=enable scope=both; 

   alter system set fal_server=standby239 scope=both;

   alter system set fal_client=orcl scope=both;

   alter system set standby_file_management=AUTO;

  備庫 

   alter system set db_unique_name=standby239 scope=spfile;

   alter system set log_archive_config='dg_config=(orcl,standby239)' scope=both;

   alter system set log_archive_dest_1='location=/data/oracle/flash_recovery_area/ORCL valid_for=(all_logfiles,all_roles) db_unique_name=standby239' scope=both;  

   alter system set log_archive_dest_2='service=orcl async lgwr valid_for=(online_logfiles,primary_role) db_unique_name=orcl' scope=both;  

   alter system set log_archive_dest_state_1=enable scope=both;

   alter system set log_archive_dest_state_2=enable scope=both; 

   alter system set fal_server=orcl scope=both;

   alter system set fal_client=standby239 scope=both;

   alter system set standby_file_management=AUTO;

6、使用rman duplicate主庫到備庫

   將備庫置于未裝載狀態(tài)

  rman target sys/xxxx auxiliary sys/xxxx@standby239

  duplicate target database for standby nofilenamecheck from active database;

  

  如果需要重命名的話,使用set newname for

7、將備庫置于active dataguard模式

  alter database mount standby database;

  alter database open read only;

  alter database recover managed standby database disconnect from session;

  或者 alter database recover managed standby database using current logfile disconnect from session;(實時應(yīng)用日志模式)

這樣就可以實驗主庫和備庫的狀態(tài)了。

當(dāng)前題目:oracle11gR2搭建dataguard
文章分享:http://chinadenli.net/article2/gehjic.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供動態(tài)網(wǎng)站定制網(wǎng)站定制開發(fā)、企業(yè)建站網(wǎng)站維護(hù)、靜態(tài)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司