backupincrementallevel0database;Startingbackupat02-DEC-13usingchannelORA_DISK_1channelORA_DISK_1:startingincrementallevel0datafile" />

日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

oracle:rman恢復(fù)----通過(guò)增量備份來(lái)恢復(fù)

系統(tǒng) 2458 0

? ?試驗(yàn)計(jì)劃:先rman進(jìn)行一個(gè)0級(jí)備份,插入表相關(guān)數(shù)據(jù),再進(jìn)行l(wèi)evel 1級(jí)增量備份,進(jìn)行rman恢復(fù)

實(shí)驗(yàn)環(huán)境:歸檔模式下,oracle10.2.0.1

?

開始試驗(yàn):

1. rman level 0級(jí)備份

      
        RMAN> backup incremental level 0
      
      
        
           database;
        
        



Starting backup at 
      
      
        02
      
      -DEC-
      
        13
      
      
        using
      
      
         channel ORA_DISK_1

channel ORA_DISK_1: starting incremental level 
      
      
        0
      
      
         datafile backupset

channel ORA_DISK_1: specifying datafile(s) 
      
      
        in
      
      
         backupset

input datafile fno
      
      =
      
        00001
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        system01.dbf

input datafile fno
      
      =
      
        00003
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        sysaux01.dbf

input datafile fno
      
      =
      
        00002
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        undotbs01.dbf

input datafile fno
      
      =
      
        00006
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        yn.dbf

input datafile fno
      
      =
      
        00004
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        users01.dbf

channel ORA_DISK_1: starting piece 
      
      
        1
      
       at 
      
        02
      
      -DEC-
      
        13
      
      
        

channel ORA_DISK_1: finished piece 
      
      
        1
      
       at 
      
        02
      
      -DEC-
      
        13
      
      
        

piece handle
      
      =/u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_12_02/o1_mf_nnnd0_TAG20131202T222739_99s66wc3_.bkp tag=TAG20131202T222739 comment=
      
        NONE

channel ORA_DISK_1: backup 
      
      
        set
      
       complete, elapsed time: 
      
        00
      
      :
      
        02
      
      :
      
        06
      
      
        

channel ORA_DISK_1: starting incremental level 
      
      
        0
      
      
         datafile backupset

channel ORA_DISK_1: specifying datafile(s) 
      
      
        in
      
      
         backupset

including current control file 
      
      
        in
      
      
         backupset

including current SPFILE 
      
      
        in
      
      
         backupset

channel ORA_DISK_1: starting piece 
      
      
        1
      
       at 
      
        02
      
      -DEC-
      
        13
      
      
        

channel ORA_DISK_1: finished piece 
      
      
        1
      
       at 
      
        02
      
      -DEC-
      
        13
      
      
        

piece handle
      
      =/u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_12_02/o1_mf_ncsn0_TAG20131202T222739_99s6bvm4_.bkp tag=TAG20131202T222739 comment=
      
        NONE

channel ORA_DISK_1: backup 
      
      
        set
      
       complete, elapsed time: 
      
        00
      
      :
      
        00
      
      :
      
        02
      
      
        

Finished backup at 
      
      
        02
      
      -DEC-
      
        13
      
    

?

2.插入相關(guān)表數(shù)據(jù)

      SQL> 
      
        select
      
       * 
      
        from
      
      
         t1;



    ID NAME


      
      ---------- --------------------

     
      
        1
      
      
         first

     
      
      
        2
      
      
         second



SQL
      
      > insert into t1 values(
      
        3
      
      ,
      
        '
      
      
        rman3
      
      
        '
      
      
        );




      
      
        1
      
      
         row created.



SQL
      
      >
      
         commit;



Commit complete.



SQL
      
      > insert into t1 values(
      
        4
      
      ,
      
        '
      
      
        rman4
      
      
        '
      
      
        );




      
      
        1
      
      
         row created.



SQL
      
      >
      
         commit;



Commit complete.



SQL
      
      > alter system 
      
        switch
      
      
         logfile;



System altered.



SQL
      
      > alter system 
      
        checkpoint
      
      
        ;



System altered.



SQL
      
      > 
    

3.rman level ?0級(jí)備份

      
        RMAN> backup incremental level 1
      
      
        
           database;
        
        



Starting backup at 
      
      
        02
      
      -DEC-
      
        13
      
      
        using
      
      
         channel ORA_DISK_1

channel ORA_DISK_1: starting incremental level 
      
      
        1
      
      
         datafile backupset

channel ORA_DISK_1: specifying datafile(s) 
      
      
        in
      
      
         backupset

input datafile fno
      
      =
      
        00001
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        system01.dbf

input datafile fno
      
      =
      
        00003
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        sysaux01.dbf

input datafile fno
      
      =
      
        00002
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        undotbs01.dbf

