資料庫
1753928 會員
9043 線上
108810 解決方案
發表新文章

RMAN - "restore archived all" question

 
watermelonyu
教授

RMAN - "restore archived all" question

Hi,



I have a big problem when restoring the archive log files. Here ist the scenario. I have a runinge oracle 9i database. The archive log folder is empty. Then I do a full backup. Therefore I deleted the old backup entrys:



-connect target

-delete archivelog all

-chrosscheck backup

-chrosscheck archivelog all

-delete expired backup;

-delete expired archivelog all

...

-configure controlfile autobackup on

-configure backup optimization off

-backup full database filesperset 1 plus archivelog



the command "list archivelog all" show the follinging entrys:

List of Archived Log Copies

Key: 82 Thrd: 1 Seq: 12

Key: 83 Thrd: 1 Seq: 13



My first question: Why does the Seq number not starts with 1?



After that I deleted all controll files, archive files and dbf files. Then I do a recovery:



-set dbid ..

-connect target ..

-startup nomount

-restore controlfile from '...'

-startup mount force

-restore database

--> that all works fine

-restore archivelog all;

I get the folloging error:

RMAN-06026 some targets not found - aborting restore

RMAN-06025 no backup of log thread 1 seq 11 scn ... found to restore

RMAN-06025 no backup of log thread 1 seq 10 scn ... found to restore

...



Yes of course they are not there. But they aren't also in the list archive log, so why rman want to restore them?

I found out that if I do

"restore archivelog sequence 12" and "restore archivelog seqence 13" it works. After that the recover database works. But I did that manually. How can the script knows which sequences are to recover. Get I back the whole database if I restore only 12 and 13? I must get back, because the backup only generates 12 and 13??? Is it possible to start with sequence number 1 when do a full backup?

Pls help!



Thks & Best Regards,
4則回覆 4
watermelonyu
教授

RMAN - "restore archived all" question



當你restore control file回來時,and startup mount ,

這個control file記錄著7天(default)的rman backup,所以他會知道你以前的資料

但是我不懂為什麼你要用restore archivelog all,當你用restore database,rman會自己去找到需要的archive



另外我不懂你要sequence number 1要做什麼

即時有備份,restore 也用不到阿,因為做fullbackup 的時候,sequence number不曉得已經跑到幾號去了

資料庫新create 完,sequence number已經不是1了









watermelonyu
教授

RMAN - "restore archived all" question

Hi Joey,



Thanks!

I know that during the normal course of recovery with RMAN, there is no real need to recover the archived redo logs. However, restoring one or more archived redo logs may be required occasionally. For example, I might want to use Log Miner to mine some infomation from the archived redo log files stored in our backups.



Best Regards,
watermelonyu
教授

RMAN - "restore archived all" question

Dear Joey,



請問 "restore archivelog all" 是從哪一號的 archived file 開始 restore?



Thks & Best Regards,
watermelonyu
教授

RMAN - "restore archived all" question

Dear 昭境:

應該會從你上一次的Full backup 之後開始倒回來, 不指定的話,都是 full recovery.