真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

rman備份歸檔日志的方法-創(chuàng)新互聯(lián)

這篇文章主要介紹“rman備份歸檔日志的方法”,在日常操作中,相信很多人在rman備份歸檔日志的方法問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”rman備份歸檔日志的方法”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!

創(chuàng)新互聯(lián)-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價(jià)比岑鞏網(wǎng)站開(kāi)發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫(kù),直接使用。一站式岑鞏網(wǎng)站制作公司更省心,省錢(qián),快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋岑鞏地區(qū)。費(fèi)用合理售后完善,10多年實(shí)體公司更值得信賴。

數(shù)據(jù)庫(kù)的恢復(fù)需要利用數(shù)據(jù)庫(kù)的備份并使用歸檔日志去追回scn和在備份點(diǎn)以后點(diǎn)更改數(shù)據(jù)。如果歸檔日志發(fā)生丟失,數(shù)據(jù)庫(kù)可以恢復(fù),但還是會(huì)發(fā)生備份點(diǎn)后的數(shù)據(jù)丟失的情況,所以備份歸檔日志也是很重要的。
展示歸檔
RMAN> list archivelog all;
List of Archived Log Copies for database with db_unique_name TEST
=====================================================================

Key     Thrd Seq     S Low Time           
------- ---- ------- - -------------------
5       1    62      X 2017-07-23 22:09:22
        Name: /home/oracle/1_62_947085344.dbf

6       1    63      X 2017-07-25 14:19:26
        Name: /home/oracle/1_63_947085344.dbf
….

60      1    108     A 2017-07-29 17:27:50
        Name: /home/oracle/1_108_947085344.dbf


61      1    109     A 2017-07-29 17:27:56
        Name: /home/oracle/1_109_947085344.dbf


直接備份歸檔日志
RMAN> backup archivelog all format '/home/oracle/archbak/rman_arch_%T_%u';

Starting backup at 2017-07-30 11:01:48
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=100 RECID=43 STAMP=950632615
input archived log thread=1 sequence=101 RECID=44 STAMP=950633981
input archived log thread=1 sequence=102 RECID=45 STAMP=950634100
input archived log thread=1 sequence=103 RECID=46 STAMP=950634284
input archived log thread=1 sequence=104 RECID=47 STAMP=950634446
input archived log thread=1 sequence=105 RECID=48 STAMP=950635334
input archived log thread=1 sequence=106 RECID=49 STAMP=950635622
input archived log thread=1 sequence=107 RECID=57 STAMP=950635670
input archived log thread=1 sequence=108 RECID=60 STAMP=950635676
input archived log thread=1 sequence=109 RECID=61 STAMP=950697941
input archived log thread=1 sequence=110 RECID=62 STAMP=950698908
channel ORA_DISK_1: starting piece 1 at 2017-07-30 11:01:48
channel ORA_DISK_1: finished piece 1 at 2017-07-30 11:01:49
piece handle=/home/oracle/archbak/rman_arch_20170730_0vsal0ss tag=TAG20170730T110148 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-07-30 11:01:49

指定sequence
備份從108到最久的seq的歸檔
RMAN> backup archivelog from sequence 108 format '/home/oracle/archbak/rman_arch_seq5_%T_%u';
Starting backup at 2017-07-30 11:04:38
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=108 RECID=60 STAMP=950635676
input archived log thread=1 sequence=109 RECID=61 STAMP=950697941
input archived log thread=1 sequence=110 RECID=62 STAMP=950698908
input archived log thread=1 sequence=111 RECID=63 STAMP=950699078
channel ORA_DISK_1: starting piece 1 at 2017-07-30 11:04:38
channel ORA_DISK_1: finished piece 1 at 2017-07-30 11:04:39
piece handle=/home/oracle/archbak/rman_arch_seq5_20170730_10sal126 tag=TAG20170730T110438 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-07-30 11:04:39
指定time
如備份最近3天的歸檔
RMAN> backup archivelog from time 'sysdate-3' format '/home/oracle/archbak/rman_arch_seq5_%T_%u';

Starting backup at 2017-07-30 11:08:45
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=100 RECID=43 STAMP=950632615
input archived log thread=1 sequence=101 RECID=44 STAMP=950633981
input archived log thread=1 sequence=102 RECID=45 STAMP=950634100
input archived log thread=1 sequence=103 RECID=46 STAMP=950634284
input archived log thread=1 sequence=104 RECID=47 STAMP=950634446
input archived log thread=1 sequence=105 RECID=48 STAMP=950635334
input archived log thread=1 sequence=106 RECID=49 STAMP=950635622
input archived log thread=1 sequence=107 RECID=57 STAMP=950635670
input archived log thread=1 sequence=108 RECID=60 STAMP=950635676
input archived log thread=1 sequence=109 RECID=61 STAMP=950697941
input archived log thread=1 sequence=110 RECID=62 STAMP=950698908
input archived log thread=1 sequence=111 RECID=63 STAMP=950699078
input archived log thread=1 sequence=112 RECID=64 STAMP=950699325
channel ORA_DISK_1: starting piece 1 at 2017-07-30 11:08:45
channel ORA_DISK_1: finished piece 1 at 2017-07-30 11:08:46
piece handle=/home/oracle/archbak/rman_arch_seq5_20170730_11sal19t tag=TAG20170730T110845 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-07-30 11:08:46

在備份數(shù)據(jù)庫(kù)的時(shí)候添加plus archvielog備份歸檔日志
RMAN> @/home/oracle/backup_full_arch.sql 

RMAN> run{
2> allocate channel c1 type disk;
3> allocate channel c2 type disk;
4> backup database format '/home/oracle/rman_full_%T_%u'
5> plus archivelog format '/home/oracle/rman_arch_%T_%u';
6> release channel c1;
7> release channel c2;
8> }
released channel: ORA_DISK_1
allocated channel: c1
channel c1: SID=30 device type=DISK
allocated channel: c2
channel c2: SID=36 device type=DISK

Starting backup at 2017-07-30 11:30:50
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=100 RECID=43 STAMP=950632615
… 
channel c2: starting piece 1 at 2017-07-30 11:31:08
including current control file in backup set
channel c1: starting piece 1 at 2017-07-30 11:31:09
channel c2: finished piece 1 at 2017-07-30 11:31:09
piece handle=/home/oracle/rman_full_20170730_18sal2js tag=TAG20170730T113053 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
channel c1: finished piece 1 at 2017-07-30 11:31:10
piece handle=/home/oracle/rman_full_20170730_17sal2js tag=TAG20170730T113053 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-07-30 11:31:10
Starting backup at 2017-07-30 11:31:10
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=114 RECID=66 STAMP=950700670
channel c1: starting piece 1 at 2017-07-30 11:31:10
channel c1: finished piece 1 at 2017-07-30 11:31:11
piece handle=/home/oracle/rman_arch_20170730_19sal2ju tag=TAG20170730T113110 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-07-30 11:31:11
released channel: c1
released channel: c2

RMAN> **end-of-file**


恢復(fù)歸檔日志
 set archivelog destination to ‘/home/oracle/arch'指定恢復(fù)的目錄
 restore archivelog all恢復(fù)所有歸檔,跟backup archivelog類似,也可以指定sequence,scn,time

RMAN> @/home/oracle/restore_arch.sql

RMAN> run{
2> set archivelog destination to '/home/oracle/arch';
3> restore archivelog all;
4> }
executing command: SET ARCHIVELOG DESTINATION
using target database control file instead of recovery catalog
Starting restore at 2017-07-30 11:24:43
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=30 device type=DISK
archived log for thread 1 with sequence 100 is already on disk as file /home/oracle/1_100_947085344.dbf
archived log for thread 1 with sequence 101 is already on disk as file /home/oracle/1_101_947085344.dbf
archived log for thread 1 with sequence 102 is already on disk as file /home/oracle/1_102_947085344.dbf
archived log for thread 1 with sequence 103 is already on disk as file /home/oracle/1_103_947085344.dbf
archived log for thread 1 with sequence 104 is already on disk as file /home/oracle/1_104_947085344.dbf
archived log for thread 1 with sequence 105 is already on disk as file /home/oracle/1_105_947085344.dbf
archived log for thread 1 with sequence 106 is already on disk as file /home/oracle/1_106_947085344.dbf
archived log for thread 1 with sequence 107 is already on disk as file /home/oracle/1_107_947085344.dbf
archived log for thread 1 with sequence 108 is already on disk as file /home/oracle/1_108_947085344.dbf
archived log for thread 1 with sequence 109 is already on disk as file /home/oracle/1_109_947085344.dbf
archived log for thread 1 with sequence 110 is already on disk as file /home/oracle/1_110_947085344.dbf
archived log for thread 1 with sequence 111 is already on disk as file /home/oracle/1_111_947085344.dbf
archived log for thread 1 with sequence 112 is already on disk as file /home/oracle/1_112_947085344.dbf

到此,關(guān)于“rman備份歸檔日志的方法”的學(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í)用的文章!


當(dāng)前標(biāo)題:rman備份歸檔日志的方法-創(chuàng)新互聯(lián)
網(wǎng)頁(yè)地址:http://weahome.cn/article/pcjii.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部