Home » RDBMS Server » Backup & Recovery » Archivelog issue - minor but puzzeling (10G 10.2.0.1.0 x64 Win Server 2003)
Archivelog issue - minor but puzzeling [message #364700] Tue, 09 December 2008 12:43 Go to next message
sbaker
Messages: 12
Registered: April 2006
Junior Member
Good afternoon everyone,
I have an issue I'm trying to get my head around here.
We are doing a hot level 0 backup with the following script.
It runs fine with no issues.

run
{
allocate channel ch1 type disk format 'J:\oracle\oradata\ptmn\backup%d_DB_%u_%s_%p';
backup current controlfile;
backup database;
release channel ch1;
}
exit;

The DB is running in archivelog mode so,
once the backup completes we are copying all the archivelogs over to the same location as the backup file on J drive.

Now on to the issue.

When I do a restore with the following code. I can never get it to restore correctly. I recieve the an error stating a datafile needs more recovery after I run the alter database open RESETLOGS command. I can add the last archivelog the database created to the restored logs before I run the restore and it works fine. This log is created AFTER the archivelogs are copied over to the recovery drive. The only thing I can think to do is copy the archivelogs again to the backup drive at a later point. Any insight on this will be most appreciated. I might just have to edit the backup process to include the archivelog files with the RMAN backup, but management isn't wanting to change it.

**********************************************
Connection strings used to connect to the
target and catalog databases.
**********************************************
rman
connect target /
connect catalog *****/****@rcat

**********************************************
Restoring the PTMN controlfile
**********************************************
startup nomount;
run
{
allocate channel ch1 type disk;
restore controlfile;
alter database mount;
}


*********************************************
Recover the database
*********************************************
run
{
allocate channel ch1 type disk;
restore database;
recover database;
release channel ch1;
}

alter database open RESETLOGS;

[Updated on: Tue, 09 December 2008 12:53]

Report message to a moderator

Re: Archivelog issue - minor but puzzeling [message #364734 is a reply to message #364700] Tue, 09 December 2008 18:26 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Why manually copy the archivelogs ? How would you be able to account for copying an archivelog when it's being written to ? In addition, RMAN doesn't know you copied those archivelogs off to another location, so how is RMAN supposed to know they are available for recovery unless you CATALOG them ahead of time.

You should backup the archivelogs with RMAN. This way you can ensure that RMAN has record of the files and the files are copied appropriately.
Re: Archivelog issue - minor but puzzeling [message #365334 is a reply to message #364734] Thu, 11 December 2008 09:36 Go to previous message
sbaker
Messages: 12
Registered: April 2006
Junior Member
I totally agree with you about archiving the archivelogs. It's too long of a story to go into.

Anyways I did resolve the issues.

Simple really: Switch the logfile after the backup completes.
Previous Topic: restore tables
Next Topic: Problem in Registering a Database through cmdfile
Goto Forum:
  


Current Time: Fri Dec 09 00:11:58 CST 2016

Total time taken to generate the page: 0.05239 seconds