RMAN can't find redo logs in recovery catalog [message #197817] |
Thu, 12 October 2006 16:24 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Hi all,
I need assistance duplicating my Oracle 9i release 2 database, specifically, adding the redo logs to the recovery catalog.
I have been able to add the target (the "TO") database to the recovery catalog.
When I first issued "duplicate database" I received the following error:
Starting Duplicate Db at 12-OCT-06
using channel ORA_AUX_DISK_1
RMAN-00571: ===============================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
RMAN-00571: ===============================================
RMAN-03002: failure of Duplicate Db command at 10/12/2006 13:26:40
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary filename F:\ORACLE\ORADATA\MY_DB\DATA\DDIX01.DBF conflicts with a file used by the target database
RMAN-05001: auxiliary filename F:\ORACLE\ORADATA\MY_DB\DATA\DDI01.DBF conflicts with a file used by the target database
Many other files were included but I have only specified two. I corrected this with the following command:
RMAN> configure auxname for datafile 'F:\ORACLE\ORADATA\MYDB\data\cattbs.ora' to 'c:\oracle\oradata\sandbox\cattbs.ora';
This was successful. My problem was on adding the redo log files like this. I get the following error:
RMAN> configure auxname for datafile 'F:\ORACLE\ORADATA\MYDB\REDOLOG\REDO4A.LOG' to 'c:\oracle\oradata\sandbox\REDOLOG\REDO4A.LOG';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 10/12/2006 14:09:56
RMAN-20201: datafile not found in the recovery catalog
RMAN-06010: error while looking up datafile: F:\ORACLE\ORADATA\MYDB\REDOLOG\REDO4A.LOG
I am unsure how to add this file to the recovery catalog. I have read that archive logs can be added. I tried this command with the redo logs and was successful (I think) but was still unable to configure and auxname for it. Google searches don't turn up much by way of advice.
Thanks in advance for your help.
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #197990 is a reply to message #197821] |
Fri, 13 October 2006 12:11 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Hi Manesh,
Thanks for your excellent assistance; you have been a great help.
The duplicate is now giving me the following error though:
RMAN-00571: ===============================================
RMAN-00569: ============ ERROR MESSAGE STACK FOLLOWS ======
RMAN-00571: ===============================================
RMAN-03002: failure of Duplicate Db command at 10/13/2006 08:52:18
RMAN-03015: error occurred in stored script Memory Script
ORA-19505: failed to identify file "E:\RMAN_BACKUP\05HVLTNR_1_1"
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
Prior to this I had duplicated the database with the following command with the following output:
RMAN> BACKUP DATABASE FORMAT 'e:\rman_backup\%U';
....
piece handle=E:\RMAN_BACKUP\05HVLTNR_1_1 comment=NONE
Any ideas of what's happening here? E:\RMAN_BACKUP\05HVLTNR_1_1 is the only file in that directory and was created when I backed up the database.
Do I need to add that file via the 'configure auxname' command?
Thanks again.
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #197999 is a reply to message #197990] |
Fri, 13 October 2006 13:24 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
If you are intending to use RMAN extensively for duplication and other business,
Look into scripting all the activities.
Operations like this, should be scripted instead of individual commands (Just for maintaining consistency).
>>BACKUP DATABASE FORMAT 'e:\rman_backup\%U';
Try a duplication script something like this (### is my comments).
rman msglog '/backup/rmanscr/logs/duplicate_prod_test.log' <<EOF ### EOF is unix thing. You can ignore this.
connect target sys/sys@prod ### source database that is about to be duplicated
connect catalog rman/rman@rmandb ### Rman user. i use seperate users for backup/restore and duplication.
connect auxiliary sys/sys ### Target database that would be the cloned database. Make ORACLE_SID is properly set to duplicate database
run {
allocate channel ch1 type disk; ### Upto you. depends on your available resources.
..
..
allocate channel chn type disk;
ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK; ### again, upto you.
ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL aux3 DEVICE TYPE DISK;
set until time "to_date('$dat','MON DD YYYY HH24:MI:SS')"; ### for TSPITR. You do need this for a full restore
@/xxxx/rename_files.lst
duplicate target database to your_duplicate_database
PFILE = /.../initpfile_foryour_duplicateDataabse.ora
LOGFILE
group 1 ('/yourredolofilepath/redo1_1a',
'/yourredolofilepath/redo1_1b') size 128M reuse,
group 2 ('/yourredolofilepath/redo1_2a',
'/yourredolofilepath/redo1_2b') size 128M reuse,
group 3 ('/yourredolofilepath/redo1_3a',
'/yourredolofilepath/redo1_3b') size 128M reuse;
}
exit;
EOF
Now coming to the problems in this case,
>>ORA-19505: failed to identify file "E:\RMAN_BACKUP\05HVLTNR_1_1"
>>ORA-27041: unable to open file
>>OSD-04002: unable to open file
>>O/S-Error: (OS 3) The system cannot find the path specified.
Are you trying to duplicate from one node/host to another?
If so, Make sure those files are 'visible' to other node as if it is a local drive. ie, share the drive.
you have also stated something that is confusing me.
Quote: |
>>Prior to this I had duplicated the database with the following command with the following output:
>>RMAN> BACKUP DATABASE FORMAT 'e:\rman_backup\%U';
>>....
>>piece handle=E:\RMAN_BACKUP\05HVLTNR_1_1 comment=NONE
|
You did a backup. NOT a duplication.
or
did you really meant that, you were able to duplicate the database successfully before?
In that case, you need register the RMAN user back to the primary/source database.
After duplication, the rman user will be 'seeing' the duplicated database instead of the primary/source database.
Unregister the user from duplicate and register back to primary.
For this same purpose, i use seperate users for backup/restore/duplicate.
RMAN user backupSource will always backup and all other will synched to those backupsets (all done in scripting).
So, RMAN user duplicateSource will be seeing PROD backupsets. After duplication RMAN user Duplicatesource will be seeing only the duplicated source. Synch it back to prod (script all these).
[Updated on: Fri, 13 October 2006 13:25] Report message to a moderator
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #198010 is a reply to message #197999] |
Fri, 13 October 2006 15:14 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Hi Manesh,
I am trying to duplicate a database from one host(DB) to another(SANDBOX).
DB's E: is a mapped network drive on SANDBOX (mapped to E:). The share is successful (I can get a directory of the share and the subdirectory).
As for scripting, my preference is to get the duplication working command-by-command first so that I can monitor the process. I will be sure to script the process once I have it working.
As you've already figured out my OS is Windows (Server 2003 for DB and XP Pro for SANDBOX). I'm not sure if that is relevant or not.
I made a typo in my earlier post. I have NOT managed to duplicate the database yet. I was able to back it up with rman. I'm not sure why rman is unable to view the share.
Any thoughts?
Thanks.
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #198335 is a reply to message #198013] |
Mon, 16 October 2006 12:33 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Hi Manesh,
I tried your suggestion of a fresh backup, but was given the following error:
RMAN> BACKUP DATABASE FORMAT 'e:\rman_backup\%U';
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00013 name=F:\<PATH>\<FILENAME>
input datafile fno=00002 name=F:\<PATH>\<FILENAME_2>
...
...
channel ORA_DISK_1: starting piece 1 at 16-OCT-06
RMAN-00571: ===============================================
RMAN-00569: ======= ERROR MESSAGE STACK FOLLOWS ===========
RMAN-00571: ===============================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 10/16/2006 09:55:22
ORA-00600: internal error code, arguments: [ksuloget4], [], [], [], [], [], [], []
I tried clearing all auxname parameters and deleting the existing backup. But I still get this error.
Any suggestions?
Thanks for your continued help. It's much appreciated.
[Updated on: Mon, 16 October 2006 12:59] Report message to a moderator
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #198367 is a reply to message #198354] |
Mon, 16 October 2006 18:26 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Hi Manesh,
Still no luck duplicating the database; my old method resulted in the same error on the piece file.
Using a forum posting that mirrored what you said I was able to re-backup the database.
I've been doing some more reading and I have a few things that I want to try. Your opinion would be appreciated. I also have some questions about each option:
1) OS-made copies of the datafiles and archive logs on the duplicate DB.
* How do I tell rman to use these datafiles (use auxname configure?)
* How do I tell rman to use these archive logs?
2) Map the shares according to Oracle's Metalink document ID 145843.1 regarding network shares Windows and use those shared files.
3) Use auxname config with the piece file.
Lastly I've been reading that the archive logs need to be readable by rman. What configuration is used to specify the archive log location(s)?
Thanks Manesh.
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #198843 is a reply to message #198598] |
Wed, 18 October 2006 16:58 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
What if I copied that backup piece, E:\RMAN_BACKUP\0CHVVUOR_1_1, to a place on the duplicate's local filesystem?
That is the file that rman cannot locate so maybe putting it local will help?
How would I tell rman to look for the backup piece? It's not a datafile, so I don't think I could use the `configure auxname` or `set newname` commands, could I?
Similarly, how would I tell rman that the archive logs are now local?
...frustrated, but keeping positive.
Thanks
|
|
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #199029 is a reply to message #199007] |
Thu, 19 October 2006 14:15 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
Here those scripts i used.
There might be a few typos (i edited the script later to format it).
First one is a pre_duplicate script, which will prepare the RMAN (or us, the users ) for the duplication.
Second is the actual duplication process.
Again, it looks lengthy. actually it is not that complicated.
I can even upload the logfile for this whole process ( if that helps anything for you) from which you can see all the internal processing.
As you can see, if you can map the files across the network everything is all set.
location of /archive and /backup is all understood by rman from catalog.
Setting up environment is the only painful part.
1. #
2. ## this is PRE script. Just preparing for a duplication process.
3. ## It looks lengthy. But a very simple stuff.
4. #
5. #!/bin/bash
6. export ORACLE_SID=secondary #SID for duplicate database
7. export ORACLE_BASE=/u01/base #Oracle base
8. export ORACLE_HOME=/u01/home #oracle home
9. export NLS_DATE_FORMAT='MON DD YYYY HH24:MI:SS' #this date format is must for TSPITR (may be not in 10g. I have not yet checked)
10. echo '************************' #I am using seperate users to backup/restore and clone.
11. echo ' UNREGISTERING C_SECONDARY ' #C_secondary is the user used to clone the database PRIMARY to SECONDARY
12. echo '************************' #after a successul clone, C_SECONDARY will be looking into duplicate database.
13. sqlplus -s c_secondary/rman@rmandb <<EOF #I need to unregister from duplicate and register back to PRIMARY.
14. set feed on; #lines 9-34 will do the same.
15. set feed on;
16. set serveroutput on;
17. prompt
18. declare
19. key rc_database.db_key%type;
20. dbid rc_database.dbid%type;
21. begin
22. select db_key,dbid into key,dbid from rc_database;
23. dbms_output.put_line('dbms_rcvcat.unregisterdatabase('||key||','||dbid||');');
24. dbms_rcvcat.unregisterdatabase(key,dbid);
25. end;
26. /
27. exit;
28. EOF
29. #
30. date
31. #
32. echo '*****************************'
33. echo REGISTERING C_secondary to primary
34. echo '*****************************'
35. rman target sys/sys@primary rcvcat c_secondary/rman@rmandb <<EOF
36. register database;
37. exit;
38. EOF
39. echo '*******************************' #I am renaming the files for duplication
40. echo ' Renaming the files for secondary ' #In source database PRIMARY datafiles are resding in /u02/oradata/primary
41. echo '*******************************' #I wanted the datafiles for SECONDARY to reside on /secondary
42. sqlplus -s c_secondary/rman@rmandb <<EOF #get the info, just a replace would do the job on the fly
43. set heading off; #spool the output and call it later during DUPLICATION
44. set feedback off; #A subtle change in 10g. Tempfile information is now recorded in catalog.
45. set echo off; #we need to take care of that.
46. set verify off; #lines 35-57 does all this
47. set termout off;
48. set trimspool on;
49. set pagesize 3000;
50. spool /backup/rmanscr/secondary/rename_secondary.lst;
51. select 'set newname for datafile '||file#||' to '''||replace(name,'/u02/oradata/primary/','/secondary/') ||''';'
52. from rc_datafile where db_name='PRIMARY';
53. select 'set newname for tempfile '||file#||' to '''||replace(name,'/u02/oradata/primary/','/secondary/') ||''';'
54. from rc_tempfile where db_name='PRIMARY';
55. spool off;
56. exit;
57. EOF
58. #
59. echo '**********************************' #duplication should be done in nomount stage.
60. echo 'Bring secondary to NOMOUNT stage' #i already have a seperate copy of initpfile in a location.
61. echo '**********************************'
62. sqlplus "sys/sys@secondary as sysdba" <<EOF
63. shutdown abort;
64. startup nomount pfile='/backup/rmanscr/secondary/initsecondary.ora';
65. exit;
66. EOF
67. echo
68. echo
69. echo '******************************************************************'
70. echo ' completed pre_duplicate_prod_secondary '
71. echo ' check whether ORACLE_SID=secondary '
72. echo ' run duplicate_primary_secondary '
73. echo '******************************************************************'
Other script:
1. #
2. ####This is the actual duplication script
3. #!/bin/bash
4. export ORACLE_SID=secondary
5. export ORACLE_BASE=/u01/base
6. export ORACLE_HOME=/u01/home
7. export NLS_DATE_FORMAT='MON DD YYYY HH24:MI:SS' #When executed from unix command line, this line will prompt for
8. export SERVER=`uname -n` #timstamp. RMAN will perform a TSPITR based duplication until a point in time specified here.
9. echo "Please enter the time in the format - MON DD YYYY HH24:MI:SS
10. For Example : AUG 20 2006 09:00:00
11. Please enter the time: \c"
12. read dat
13. rman target sys/sys@primary rcvcat c_secondary/rman@rmandb <<EOF #Just a resync to make sure C_SECONDARY is seeing all latest backupsets.
14. resync catalog;
15. exit;
16. EOF
17. rman msglog '/backup/rmanscr/logs/duplicate_primary_secondary.log' <<EOF #A logfile duplicate_primary_secondary.log is created where all information is redirected (from display).
18. connect target sys/sys@primary #Connect to target database which is about to be duplicated
19. connect catalog c_secondary/rman@rmandb #connect to catalog
20. connect auxiliary sys/sys #Connect to AUXILLARY instance (duplicate instance) that is identified by line-4
21. run { #Allocating channels. Number of channels is upto you. More than one channel is preferred.
22. allocate channel ch1 type disk;
23. allocate channel ch2 type disk;
24. allocate channel ch3 type disk;
25. allocate channel ch4 type disk;
26. allocate channel ch5 type disk;
27. allocate channel ch6 type disk;
28. ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK; #Allocation some aux channels. Again, number of channels, upto you.
29. ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
30. ALLOCATE AUXILIARY CHANNEL aux3 DEVICE TYPE DISK;
31. set until time "to_date('$dat','MON DD YYYY HH24:MI:SS')"; #asking RMAN to do an incomplete TSPITR based duplication. Timestamp is read from command line
32. @/backup/rmanscr/secondary/rename_secondary.lst #remember the file we created. This file will have the list of files to be renamed.
33. duplicate target database to secondar #This single line RMAN command does all the magic. All the rest we did, is just to facilitate us.
34. PFILE = /backup/rmanscr/secondary/initsecondary.ora #You can even skip the tablespaces you want and do a selective/partial duplication.
35. LOGFILE #create logfiles on the fly
36. GROUP 1 ('/secondary/redo1a.log',
'/secondary/redo1b.log') SIZE 128M REUSE,
37. GROUP 2 ('/secondary/redo2a.log',
'/secondary/redo2b.log') SIZE 128M REUSE;
38. }
39. exit;
40. ### Just some post duplication work. #You do not need this
41. sqlplus "sys/sys@secondary as sysdba" <<EOF #It is all the customizations you want to be doing after the duplication is done.
42. shutdown; #If you are duplication into a RAC database, then create more threads here.
43. startup mount exclusive pfile='/backup/rmanscr/secondary/initsecondary.ora';
44. alter database noarchivelog;
45. alter database open;
46. shutdown;
47. startup open pfile='/backup/rmanscr/secondary/initsecondary.ora';
48. create spfile='/secondary/spfilesecondary.ora' from pfile='/backup/rmanscr/secondary/initsecondary.ora';
49. shutdown;
50. startup
51. create pfile='/backup/rmanscr/secondary/initsecondary.ora' from spfile;
52. create temporary tablespace temp2 tempfile '/secondary/temp2'
size 2048 M reuse
extent management local
uniform size 1m ;
53. ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP2;
54. drop tablespace temp including contents;
55. EOF
[Updated on: Thu, 19 October 2006 14:30] Report message to a moderator
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #199037 is a reply to message #199030] |
Thu, 19 October 2006 17:38 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Wow Manesh, that's amazing. Thanks so much for this.
I managed to get the database duplicating but had a problem with missing archive logs:
I installed a new physical drive(F:) into the duplicate/auxiliary machine. Then I re-backed up my target database, sending the backup pieces to the F: on the target machine (which also has the datafiles of the target database). I didn't have enough physical drives to do this before.
I then OS-copied the datafiles and the backup pieces to the duplicate machine's F: using the same directory structure. I did not copy over any archive logs. I used shared folders (but not mounted network drives) to copy the files.
Now when I executed DUPLICATE DATABASE it works! Almost. Apparently I am missing at least 1 archive log file. The old admin cleared them out periodically to save disk space.
When I tried earlier attempts to BACKUP DATABASE PLUS ARCHIVELOG I learned that the log file, ARCH_1_12936.arc is missing. My latest log file is ARCH_1_14889.ARC, telling me that the missing log file is VERY old.
I wouldn't think that months-old archive logs would be needed, as the rman backup occurred yesterday!
The specific error is:
...
starting media recovery
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'C:\ORACLE\ORADATA\SANDBOX\SYSTEM01.DBF'
RMAN-00571: ===============================================
RMAN-00569: ====== ERROR MESSAGE STACK FOLLOWS ============
RMAN-00571: ===============================================
RMAN-03002: failure of Duplicate Db command at 10/18/2006 15:03:19
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 14888 scn 286281916 found to restore
RMAN-06025: no backup of log thread 1 seq 14887 scn 286254120 found to restore
RMAN-06025: no backup of log thread 1 seq 14765 scn 283934114 found to restore
RMAN>
Will I be able to do a database duplication with 1 (or more) missing archive log files? Would doing a TSPITR prevent this error?
I'm looking through your last posts now and trying to figure out how to apply them to a windows system, but I am very frustrated with trying to get things running across the network (even more so since I almost-managed the local-copy version).
Thanks again Manesh!
|
|
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #200057 is a reply to message #199209] |
Fri, 27 October 2006 12:52 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Still having trouble with them dang archive logs.
I made a fresh backup including archive logs, copied the backup pieces, datafiles and all archive log files to the auxiliary host. The last archive log sequence backed up was 14 998.
Here's a look at my `SHOW ALL` output:
RMAN> SHOW ALL;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT 'f:\rman_backup\%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\ORACLE\ORA92\DATABASE\SNCFMYDB.ORA'; # default
CONFIGURE AUXNAME FOR DATAFILE 'F:\ORACLE\ORADATA\MYDB\DATA\SYSTEM01.DBF' TO 'C:\ORACLE\ORADATA\SANDBOX\SYSTEM01.DBF
...
CONFIGURE AUXNAME FOR DATAFILE 'F:\ORACLE\ORADATA\MYDB\DATA\UNDOTBS01.DBF' TO 'C:\ORACLE\ORADATA\SANDBOX\UNDOTBS01.D
RMAN>
I started the backup on 25 Oct at 13:04. If I attempt a TSPITR recovery to just before that time (I tried between Oct 25 12:00 and 13:00) I get the following error:
...
RMAN-00571: ===============================================
RMAN-00569: === ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===============================================
RMAN-03002: failure of Duplicate Db command at 10/27/2006 10:38:35
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 20 found to restore
RMAN-06023: no backup or copy of datafile 18 found to restore
...
RMAN>
So I tried a TSPITR shortly approximately during the backup time:
RMAN> RUN {
SET UNTIL TIME "to_date('OCT-25-2006 13:30:00','MON-DD-YYYY HH24:MI:SS')";
DUPLICATE TARGET DATABASE TO sandbox
PFILE=c:\oracle\init_data\init_sandbox.ora
LOGFILE group 1 ('c:\oracle\oradata\sandbox\redolog\redo1_1a','c:\oracle\oradata\sandbox\redolog\redo1_1b') size 128M reuse,
group 2 ('c:\oracle\oradata\sandbox\redolog\redo1_2a','c:\oracle\oradata\sandbox\redolog\redo1_2b') size 128M reuse,
group 3 ('c:\oracle\oradata\sandbox\redolog\redo1_3a','c:\oracle\oradata\sandbox\redolog\redo1_3b') size 128M reuse;
}
Here I get the same error about missing log sequences as seen in my other posts. But in this case, the specific missing log sequence was 14 765.
Now, as I said above, the last log sequence was 14 998:
RMAN> LIST BACKUP;
...
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
12448 606M DISK 00:00:35 25-OCT-06
BP Key: 12466 Status: AVAILABLE Tag: TAG20061025T130339
Piece Name: F:\RMAN_BACKUP\3QI0NR40_1_1
List of Archived Logs in backup set 12448
Thrd Seq Low SCN Low Time Next SCN Next Time
...
1 14765 283934114 12-OCT-06 283967476 12-OCT-06
...
RMAN>
I've verified that this log file IS on the duplicate host in the same path as in the target host.
I am really confused why RMAN isn't finding an archive log that it backed up!
Any suggestions?
|
|
|
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #200425 is a reply to message #200412] |
Mon, 30 October 2006 19:56 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
And duplicate to a time after the backup is done.
If you are missingle a particular arhivelog in catalog, but found in disk,you can catalog it.
rman> catalog archivelog '/mydir/myarchivelog';
But in this case, i am pretty much sure you chose a wrong time.
Look closely into the backup log.
If you are restoring to apoint before backup, you need atleast 1 valid backupset taken before (case1 error: RMAN-06023: no backup or copy of datafile 20 found to restore).
If you are restoring to a point after the backup,
all archives should be visible to RMAN. RMAN by itself is not aware of those new archived logs ( your case 2 in previous post)
[Updated on: Mon, 30 October 2006 20:48] Report message to a moderator
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #200650 is a reply to message #200425] |
Tue, 31 October 2006 13:40 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Hi Mahesh,
RMAN> LIST INCARNATION OF database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 2 NMED_DB 3309219400 YES 190578 15-JUN-04
RMAN>
I tried your suggestion of a TSPITR after the database backup. I OS-copied all archive logs made after the backup and included them in the recovery catalog with the `catalog archivelog` command (including log 14675). I subsequently resync'd the catalog and attempted a duplication...
But no luck! I keep getting the same error (`RMAN-06025: no backup of log thread...`)
Any suggestions of where to move now?
Thanks for all your help with this Mahesh; it is much appreciated.
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #200654 is a reply to message #200650] |
Tue, 31 October 2006 14:06 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
>>I OS-copied all archive logs made after the backup
I assume you also copied the backupsets.
Let us try it again. Success is always just around the corner if we dare to reach there .
Take full backup again (database plus archive logs).
Do this. See if all the archived are cataloged.
RMAN> list backup of archivelog all;
check for the expired/obsolete ones and remove them.
RMAN> report obsolete;
RMAN> delete obsolete;
take another backup,resync catalog. copy files again and try it.
In the last 4 days(for the month end processing), i did 3 duplication and 1 restore.
The backups are automated and one of duplication is also automated. I had no problems.
[Updated on: Tue, 31 October 2006 14:07] Report message to a moderator
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #200903 is a reply to message #200654] |
Wed, 01 November 2006 17:15 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Alright, I did as you suggested.
When I deleted obsoletes, log file 14765 was deleted (along with a host of other files)
I attempted a TSPITR after I made the second backup.
But, the same error of missing log files is still being thrown. Including, strangely, a complaint about log 14765!
Now, I don't know if this is important or now, but I tried to recover the database from SQL*PLUS:
SQL> RECOVER database USING BACKUP CONTROLFILE UNTIL CANCEL;
... [here I specified the location of each of the necessary log files... 14765 was not needed]
SQL> ALTER DATABASE OPEN RESETLOGS;
Database altered.
SQL>
After this I was able to log into the DB and use it! Again, I'm not sure if this is important or not.
Any ideas?
[Updated on: Wed, 01 November 2006 17:21] Report message to a moderator
|
|
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #202218 is a reply to message #201379] |
Wed, 08 November 2006 15:47 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Hey Mahesh,
The only backup command I used for this attempt was:
RMAN> BACKUP database PLUS archivelog;
I tried what you suggested, backing up the archive logs produced since I made the DB backup. This created new backup file pieces (I never noticed these before) that I OS-copied to the duplicate machine. I also copied the archive log files themselves and resync'd the catalog.
I tried a TSPITR with a SET UNTIL sequence 14765. This gave me the following error:
RMAN-06023: no backup or copy of datafile 20 found to restore
So I then tried a TSPITR with a log sequence made the day after I tried the backup. Here I received the following error:
RMAN-06025: no backup of log thread 1 seq 14765 scn 283934114 found to restore
Still not working.
Why is RMAN getting caught up with a log sequence that is very out-of-date? How can I get RMAN to stop asking about it???
Thanks.
|
|
|
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #202418 is a reply to message #202223] |
Thu, 09 November 2006 12:47 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Now, in the backup I noticed that it called for me to run a crosscheck on the backup. That file is attached.
The backup piece that crosscheck throws an error on is the largest file of the backup set (~ 19 GB). I had ensured that the destination path (FORMAT) for the backup was empty before I called the backup command so I am certain that this file is necessary.
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #202420 is a reply to message #202223] |
Thu, 09 November 2006 12:51 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Now, some windows/database use issues prevent me from copying the .dbf files to the auxiliary host whenever I want. The files were copied about 3 hours after the duplication was made.
Now, onto the duplication.
The file's attached. RMAN complains about some missing archive log files necessary to achieve the SET UNTIL TIME that I specified. With the exception of (the cursed) 14 765 log file these logs were made after the database was backed up.
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #202422 is a reply to message #202223] |
Thu, 09 November 2006 12:53 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
So I tried another duplication, setting the TSPITR to a log sequence that wasn't missing (namely, 15 210).
The file is attached and you'll see that here RMAN complains about 14 765 (argh!)
I have a few suspicions:
Is the time delay between the backups and the available .dbf files causing problems?
Perhaps log sequence 14 765 is lost in the recovery catalog "ether" somewhere? Would deleting the catalog database and starting fresh with a new one be a good idea?
I've also noticed a difference between duplicate_01.log and duplicate_01a.log. After the `Starting restore at 09-Nov-06` line, duplicate_01.log shows what seems to me actual copying over of the .dbf files to their destination on the auxiliary host (specified by CONFIGURE AUXNAME). duplicate_01a.log doesn't show this. Is this because rman knows that the files have been copied? Should I be deleting the .dbf files from their final destination after each unsucessful duplication?
Thanks Mahesh! Your tireless help is very appreciated.
[Updated on: Thu, 09 November 2006 13:00] Report message to a moderator
|
|
|
Re: RMAN can't find redo logs in recovery catalog [message #202435 is a reply to message #202422] |
Thu, 09 November 2006 15:00 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
First, a general recomenation.
export NLS_DATE_FORMAT='MON DD YYYY 24HH:MI:SS' #export in unix. set in windows.
For all backups make sure you have this date format (easy to debug in future. Else the backup log does
not have full timestamp). In your logs all i see is
>>Finished backup at 08-NOV-06
So cannot really crosscheck the backup time and time used in duplication.
I guess,somehow you are getting what we call 'gap' in archivedlogs.
RMAN duplication cannot complete without this.
Only alternative is what you have already done (until cancel followed by open resetlogs).
>>setting the TSPITR to a log sequence that wasn't missing (namely, 15 210
Will fail. because it has to come through 14 765 ~!.
RMAN> CROSSCHECK ARCHIVELOG ALL; ##should clear all the gaps
followed by delete expired and delete obsolete.
Just found there is a metalink note(155656.1) that explains all this. it also explains how to extract the last valid sequence.
[Updated on: Mon, 13 November 2006 09:57] Report message to a moderator
|
|
|