可以對(duì)一個(gè)或多個(gè)PDB執(zhí)行完全恢復(fù)而不影響其它為open狀態(tài)的PDB的操作。RMAN有兩種方法來(lái)恢復(fù)PDB:
.連接到CDB的root容器,然后使用restore pluggable database與recover pluggable database命令。這種方法能讓你使用單個(gè)命令來(lái)恢復(fù)多個(gè)PDB。
讓客戶(hù)滿意是我們工作的目標(biāo),不斷超越客戶(hù)的期望值來(lái)自于我們對(duì)這個(gè)行業(yè)的熱愛(ài)。我們立志把好的技術(shù)通過(guò)有效、簡(jiǎn)單的方式提供給客戶(hù),將通過(guò)不懈努力成為客戶(hù)在信息化領(lǐng)域值得信任、有價(jià)值的長(zhǎng)期合作伙伴,公司提供的服務(wù)項(xiàng)目有:空間域名、網(wǎng)頁(yè)空間、營(yíng)銷(xiāo)軟件、網(wǎng)站建設(shè)、邵東網(wǎng)站維護(hù)、網(wǎng)站推廣。
.連接到PDB并使用restore database與recover database語(yǔ)句,這種方法只能恢復(fù)單個(gè)PDB并且能讓你使用相同的命令來(lái)恢復(fù)non-CDB數(shù)據(jù)庫(kù)
使用RMAN恢復(fù)一個(gè)或多個(gè)PDB
1.啟動(dòng)RMAN并使用有sysdba或sysbackup權(quán)限的公共用戶(hù)連接到root容器
[oracle@jytest1 ~]$ rman target/ catalog rco/xxxxx@jypdb_173 Recovery Manager: Release 12.2.0.1.0 - Production on Mon Dec 11 16:56:58 2017 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. connected to target database: JY (DBID=979425723) connected to recovery catalog database
2.關(guān)閉你要執(zhí)行恢復(fù)操作的PDB
SQL> alter pluggable database jypdb,testpdb close immediate; Pluggable database altered. SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE -------------------------------------------------------------------------------------------------------------------------------- ---------- PDB$SEED READ ONLY JYPDB MOUNTED TESTPDB MOUNTED SQL>
3.可選操作,使用configure命令來(lái)配置缺省設(shè)備類(lèi)型與自動(dòng)通道
4.執(zhí)行restore pluggable database與recover pluggable database命令,下面的語(yǔ)句恢復(fù) jypdb,testpdb
RMAN> restore pluggable database jypdb,testpdb; Starting restore at 11-DEC-17 starting full resync of recovery catalog full resync complete allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=2279 instance=jy1 device type=DISK skipping datafile 5; already restored to file +DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/system.256.962209675 skipping datafile 6; already restored to file +DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/sysaux.270.962209675 skipping datafile 8; already restored to file +DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/undotbs1.296.962209675 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00010 to +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/system.271.962209649 channel ORA_DISK_1: restoring datafile 00011 to +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/sysaux.316.962209649 channel ORA_DISK_1: restoring datafile 00012 to +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/undotbs1.264.962209649 channel ORA_DISK_1: restoring datafile 00013 to +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/undo_2.268.962209649 channel ORA_DISK_1: restoring datafile 00014 to +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/users.278.962209649 channel ORA_DISK_1: restoring datafile 00015 to +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/test.275.962210609 channel ORA_DISK_1: reading from backup piece +TEST/rman_backup/jy_979425723_20171211_0osls830_1_1 channel ORA_DISK_1: piece handle=+TEST/rman_backup/jy_979425723_20171211_0osls830_1_1 tag=TAG20171211T164446 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:35 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00016 to +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/system.260.962469409 channel ORA_DISK_1: restoring datafile 00017 to +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/sysaux.259.962469409 channel ORA_DISK_1: restoring datafile 00018 to +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/undotbs1.265.962469409 channel ORA_DISK_1: restoring datafile 00019 to +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/undo_2.266.962469409 channel ORA_DISK_1: restoring datafile 00020 to +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/users.267.962469409 channel ORA_DISK_1: restoring datafile 00021 to +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/test.269.962469409 channel ORA_DISK_1: reading from backup piece +TEST/rman_backup/jy_979425723_20171211_0psls843_1_1 channel ORA_DISK_1: piece handle=+TEST/rman_backup/jy_979425723_20171211_0psls843_1_1 tag=TAG20171211T164446 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:36 Finished restore at 11-DEC-17 RMAN> recover pluggable database jypdb,testpdb; Starting recover at 11-DEC-17 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=2279 instance=jy1 device type=DISK starting media recovery media recovery complete, elapsed time: 00:00:02 Finished recover at 11-DEC-17
5.open PDB(jypdb,testpdb)
SQL> alter pluggable database jypdb,testpdb open; Pluggable database altered. SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE -------------------------------------------------------------------------------------------------------------------------------- ---------- PDB$SEED READ ONLY JYPDB READ WRITE TESTPDB
分享標(biāo)題:使用RMAN來(lái)PDB執(zhí)行完全恢復(fù)
網(wǎng)站鏈接:http://aaarwkj.com/article22/jpoicc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管、虛擬主機(jī)、外貿(mào)建站、定制開(kāi)發(fā)、企業(yè)建站、微信小程序
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)