亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
12下一頁
最近訪問板塊 發(fā)新帖
查看: 8203 | 回復(fù): 11
打印 上一主題 下一主題

[數(shù)據(jù)庫] 如何restore db from tag? [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2014-05-21 19:21 |只看該作者 |倒序瀏覽
大師們,我是個新手,

我想restore database從一個指定的tag,

RMAN> list backup summary;


List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1       B  F  A DISK        14-MAY-14       1       1       NO         TAG20140514T095446
2       B  F  A DISK        15-MAY-14       1       1       NO         TAG20140515T162453
3       B  0  A DISK        19-MAY-14       1       1       NO         DB0
4       B  0  A DISK        19-MAY-14       1       1       NO         DB0
5       B  F  A DISK        19-MAY-14       1       1       NO         TAG20140519T193328
6       B  0  A DISK        21-MAY-14       1       1       NO         DB0
7       B  0  A DISK        21-MAY-14       1       1       NO         DB0
8       B  F  A DISK        21-MAY-14       1       1       NO         TAG20140521T191523

比如TAG20140521T191523(最新的一個 full backup),  遇到了錯誤

RMAN> restore database from tag='TAG20140519T193328'
2> ;

Starting restore at 21-MAY-14
using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/21/2014 19:19:09
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

請問這是怎么回事?如何解決?  謝謝

論壇徽章:
7
天蝎座
日期:2013-08-16 23:19:32丑牛
日期:2014-01-08 09:20:14寅虎
日期:2014-01-11 11:03:44午馬
日期:2014-04-28 11:02:40天秤座
日期:2014-05-16 23:24:24摩羯座
日期:2014-07-20 10:46:04卯兔
日期:2014-08-08 15:21:41
2 [報告]
發(fā)表于 2014-05-21 22:54 |只看該作者
備份還在嗎?
crosscheck backup;

論壇徽章:
0
3 [報告]
發(fā)表于 2014-05-22 09:53 |只看該作者
二樓:

crosscheck 通過,沒有報錯

論壇徽章:
0
4 [報告]
發(fā)表于 2014-05-22 10:07 |只看該作者
我用restore database 可以,但是不能指定具體的tag ,很奇怪,

RMAN> restore database;

Starting restore at 22-MAY-14
using channel ORA_DISK_1

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 00001 to /home/oracle/app/oradata/first_time_oracle/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /home/oracle/app/oradata/first_time_oracle/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /home/oracle/app/oradata/first_time_oracle/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/oracle/app/oradata/first_time_oracle/users01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/app/RmanBackup/db0_FIRST_TI_20140521_8
channel ORA_DISK_1: piece handle=/home/oracle/app/RmanBackup/db0_FIRST_TI_20140521_8 tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:04:45
Finished restore at 22-MAY-14

論壇徽章:
7
天蝎座
日期:2013-08-16 23:19:32丑牛
日期:2014-01-08 09:20:14寅虎
日期:2014-01-11 11:03:44午馬
日期:2014-04-28 11:02:40天秤座
日期:2014-05-16 23:24:24摩羯座
日期:2014-07-20 10:46:04卯兔
日期:2014-08-08 15:21:41
5 [報告]
發(fā)表于 2014-05-23 11:57 |只看該作者
指定tag,需要注意語法的書寫的正確性。

論壇徽章:
17
天蝎座
日期:2014-03-10 14:35:04數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-12-13 06:20:00IT運維版塊每日發(fā)帖之星
日期:2015-12-13 06:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-10-20 06:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-08-21 06:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-06-17 22:20:002015年迎新春徽章
日期:2015-03-04 09:57:092015年辭舊歲徽章
日期:2015-03-03 16:54:15技術(shù)圖書徽章
日期:2015-01-12 17:05:35亥豬
日期:2014-11-09 13:05:04金牛座
日期:2014-09-25 11:28:54處女座
日期:2014-09-15 19:58:36
6 [報告]
發(fā)表于 2014-05-23 13:55 |只看該作者
你這臺機器上有幾個數(shù)據(jù)庫?

論壇徽章:
0
7 [報告]
發(fā)表于 2014-05-23 14:01 |只看該作者
回復(fù) 6# jackson198574


    我機器上就一個庫啊

論壇徽章:
0
8 [報告]
發(fā)表于 2014-05-23 14:03 |只看該作者
回復(fù) 5# www_xylove


    restore database from tag=`tagxxxxxx' 不對嗎?

論壇徽章:
0
9 [報告]
發(fā)表于 2014-05-23 14:16 |只看該作者
貼上我的full backup 腳本:

[oracle@localhost RmanBackup]$ cat BackupFull.sh
export ORACLE_BASE=/home/oracle/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATHHOME/binORACLE_HOME/bin

rman target/ << EOF_RMAN
run{
allocate channel c1 type disk;
backup incremental level 0 tag 'db0' format
'/home/oracle/app/RmanBackup/db0_%d_%T_%s' database include current controlfile;
delete noprompt obsolete;
release channel c1;
}

[oracle@localhost RmanBackup]$ pwd
/home/oracle/app/RmanBackup

[oracle@localhost RmanBackup]$ echo $ORACLE_HOME
/home/oracle/app/oracle/product/11.2.0/dbhome_1

論壇徽章:
0
10 [報告]
發(fā)表于 2014-05-23 14:29 |只看該作者
成功了!:wink:

RMAN> list backup summary;


List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1       B  F  A DISK        14-MAY-14       1       1       NO         TAG20140514T095446
2       B  F  A DISK        15-MAY-14       1       1       NO         TAG20140515T162453
3       B  0  A DISK        19-MAY-14       1       1       NO         DB0
4       B  0  A DISK        19-MAY-14       1       1       NO         DB0
5       B  F  A DISK        19-MAY-14       1       1       NO         TAG20140519T193328
6       B  0  A DISK        21-MAY-14       1       1       NO         DB0
7       B  0  A DISK        21-MAY-14       1       1       NO         DB0
8       B  F  A DISK        21-MAY-14       1       1       NO         TAG20140521T191523

RMAN> restore database from tag='DB0';

Starting restore at 23-MAY-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK

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 00001 to /home/oracle/app/oradata/first_time_oracle/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /home/oracle/app/oradata/first_time_oracle/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /home/oracle/app/oradata/first_time_oracle/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/oracle/app/oradata/first_time_oracle/users01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/app/RmanBackup/db0_FIRST_TI_20140521_8
channel ORA_DISK_1: piece handle=/home/oracle/app/RmanBackup/db0_FIRST_TI_20140521_8 tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:04:15
Finished restore at 23-MAY-14

我把庫重啟,然后startup mount ,然后Rman restore 就行了! 以前庫一直是open狀態(tài)。。。。
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP