Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to restore archivelog from backupset?

taohikoDec 4 2009 — edited Dec 5 2009
Hi All,

I backup datafile and archivelog to tape with below command;

RMAN> RUN
2> {
3> allocate channel kt type 'sbt_tape' maxpiecesize=8G parms 'ENV=(xxxxxxx.opt)';
4> sql 'alter system archive log current';
5> backup current controlfile format='CAT_Controlfile_%T_%s_%p.ctl';
6> BACKUP DATABASE;
7> BACKUP ARCHIVELOG ALL;
8> backup spfile;
9> release channel kt;
10> }

And now I restore all datafile to new server completed and next step I will restore archivelog file from backupset but I don't know how to do.

Please suggest me.

Regards,

Hiko

Comments

Anand...
How did you restore.Did you do restore database in rman.You can open the rman command and fire

rman>recover database;
Robert Geier
You could :-

recover database;

or

restore archivelog from logseq = 701 until logseq = 701;

You may find that it is faster and easier to use "duplicate database" instead of restore and recover.
Pavan Kumar
Hi,

You have done good up to some extent. I request to take some time and go through the below doc, which can
guide to go further ahead and learn things how to restore etc.,

http://download.oracle.com/docs/cd/B10501_01/server.920/a96565/rcmsynta46.htm

- Pavan Kumar N
Oracle 9i/10g - OCP
http://oracleinternals.blogspot.com/
EdStevens
taohiko wrote:
Hi All,

I backup datafile and archivelog to tape with below command;

RMAN> RUN
2> {
3> allocate channel kt type 'sbt_tape' maxpiecesize=8G parms 'ENV=(xxxxxxx.opt)';
4> sql 'alter system archive log current';
5> backup current controlfile format='CAT_Controlfile_%T_%s_%p.ctl';
6> BACKUP DATABASE;
7> BACKUP ARCHIVELOG ALL;
8> backup spfile;
9> release channel kt;
10> }

And now I restore all datafile to new server completed and next step I will restore archivelog file from backupset but I don't know how to do.

Please suggest me.

Regards,

Hiko
When working on an rman demo I presented at a conference a couple of years ago, I discovered that when you issue a 'recover' command, any archivelogs that are needed are automatically restored when they are needed for the recovery.
taohiko
Hi All,

I tried below command but show error.

RMAN> run
2> {
3> allocate channel kt type 'sbt_tape' maxpiecesize=8G parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo_kt.opt)';
4> set archivelog destination to '/oradata/archive';
5> restore archivelog all channel kt;
6> }

allocated channel: kt
channel kt: sid=541 devtype=SBT_TAPE
channel kt: Data Protection for Oracle: version 5.5.1.0

executing command: SET ARCHIVELOG DESTINATION

Starting restore at 04-DEC-09

released channel: kt
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/04/2009 21:06:03
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of log thread 2 seq 1423 lowscn 2754481804 found to restore
RMAN-06025: no backup of log thread 2 seq 1422 lowscn 2754390204 found to restore
RMAN-06025: no backup of log thread 2 seq 1421 lowscn 2754380344 found to restore
RMAN-06025: no backup of log thread 2 seq 1420 lowscn 2754378365 found to restore

It look like RMAN that cannot find archivelog file in tape device but I check in backup log file , all archivelog file is backup to backupset , please see below

current log archived
channel kt: starting archive log backupset
channel kt: specifying archive log(s) in backup set
input archive log thread=2 sequence=1365 recid=4086 stamp=700900611
input archive log thread=2 sequence=1366 recid=4088 stamp=700900618
:
:
input archive log thread=2 sequence=1413 recid=4217 stamp=700986965
input archive log thread=2 sequence=1414 recid=4218 stamp=700986972
input archive log thread=2 sequence=1415 recid=4219 stamp=700986979
channel kt: starting piece 1 at 23-OCT-09
channel kt: finished piece 1 at 23-OCT-09
piece handle=cjksipa0_1_1 tag=TAG20091024T040830 comment=API Version 2.0,MMS Version 5.4.1.0


How to restore archivelog file or recover database with backupset in tape device?

Regards,
Hiko
Hemant K Chitale
Your backup log shows archivelogs backed up until seq#1415

However, the restore expects archivelogs 1420 to 1423 to be on tape.

Were the archivelogs after 1415 also backed up to tape successfully ?
taohiko
Hi Hemant,

I tried restore with below condition

restore archivelog from logseq 1365 thread 2 until 1415 thread 2;

that show same error and I checked in log file logseq 1365 - 1415 that backed up to tape successfully.


What should I do?

Regards,

Hiko
Pavan Kumar
Hi,

In case if you don't have any archive logs as required for the DB for consistent state, then you can go head with full recovery, worst case Option is Reset Logs - think over about the backups where made or kept any where.

- Pavan Kumar N
Oracle 9i/10g - OCP
http://oracleinternals.blogspot.com/
taohiko
Hi Pavan,

In backup log that like below
- Allocated device is tape
- Backup controlfile <=== It cannot use when restore and recover
- Backup all datafiles <=== It have datafile and controlfile so I use this controlfile to restore all datafile completed
- Backup all archivelog file <==== It is 1 backup piece and I don't know how to restore archivelog file from it.
- Backup SPfile
- Release channel

So my question is "Can I extract archivelog file from backup piece, if it can, How to extract it?

Regards,

Hiko
Hemant K Chitale
Since the backup went to tape directly, it is for the Media Management Layer (Tivoli in your case) to identify and make available the correct tape.

Oracle only knows the name of the backup piece that it created and "handed over" to Tivoli. When Oracle requests the same backup piece, it is for Tivoli to make it available. Obviously, Tivoli must be maintaining a catalog of all files written to tape (an Oracle RMAN Backup Piece is a "file" to it) so that it maps the filles and tapes.

Work with your Tivoli administrator to read the catalog and identify the tape.


Hemant K Chitale
1 - 10
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 2 2010
Added on Dec 4 2009
10 comments
5,045 views