input datafile fno
      
      =
      
        00006
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        yn.dbf

input datafile fno
      
      =
      
        00004
      
       name=/u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        users01.dbf

channel ORA_DISK_1: starting piece 
      
      
        1
      
       at 
      
        02
      
      -DEC-
      
        13
      
      
        

channel ORA_DISK_1: finished piece 
      
      
        1
      
       at 
      
        02
      
      -DEC-
      
        13
      
      
        

piece handle
      
      =/u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_12_02/o1_mf_nnnd1_TAG20131202T223244_99s6jfdz_.bkp tag=TAG20131202T223244 comment=
      
        NONE

channel ORA_DISK_1: backup 
      
      
        set
      
       complete, elapsed time: 
      
        00
      
      :
      
        00
      
      :
      
        25
      
      
        

channel ORA_DISK_1: starting incremental level 
      
      
        1
      
      
         datafile backupset

channel ORA_DISK_1: specifying datafile(s) 
      
      
        in
      
      
         backupset

including current control file 
      
      
        in
      
      
         backupset

including current SPFILE 
      
      
        in
      
      
         backupset

channel ORA_DISK_1: starting piece 
      
      
        1
      
       at 
      
        02
      
      -DEC-
      
        13
      
      
        

channel ORA_DISK_1: finished piece 
      
      
        1
      
       at 
      
        02
      
      -DEC-
      
        13
      
      
        

piece handle
      
      =/u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_12_02/o1_mf_ncsn1_TAG20131202T223244_99s6k6o1_.bkp tag=TAG20131202T223244 comment=
      
        NONE

channel ORA_DISK_1: backup 
      
      
        set
      
       complete, elapsed time: 
      
        00
      
      :
      
        00
      
      :
      
        01
      
      
        

Finished backup at 
      
      
        02
      
      -DEC-
      
        13
      
      
        



RMAN
      
      > 
    

?

4.查看此時(shí)的備份文件、關(guān)閉數(shù)據(jù)庫(kù)、重啟數(shù)據(jù)庫(kù)

      
        [root@app 2013_12_02]# ll


      
      ?昏. 
      
        649132
      
      

-rw-r----- 
      
        1
      
       oracle oinstall   
      
        7176192
      
      
        12
      
      -
      
        02
      
      
        22
      
      :
      
        29
      
      
         o1_mf_ncsn0_TAG20131202T222739_99s6bvm4_.bkp


      
      -rw-r----- 
      
        1
      
       oracle oinstall   
      
        7176192
      
      
        12
      
      -
      
        02
      
      
        22
      
      :
      
        33
      
      
         o1_mf_ncsn1_TAG20131202T223244_99s6k6o1_.bkp


      
      -rw-r----- 
      
        1
      
       oracle oinstall 
      
        649576448
      
      
        12
      
      -
      
        02
      
      
        22
      
      :
      
        29
      
      
         o1_mf_nnnd0_TAG20131202T222739_99s66wc3_.bkp


      
      -rw-r----- 
      
        1
      
       oracle oinstall    
      
        114688
      
      
        12
      
      -
      
        02
      
      
        22
      
      :
      
        33
      
       o1_mf_nnnd1_TAG20131202T223244_99s6jfdz_.bkp
    
      
        SQL
      
      >
      
         shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL
      
      >
      
         startup mount

ORACLE instance started.



Total System Global Area  
      
      
        599785472
      
      
         bytes

Fixed Size            
      
      
        2022632
      
      
         bytes

Variable Size          
      
      
        251659032
      
      
         bytes

Database Buffers      
      
      
        343932928
      
      
         bytes

Redo Buffers            
      
      
        2170880
      
      
         bytes

Database mounted.


        
          

?

5.rman恢復(fù)

      RMAN>
      
         run {


      
      
        2
      
      >
      
         allocate channel c1 type disk;


      
      
        3
      
      >
      
         restore database;


      
      
        4
      
      >
      
         recover database;


      
      
        5
      
      > sql 
      
        '
      
      
        alter database open
      
      
        '
      
      
        ;


      
      
        6
      
      >
      
         }



allocated channel: c1

channel c1: sid
      
      =
      
        156
      
       devtype=
      
        DISK



Starting restore at 
      
      
        02
      
      -DEC-
      
        13
      
      
        



channel c1: starting datafile backupset restore

channel c1: specifying datafile(s) to restore 
      
      
        from
      
       backup 
      
        set
      
      
        

restoring datafile 
      
      
        00001
      
       to /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        system01.dbf

restoring datafile 
      
      
        00002
      
       to /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        undotbs01.dbf

restoring datafile 
      
      
        00003
      
       to /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        sysaux01.dbf

restoring datafile 
      
      
        00004
      
       to /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        users01.dbf

restoring datafile 
      
      
        00006
      
       to /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        yn.dbf

channel c1: reading 
      
      
        from
      
       backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_12_02/
      
        o1_mf_nnnd0_TAG20131202T222739_99s66wc3_.bkp

channel c1: restored backup piece 
      
      
        1
      
      
        

piece handle
      
      =/u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_12_02/o1_mf_nnnd0_TAG20131202T222739_99s66wc3_.bkp tag=
      
        TAG20131202T222739

channel c1: restore complete, elapsed time: 
      
      
        00
      
      :
      
        00
      
      :
      
        25
      
      
        

Finished restore at 
      
      
        02
      
      -DEC-
      
        13
      
      
        



Starting recover at 
      
      
        02
      
      -DEC-
      
        13
      
      
        

channel c1: starting incremental datafile backupset restore

channel c1: specifying datafile(s) to restore 
      
      
        from
      
       backup 
      
        set
      
      
        

destination 
      
      
        for
      
       restore of datafile 
      
        00001
      
      : /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        system01.dbf

destination 
      
      
        for
      
       restore of datafile 
      
        00002
      
      : /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        undotbs01.dbf

destination 
      
      
        for
      
       restore of datafile 
      
        00003
      
      : /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        sysaux01.dbf

destination 
      
      
        for
      
       restore of datafile 
      
        00004
      
      : /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        users01.dbf

destination 
      
      
        for
      
       restore of datafile 
      
        00006
      
      : /u01/app/oracle/product/
      
        10.2
      
      .
      
        0
      
      /db_2/oradata/orcl/
      
        yn.dbf

channel c1: reading 
      
      
        from
      
       backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_12_02/
      
        o1_mf_nnnd1_TAG20131202T223244_99s6jfdz_.bkp

channel c1: restored backup piece 
      
      
        1
      
      
        

piece handle
      
      =/u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_12_02/o1_mf_nnnd1_TAG20131202T223244_99s6jfdz_.bkp tag=
      
        TAG20131202T223244

channel c1: restore complete, elapsed time: 
      
      
        00
      
      :
      
        00
      
      :
      
        01
      
      
        



starting media recovery

media recovery complete, elapsed time: 
      
      
        00
      
      :
      
        00
      
      :
      
        02
      
      
        



Finished recover at 
      
      
        02
      
      -DEC-
      
        13
      
      
        



sql statement: alter database open

released channel: c1



RMAN
      
      > 
    

?

6.查詢數(shù)據(jù)

      [oracle@app ~]$ sqlplus / 
      
        as
      
      
         sysdba



SQL
      
      *Plus: Release 
      
        10.2
      
      .
      
        0.1
      
      .
      
        0
      
       - Production on Mon Dec 
      
        2
      
      
        22
      
      :
      
        52
      
      :
      
        49
      
      
        2013
      
      
        



Copyright (c) 
      
      
        1982
      
      , 
      
        2005
      
      
        , Oracle.  All rights reserved.





Connected to:

Oracle Database 10g Enterprise Edition Release 
      
      
        10.2
      
      .
      
        0.1
      
      .
      
        0
      
       -
      
         64bit Production

With the Partitioning, OLAP and Data Mining options




        
          SQL
        
      
      
        > select * from t1;

    id  name
        
---------------------
1 first
2 second
3 rman3
4 rman4

?

?這里說(shuō)一個(gè)我在進(jìn)行此試驗(yàn)時(shí),遇到的一個(gè)另外問題:

? ?level 1級(jí)備份操作后,進(jìn)行了drop table t1;我以為利用 level ?0+level ?1 恢復(fù)時(shí),rman只恢復(fù)到我level ?1備份處,t1表的4條數(shù)據(jù)還是存在的。

?

但,當(dāng)我這樣操作后,進(jìn)行select × from t1 查詢時(shí),發(fā)現(xiàn)提示該表不存在。

?

后來(lái)仔細(xì)想了想,當(dāng)我利用recover database時(shí),數(shù)據(jù)庫(kù)會(huì)自動(dòng)讀取redo或者歸檔文件來(lái)進(jìn)行drop table t1操作的。

?

oracle:rman恢復(fù)----通過(guò)增量備份來(lái)恢復(fù)


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 海门市| 梅州市| 木兰县| 偏关县| 尚义县| 双城市| 平凉市| 肃北| 北碚区| 大足县| 皋兰县| 涟源市| 沽源县| 大关县| 荆州市| 靖安县| 柳江县| 静安区| 邵阳县| 景东| 遂川县| 富宁县| 夹江县| 右玉县| 濮阳市| 揭阳市| 察隅县| 榆林市| 马公市| 长阳| 天柱县| 内江市| 东宁县| 灵石县| 屏山县| 甘南县| 黄梅县| 黑龙江省| 乳源| 广昌县| 武冈市|