Restore entire database..why RESETLOGS
Hi
I have a consistent RMAN backup.I wanted to restore it to another server.my goal is replicating exactly what i have on my server to other.I dont require duplicate command..its just a question of asking why what i have done is not working .Rather why this procedure is not working.
Steps follwed are Restored entire database.
Now I have verified checkpoint_scn in controlfile and datafile headers are exactly same.So no Media recovery required.While recovering databsae is is asking me to use backup controlfile and while opening database it wants me open RESETLOGS.
When Checkpoint_SCN is in sync everywhere and i dont change db_name ,why it asks for RESETLOGS.Rather how it or where from it come to know that controlfile is restored.
I thoght may be REDO log files are not present so it might have identified.I have REDO log file copies so i copied and tried but same thing happened..RESETLOGS
if i copy datafile,controlfile and REDO logfile with OS command,i a
was not aked for RESETLOGS or backup controlfile while recovery and open database.
But in case of RMAN why and how it asks for RESETLOGS.I have everything in place as it is but why shoul i do RESETLOGS.
Now I have verified checkpoint_scn in controlfile and datafile headers are exactly same.So no Media recovery required.RMAN doesn't backup Online Redo Logs. RMAN wouldn't then, be checking Online Redo Logs.
Say you have this scenario :
At Time t1, cold backup of datafiles and controlfile
Current Time is t3 and Online Redo Logs are available
What is restored is the datafiles and controlfiles from t1 and the online redo logs from t3.
Is such a scenario possible ? YES.
(eg. your database crashed at t2 and all datafiles and controlfiles were lost, but the online redo logs are available -- probably because they were mirrored).
Can/should Oracle do an OPEN without a ResetLogs ? Obviously not ! A ResetLogs is necessary here.
But what if you had restored Online Redo Logs of t1 with the database of t1 ? If the controlfile is not of the same point in time, Oracle still cannot be sure that the Online Redo Logs are the "current" ones. Oracle has to assume and do an Incomplete Recovery. This has to be followed by an OPEN RESETLOGS.
While recovering databsae is is asking me to use backup controlfile and while opening database it wants me open RESETLOGS.RMAN wouldn't be "asking .. to use a backup controlfile". It seems that you are using the SQL RECOVER DATABASE command. If a BACKUP CONTROLFILE is used, an OPEN RESETLOGS is required. That is mandatory because Oracle cannot trust the controlfile (which it , by definition, would assume to be not "current") to have the latest information.
When you do a non-RMAN backup and Recovery, the ALTER DATABASE OPEN is issued from SQL. This checks the Online Redo Logs. If it finds that the Online Redo Logs are as of t3 but the database files, even consistent, are as of t1, then it will complain and require an OPEN RESETLOGS.
if i copy datafile,controlfile and REDO logfile with OS commandIf this is cold copy, then it doesn't require Recovery. If all three sets of files are consistent, than an Open ResetLogs is not required.
Similar Messages
-
'alter database open resetlogs' didn't reset one of the datafiles
I've spent the last three and a half weeks recovering an oracle database (11g 64-bit linux) because of a corrupt block in an online redo log (which I thought was being written to multiple locations). I restored the files, moving some of them around in the process; recovered to the latest possible point; moved files back to their proper location; ran 'alter database open resetlogs'; and one of the datafiles (from a bigfile tablespace) didn't get reset. I checked afterward, and it was marked offline. I do not remember placing the file offline, and cannot find such a statement in my last 300 sqlplus commands, which includes commands well before I renamed this file and the commands surrounding the rename.
Restoring/recovering the database again will take too long, and is a remarkably poor option. Even if the database had opened correctly, the affected tablespace would not have been touched in the two or three minutes the database was open. Is there any way to force oracle to reset the logs again or otherwise fix this one file to mark it with the same date? Only allowing the resetlogs option after an incomplete recovery seems a poor restriction, especially, if files can slip through like this. I'm suspecting there is someway to just fix the checkpoint values for the tablespace, but I don't know where to begin. This particular file is <5% of the database, so if I have to do some sort of backup/restore with just it, that is probably doable.0: 11.1.0.6.0 on SUSE Linux Enterprise Server 10 SP2
1: rman
backup format '/opt/oracle/backup/mydatabase_%Y-%M-%D_%s_datafiles_%p' (database);
backup format '/opt/oracle/backup/mydatabase_%Y-%M-%D_%s_archivelogs_%p' archivelog all delete input;
backup format '/opt/oracle/backup/mydatabase_%Y-%M-%D_%s_control_%p' current controlfile spfile;
2:
restore database; --not sure what datafiles were restored with this
restore datafile X; --several files were restored individually
recover database until scn 1137554504; -- I verified that all datafiles were on the same checkpoint after this finished. Not having placed any files offline, I didn't bother checking that.
3:
SQL> alter database open resetlogs;
Database altered.
Elapsed: 00:04:20.34
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
4: Nothing in the tablespace has been touched since I ran 'alter database open resetlogs;'. It also appears that oracle placed the file offline (without me telling it to do so) and left it that way through the resetlogs, leaving the tablespace unusable during the time it was opened. The only things that would be out of date are the 'RESETLOGS_CHANGE#', the 'CHECKPOINT_CHANGE#', and associated values. It's still at the last scn before the resetlogs, and the system has been in archivelog mode the entire time. This is all information that Oracle could be tracking, and from a program logic standpoint there is no reason why Oracle cannot tie together the changes before the resetlogs, the resetlogs command and the changes after the resetlogs into a new, continuous string of changes. I assume there is some such feature in a high-caliber program because I'm actually a programmer (who would have included such advanced tracking features), and I've become a DBA out of necessity. I admit to not knowing all of the oracle DBA commands, hence me posting here before doing the work of submitting a request to metalink.
5: I consider it a poor restriction because it doesn't always reset the logs on all files, and as far as my knowledge goes it has rendered my 3.5 week recovery process WORTHLESS. I suppose it could cause numerous errors, especially if the database wasn't cleanly shut down, but having the ability to do something equivalent to datafiles that oracle skipped the process on seems quite useful in my situation. I guess the more fundamental problem to complain about is that it would apply such changes to only some of the files, while leaving others unusable, instead of just giving me an error that some files weren't going to be reset, but I think I'm done venting my Oracle frustrations for now.
Am I stuck with a tablespace that I cannot bring online with the database open, or is there some sort of 'alter database datafile' command (or anything else) that I know nothing of that will fix the straggling file?
Edited by: jbo5112 on Oct 5, 2009 3:33 PM -- obfuscated some file names to secure identity. -
Queries on DATABASE OPEN RESETLOGS and lost Control Files
Hi I have some queries on RESETLOGS I would be keen to hear some answers on
Q1. If I am doing a PITR and I end in ALTER DATABASE OPEN RESETLOGS, what happens about any Archived Redo Log files ( still in situ ) that were from the original source database but were at a future point in time ? Are they just ignored by any future restore ( since their log sequence number will be different ? ) and eventually over written or purged out ?
Q2. When you create a new incarnation using RESETLOGS can you Flashback Database to before this ?
Q3. If I have lost all my Control Files and have not created a backup control file or done a backup to trace of the control file, can I simply restore one of the actual control files from my last backup and use RECOVER DATABASE USING BACKUP CONTROLFILE AUTO; or will this only work with a bonafide backup control file ( i.e. one created via ALTER DATABASE BACKUP CONTROLFILE TO ‘<file spec>’; )
Q4. When I issue RECOVER DATABASE USING BACKUP CONTROLFILE AUTO;
Do I have to ALTER DATABASE OPEN RESETLOGS at the end of the recovery ? I have seen this documented but I am not sure why I would need to reset the redo logs and instead simply open the database ?
Q5. If I am running the CREATE CONTROL FILE command from an ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
Do I need to use the NORESETLOGS or RESETLOGS ? How do I know which to use ?
thanks,
JimJimbo wrote:
Hi I have some queries on RESETLOGS I would be keen to hear some answers on
Q1. If I am doing a PITR and I end in ALTER DATABASE OPEN RESETLOGS, what happens about any Archived Redo Log files ( still in situ ) that were from the original source database but were at a future point in time ? Are they just ignored by any future restore ( since their log sequence number will be different ? ) and eventually over written or purged out ?
what happens when you try it?
Q2. When you create a new incarnation using RESETLOGS can you Flashback Database to before this ?
what happens when you try it?
Q3. If I have lost all my Control Files and have not created a backup control file or done a backup to trace of the control file, can I simply restore one of the actual control files from my last backup and use RECOVER DATABASE USING BACKUP CONTROLFILE AUTO; or will this only work with a bonafide backup control file ( i.e. one created via ALTER DATABASE BACKUP CONTROLFILE TO ‘<file spec>’; )
what happens when you try it?
Q4. When I issue RECOVER DATABASE USING BACKUP CONTROLFILE AUTO;
Do I have to ALTER DATABASE OPEN RESETLOGS at the end of the recovery ? I have seen this documented but I am not sure why I would need to reset the redo logs and instead simply open the database ?
what happens when you try it?
Q5. If I am running the CREATE CONTROL FILE command from an ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
Do I need to use the NORESETLOGS or RESETLOGS ? How do I know which to use ?
what happens when you try it? -
Hi,
when I try to duplicate my database by RMAN I have :
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 1452 scn 252730 found to restore
I connect to duplicate database in sqlplus , it is not open.
Than I do :
alter database open resetlogs;
And the database would be open.
Is it bad ? Will we lose the data ? If yes what solution do you propose ?
Effectively I do not know how to use this informations :
log thread 1 seq 1452 scn 252730 found to restore
Please help me to use this informations if helplfull.
Many thanks.From Oracle Error documentation:
RMAN-06025: no backup of log thread number seq number lowscn string found to restore
Cause: An archive log restore restore could not proceed because no backup of the indicated archived log was found. It may be the case that a backup of this file exists but does not satisfy the criteria specified in the user"s restore operands.
Action: None - this is an informational message. See message 6026 for further details.
RMAN-06026: some targets not found - aborting restore
Cause: Some of the files specified for restore could not be found. Message 6023, 6024, or 6025 is also issued to indicate which files could not be found. Some common reasons why a file can not be restored are that there is no backup or copy of the file that is known to recovery manager, or there are no backups or copies that fall within the criteria specified on the RESTORE command, or some datafile copies have been made but not cataloged.
Action: The Recovery Manager LIST command can be used to display the backups and copies that Recovery Manager knows about. Select the files to be restored from that list.
It seems you do not have some of the files required for recover operation. Could you post how this database is backed up using RMAN? -
Unable to recover database after rman recovery and database open resetlogs
I am running Oracle 10.2.0.5 on OpenSUSE 9. I have been trying to upgrade the database to 11g, through dbua. I was getting stuck at one point during the Oracle Server install and the upgrade failed and I was forced to restore the database to an earlier backup.
Below is the current place that I am stuck. As you can see I opened the database multiple times and reset the logs. Now I am afraid that my controlfile and redo log backups are out of sync and i can't get them back on track. Before when I actually got the database recovered RMAN would immediately throw:
RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
OPA-00600: ORA-00600: internal error code, arguments: ...
The database would open with ALTER DATABASE RESETLOGS but any query on non-system tables would fail and throw:
ORA-04045: errors during recompilation/revalidation of LCRS_DEV1.FACILITY_REF
ORA-00600: internal error code, arguments: [17069], [0x1158ED180], [], [], [],
I hope I have not dug myself into too deep of a hole here.
Here is the trace from my most recent attempt.
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 3070230528 bytes
Fixed Size 2099424 bytes
Variable Size 301991712 bytes
Database Buffers 2751463424 bytes
Redo Buffers 14675968 bytes
RMAN> list incarnation of database;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 08/02/2011 15:49:04
ORA-01507: database not mounted
RMAN> restore controlfile from autobackup;
Starting restore at 02-AUG-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
recovery area destination: /opt/oracle/flash_recovery_area
database name (or database unique name) used for search: LCRSDEV
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758129928_73jr2s7p_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
output filename=/opt/oracle/oradata/LCRSDEV/control01.ctl
output filename=/opt/oracle/oradata/LCRSDEV/control02.ctl
output filename=/opt/oracle/oradata/LCRSDEV/control03.ctl
Finished restore at 02-AUG-11
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 LCRSDEV 756543625 PARENT 1 22-OCT-05
2 2 LCRSDEV 756543625 PARENT 525876 20-JAN-11
3 3 LCRSDEV 756543625 PARENT 92348137 18-JUL-11
4 4 LCRSDEV 756543625 PARENT 95654931 01-AUG-11
5 5 LCRSDEV 756543625 PARENT 95675699 01-AUG-11
6 6 LCRSDEV 756543625 PARENT 95676699 02-AUG-11
7 7 LCRSDEV 756543625 PARENT 95676700 02-AUG-11
8 8 LCRSDEV 756543625 CURRENT 95676701 02-AUG-11
RMAN> restore database until scn 95676700;
Starting restore at 02-AUG-11
Starting implicit crosscheck backup at 02-AUG-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 6 objects
Finished implicit crosscheck backup at 02-AUG-11
Starting implicit crosscheck copy at 02-AUG-11
using channel ORA_DISK_1
Finished implicit crosscheck copy at 02-AUG-11
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758129928_73jr2s7p_.bkp
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/02/2011 15:52:04
RMAN-20208: UNTIL CHANGE is before RESETLOGS change
RMAN> restore database;
Starting restore at 02-AUG-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /opt/oracle/oradata/LCRSDEV/system01.dbf
restoring datafile 00002 to /opt/oracle/oradata/LCRSDEV/undotbs01.dbf
restoring datafile 00003 to /opt/oracle/oradata/LCRSDEV/sysaux01.dbf
restoring datafile 00004 to /opt/oracle/oradata/LCRSDEV/users01.dbf
restoring datafile 00005 to /opt/oracle/oradata/LCRSDEV/LCRS_TBS.dbf
channel ORA_DISK_1: reading from backup piece /opt/oracle/flash_recovery_area/LCRSDEV/backupset/2011_07_22/o1_mf_nnndf_TAG20110722T111922_72m8rc5x_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/opt/oracle/flash_recovery_area/LCRSDEV/backupset/2011_07_22/o1_mf_nnndf_TAG20110722T111922_72m8rc5x_.bkp tag=TAG20110722T111922
channel ORA_DISK_1: restore complete, elapsed time: 00:23:36
Finished restore at 02-AUG-11
RMAN> recover database until scn 95676700;
Starting recover at 02-AUG-11
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/02/2011 16:16:28
RMAN-20208: UNTIL CHANGE is before RESETLOGS change
RMAN> recover database;
Starting recover at 02-AUG-11
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 90 is already on disk as file /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_90_72ml85v3_.arc
archive log filename=/opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73jr20qc_.arc thread=1 sequence=1
unable to find archive log
archive log thread=1 sequence=1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/02/2011 16:25:04
RMAN-06054: media recovery requesting unknown log: thread 1 seq 1 lowscn 95676701Thanks for the reply Hemant. I have reset the database for the controlfile that I am using as backup and now I am not able to recover until the correct SCN. I am thinking that my recovery catalog is bad. If I mount with the current controlfile I have this list of incarnations:
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
*1 1 LCRSDEV 756543625 PARENT 1 22-OCT-05*
*2 2 LCRSDEV 756543625 PARENT 525876 20-JAN-11*
*3 3 LCRSDEV 756543625 PARENT 92348137 18-JUL-11*
*4 4 LCRSDEV 756543625 PARENT 95654931 01-AUG-11*
*5 5 LCRSDEV 756543625 PARENT 95675699 01-AUG-11*
*6 6 LCRSDEV 756543625 PARENT 95676699 02-AUG-11*
*7 7 LCRSDEV 756543625 PARENT 95676700 02-AUG-11*
*8 8 LCRSDEV 756543625 PARENT 95676701 02-AUG-11*
*9 9 LCRSDEV 756543625 CURRENT 95676702 02-AUG-11*
However if I restore the controlfile to the earlier version I am getting the following output from the process:
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 3070230528 bytes
Fixed Size 2099424 bytes
Variable Size 301991712 bytes
Database Buffers 2751463424 bytes
Redo Buffers 14675968 bytes
RMAN> restore controlfile from '/opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_07_22/o1_mf_s_757164997_72m9rqw3_.bkp';
Starting restore at 03-AUG-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output filename=/opt/oracle/oradata/LCRSDEV/control01.ctl
output filename=/opt/oracle/oradata/LCRSDEV/control02.ctl
output filename=/opt/oracle/oradata/LCRSDEV/control03.ctl
Finished restore at 03-AUG-11
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 LCRSDEV 756543625 PARENT 1 22-OCT-05
2 2 LCRSDEV 756543625 PARENT 525876 20-JAN-11
3 3 LCRSDEV 756543625 CURRENT 92348137 18-JUL-11
RMAN> restore database until scn 92348137;
Starting restore at 03-AUG-11
Starting implicit crosscheck backup at 03-AUG-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 03-AUG-11
Starting implicit crosscheck copy at 03-AUG-11
using channel ORA_DISK_1
Finished implicit crosscheck copy at 03-AUG-11
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_01/o1_mf_1_1_73g3hn6o_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_01/o1_mf_1_2_73g3hnxq_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_01/o1_mf_1_1_73g0rts6_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_134_72v9gv4s_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_138_72v9p4b4_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_120_72v8wwg0_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_121_72v8x5ty_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_131_72v9cnrv_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_139_72v9q5ok_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_137_72v9n4t5_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_136_72v9l88q_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_123_72v8ytm8_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_132_72v9dcxd_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_124_72v8zkg0_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_128_72v96qm1_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_135_72v9jqmx_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_129_72v98q3r_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_125_72v91g3b_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_118_72v8v8r4_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_127_72v9626w_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_130_72v9bqtb_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_141_72vncy6g_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_122_72v8ycd4_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_126_72v94cns_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_133_72v9fb17_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_140_72vn6wgo_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_119_72v8v9hf_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73j3wo01_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_2_73josgf1_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73jr20qc_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_2_73jh223h_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73josflf_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73jvqdqs_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_3_73josh91_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73j91rh9_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_91_72mqlnx9_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_111_72mrdr5m_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_96_72mqx958_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_114_72mrgsf9_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_94_72mqs6gj_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_102_72mr3893_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_99_72mr2h6c_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_104_72mr5hfm_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_109_72mrc83z_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_98_72mr080w_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_93_72mqq36m_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_97_72mqz0mm_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_116_72mrk268_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_101_72mr31yv_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_110_72mrddhg_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_95_72mqv3hp_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_105_72mr5vq4_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_115_72mrjd2s_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_106_72mr7hnt_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_100_72mr2qfc_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_112_72mrfc5j_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_107_72mr909t_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_103_72mr4pol_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_113_72mrfsb9_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_117_72mrl5mf_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_108_72mrb13l_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_90_72ml85v3_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_92_72mqnxz1_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_26/o1_mf_1_143_72y6ww71_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_26/o1_mf_1_144_72ybybps_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_26/o1_mf_1_142_72xt10j7_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_26/o1_mf_1_145_72yccy5z_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_01/o1_mf_s_758043324_73g3jfxx_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_01/o1_mf_s_758035850_73fw6vrc_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758133684_73jvr5px_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758127608_73jot9x0_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758109276_73j3xfom_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758129928_73jr2s7p_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_07_22/o1_mf_s_757164997_72m9rqw3_.bkp
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/03/2011 12:53:19
RMAN-20208: UNTIL CHANGE is before RESETLOGS change
Edited by: K Doyle on Aug 3, 2011 10:22 AM -
Hi,
I can't able to restore a database, below is the error,please help me out?
TITLE: Microsoft SQL Server Management Studio
Restore failed for Server 'xxxxx'. (Microsoft.SqlServer.SmoExtended)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: The media set has 2 media families but only 1 are provided. All members must be provided. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&LinkId=20476Basically the error is telling you that when the backup was taken it was made to two backup files rather than one, so the backup was stripped across the two of them. You're now trying to restore the backup using only one of those files, which is why you're
getting the error. To do the restore you need to use both files not just one of them. There's a good discussion of this error here
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/abf50e00-c9b0-4809-9e61-43ed8a53e968/the-media-set-has-2-media-families-but-only-1-are-provided?forum=sqltools which goes into more detail of how you end up in this situation, and also methods you
can use to find out what the second file was (in case you don't know) so you can hopefully track it down. -
Error during restore/recovery and 'open resetlogs'
Hello forum. I'm attempting to restore a database to a new host and have run into an error during the opening of the database (with resetlogs). The renaming of the datafiles, restore, switching of datafiles, and recovery are all done by an rman script, the contents of which are below:
# Restore production database to DR site using file system
# instead of ASM
run {
set newname for datafile 1 to '/opt/oracle/product/10gR2/oradata/DB01/system.dbf';
set newname for datafile 2 to '/opt/oracle/product/10gR2/oradata/DB01/undotbs1.dbf';
set newname for datafile 3 to '/opt/oracle/product/10gR2/oradata/DB01/sysaux.dbf';
set newname for datafile 4 to '/opt/oracle/product/10gR2/oradata/DB01/users.dbf';
set newname for datafile 5 to '/opt/oracle/product/10gR2/oradata/DB01/undotbs2.dbf';
set newname for datafile 6 to '/opt/oracle/product/10gR2/oradata/DB01/file1.dbf';
set newname for datafile 7 to '/opt/oracle/product/10gR2/oradata/DB01/file2.dbf';
restore database;
switch datafile all;
recover database;
I get the following output:
RMAN> @/home/oracle/scripts/rman_dr.rman
RMAN> # Restore production database to DR site using file system
2> # instead of ASM
3> #
4> run {
5> set newname for datafile 1 to '/opt/oracle/product/10gR2/oradata/DB01/system.dbf';
6> set newname for datafile 2 to '/opt/oracle/product/10gR2/oradata/DB01/undotbs1.dbf';
7> set newname for datafile 3 to '/opt/oracle/product/10gR2/oradata/DB01/sysaux.dbf';
8> set newname for datafile 4 to '/opt/oracle/product/10gR2/oradata/DB01/users.dbf';
9> set newname for datafile 5 to '/opt/oracle/product/10gR2/oradata/DB01/undotbs2.dbf';
10> set newname for datafile 6 to '/opt/oracle/product/10gR2/oradata/DB01/file1.dbf';
11> set newname for datafile 7 to '/opt/oracle/product/10gR2/oradata/DB01/file2.dbf';
12>
13> restore database;
14> switch datafile all;
15> recover database;
16> }
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 03-JAN-08
Starting implicit crosscheck backup at 03-JAN-08
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 651 objects
Finished implicit crosscheck backup at 03-JAN-08
Starting implicit crosscheck copy at 03-JAN-08
using channel ORA_DISK_1
Crosschecked 1 objects
Finished implicit crosscheck copy at 03-JAN-08
searching for all files in the recovery area
cataloging files...
no files cataloged
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /opt/oracle/product/10gR2/oradata/DB01/system.dbf
restoring datafile 00002 to /opt/oracle/product/10gR2/oradata/DB01/undotbs1.dbf
restoring datafile 00003 to /opt/oracle/product/10gR2/oradata/DB01/sysaux.dbf
restoring datafile 00004 to /opt/oracle/product/10gR2/oradata/DB01/users.dbf
restoring datafile 00005 to /opt/oracle/product/10gR2/oradata/DB01/undotbs2.dbf
restoring datafile 00006 to /opt/oracle/product/10gR2/oradata/DB01/file1.dbf
restoring datafile 00007 to /opt/oracle/product/10gR2/oradata/DB01/file2.dbfchannel ORA_DISK_1: reading from backup piece /ocfs2/remitpro/oracleBackups/tmp/rman_LV0_DB01.642899284.1.1.bus
channel ORA_DISK_1: restored backup piece 1
piece handle=/ocfs2/remitpro/oracleBackups/tmp/rman_LV0_DB01.642899284.1.1.bus tag=20080101_LV0_DB
channel ORA_DISK_1: restore complete, elapsed time: 01:22:28
Finished restore at 03-JAN-08
datafile 1 switched to datafile copy
input datafile copy recid=14 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/system.dbf
datafile 2 switched to datafile copy
input datafile copy recid=15 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/undotbs1.dbf
datafile 3 switched to datafile copy
input datafile copy recid=16 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/sysaux.dbf
datafile 4 switched to datafile copy
input datafile copy recid=17 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/users.dbf
datafile 5 switched to datafile copy
input datafile copy recid=18 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/undotbs2.dbf
datafile 6 switched to datafile copy
input datafile copy recid=19 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/file1.dbf
datafile 7 switched to datafile copy
input datafile copy recid=20 stamp=643049225 filename=/opt/oracle/product/10gR2/oradata/DB01/file2.dbf
Starting recover at 03-JAN-08
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=1005
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=1365
channel ORA_DISK_1: reading from backup piece /ocfs2/remitpro/oracleBackups/tmp/rman_LV0_DB01.642900444.1.1.bus
channel ORA_DISK_1: restored backup piece 1
piece handle=/ocfs2/remitpro/oracleBackups/tmp/rman_LV0_DB01.642900444.1.1.bus tag=20080101_LV0_DB
channel ORA_DISK_1: restore complete, elapsed time: 00:00:05
archive log filename=/opt/oracle/product/10gR2/db/flash_recovery_area/DB01/archivelog/2008_01_03/o1_mf_1_1365_3qtshnfv_.arc thread=1 sequence=1365
archive log filename=/opt/oracle/product/10gR2/db/flash_recovery_area/DB01/archivelog/2008_01_03/o1_mf_2_1005_3qtshncz_.arc thread=2 sequence=1005
channel default: deleting archive log(s)
archive log filename=/opt/oracle/product/10gR2/db/flash_recovery_area/DB01/archivelog/2008_01_03/o1_mf_1_1365_3qtshnfv_.arc recid=2418 stamp=643049236
unable to find archive log
archive log thread=1 sequence=1366
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/03/2008 16:47:22
RMAN-06054: media recovery requesting unknown log: thread 1 seq 1366 lowscn 181804603
RMAN> **end-of-file**
I searched for a decription of the 06054 error, and found that if the archive logs weren't available, then to run "alter database open resetlogs;", which I did. Here's the output:
RMAN> alter database open resetlogs;
database opened
RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
ORACLE error from target database:
ORA-06553: PLS-801: internal error [56319]
I've done all of this twice now, with the same result. I've googled PLS-801 and found more than a few instances of people getting this code, but not during a database open after a restore. Can anyone shed some light on what might have gone wrong? In the interest of brevity, I left out the rest of the restore process prior to running the database restore, but other than setting "compatible" and "db_recovery_file_dest_size", it was all by the book.
Thanks in advance.Thanks for the reply Pierre.
I am not using RMAN Duplicate. Yes, the source of the backup is an RAC. The destination is a single server, with the DB on the filesystem. Here's an overview of of the commands I ran and the procedure.
Copied tar'd backup controlfile and datafiles to destination machine. Untar'd. Install 10.2.0.1.0 on destination machine, patch to 10.2.0.2.0.
OS> sqlplus /nologin
SQL> alter system set compatible = '10.2.0.2.0' scope=spfile;
SQL> alter system set db_recovery_dest_file_size = '8g'; scope spfile;
SQL> shutdown immediate;
SQL> startup; (to verify changes took...)
SQL> shutdown immediate;
OS> Copy control file from untar'd dir and place in $ORACLE_HOME/dbs/, truncate name to c-DBID-date-00.
OS> rman target /
RMAN> startup nomount;
RMAN> set dbid <dbid from control file>;
RMAN> restore controlfile from autobackup; (finds control file with no problem...)
RMAN> alter database mount;
RMAN> @/home/oracle/rman_dr.rman (script cited in first post, to rename datafiles from ASM to filesystem, restore, switch files, and recover...)
RMAN> alter database open resetlogs; (as cited before...)
If I'm not using Duplicate and not specifying dates, the UNTIL/SET UNTIL commands aren't necessary, correct? -
Could someone help me restore my photos? I was trying to "restore my database" in iPhoto when it shut down - now my thumbnails are distorted, logged under a new name, and when you click on a thumbnail it opens as another photo. I was following another "helpful hint" hold down the option and command key and restart iPhoto - select the top three and you should be able to get rid of the dreaded exclamation point. My MAC ran through the first two options dealing with thumbnails, but crashed during the "restore database" step and now I have a mess. Help, please. Thank you.
Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. -
Problem with restoring a database from cold backup
All,
I've got a 10.2.0.4 database that we perform a cold backup on every night with RMAN. On Sunday 2/21, we have level 0 backup. On Monday-Wednesday nights, we take a cold level 1. We also perform a controlfile auto backup each night.
On a second server where I want to restore the database (same version of Oracle 10.2.0.4), I've copied the control file auto backups, the level 0 and the most recent level 1. I now want to restore. I use an RMAN script similar to the following to restore the control files:
connect target /;
set dbid 1973354860;
# Restore the controlfile from the tag that auto backed up the controlfile at the end of the level 0
run
startup nomount;
allocate channel c1 type disk;
restore controlfile to '/u01/app/oracle/oradata/ORADB1/control01.ctl' from AUTOBACKUP;
restore controlfile to '/u02/app/oracle/oradata/ORADB1/control02.ctl' from AUTOBACKUP;
restore controlfile to '/u03/app/oracle/oradata/ORADB1/control03.ctl' from AUTOBACKUP;
release channel c1;
shutdown immediate;
After the control files restore successfully, I perform some RMAN checks to ensure that all of the files I need for a recovery are there. The RMAN> list backup of database; command shows all of my backup savesets as AVAILABLE for the level0 and level1 backups.
I then try a restore database command; and get the following errors:
RMAN> run
2> {
3> allocate channel c1 type disk;
4> allocate channel c2 type disk;
5> allocate channel c3 type disk;
6> allocate channel c4 type disk;
7> restore database from tag='TAG20100221T200045';
8> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: sid=74 devtype=DISK
allocated channel: c2
channel c2: sid=70 devtype=DISK
allocated channel: c3
channel c3: sid=166 devtype=DISK
allocated channel: c4
channel c4: sid=168 devtype=DISK
Starting restore at 25-FEB-10
released channel: c1
released channel: c2
released channel: c3
released channel: c4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/25/2010 13:33:19
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 44 found to restore
RMAN-06023: no backup or copy of datafile 43 found to restore
RMAN-06023: no backup or copy of datafile 42 found to restore
RMAN-06023: no backup or copy of datafile 40 found to restore
RMAN-06023: no backup or copy of datafile 39 found to restore
RMAN-06023: no backup or copy of datafile 38 found to restore
RMAN-06023: no backup or copy of datafile 37 found to restore
RMAN-06023: no backup or copy of datafile 36 found to restore
RMAN-06023: no backup or copy of datafile 35 found to restore
RMAN-06023: no backup or copy of datafile 34 found to restore
RMAN-06023: no backup or copy of datafile 33 found to restore
RMAN-06023: no backup or copy of datafile 32 found to restore
RMAN-06023: no backup or copy of datafile 31 found to restore
RMAN-06023: no backup or copy of datafile 30 found to restore
RMAN-06023: no backup or copy of datafile 29 found to restore
RMAN-06023: no backup or copy of datafile 28 found to restore
RMAN-06023: no backup or copy of datafile 27 found to restore
RMAN-06023: no backup or copy of datafile 26 found to restore
RMAN-06023: no backup or copy of datafile 25 found to restore
RMAN-06023: no backup or copy of datafile 24 found to restore
RMAN-06023: no backup or copy of datafile 23 found to restore
RMAN-06023: no backup or copy of datafile 22 found to restore
RMAN-06023: no backup or copy of datafile 21 found to restore
RMAN-06023: no backup or copy of datafile 20 found to restore
RMAN-06023: no backup or copy of datafile 19 found to restore
RMAN-06023: no backup or copy of datafile 18 found to restore
RMAN-06023: no backup or copy of datafile 17 found to restore
RMAN-06023: no backup or copy of datafile 16 found to restore
RMAN-06023: no backup or copy of datafile 15 found to restore
RMAN-06023: no backup or copy of datafile 14 found to restore
RMAN-06023: no backup or copy of datafile 13 found to restore
RMAN-06023: no backup or copy of datafile 12 found to restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
RMAN-06023: no backup or copy of datafile 9 found to restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to 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
RMAN>
But I know from the RMAN crosscheck and list backup commands that the savesets are available on disk. For example:
RMAN> list backup of datafile 1;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
4875 Incr 0 4.37G DISK 00:22:53 21-FEB-10
BP Key: 4875 Status: AVAILABLE Compressed: YES Tag: TAG20100221T200045
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4929_piece_1_date_20100221_711578185
List of Datafiles in backup set 4875
File LV Type Ckp SCN Ckp Time Name
1 0 Incr 5086110241948 21-FEB-10 /u01/app/oracle/oradata/ORADB1/system01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
4894 Incr 1 1.92G DISK 00:13:46 24-FEB-10
BP Key: 4894 Status: AVAILABLE Compressed: YES Tag: TAG20100224T200037
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4949_piece_1_date_20100224_711836434
List of Datafiles in backup set 4894
File LV Type Ckp SCN Ckp Time Name
1 1 Incr 5086113791743 24-FEB-10 /u01/app/oracle/oradata/ORADB1/system01.dbf
RMAN> list backup of datafile 44; (the first one in the list above)
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
4872 Incr 0 7.15G DISK 00:35:17 21-FEB-10
BP Key: 4872 Status: AVAILABLE Compressed: YES Tag: TAG20100221T200045
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4927_piece_1_date_20100221_711576046
List of Datafiles in backup set 4872
File LV Type Ckp SCN Ckp Time Name
44 0 Incr 5086110241948 21-FEB-10 /u04/app/oracle/oradata/ORADB1/NETINSIGHT_INDEXES_03.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
4893 Incr 1 4.06G DISK 00:26:52 24-FEB-10
BP Key: 4893 Status: AVAILABLE Compressed: YES Tag: TAG20100224T200037
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4947_piece_1_date_20100224_711835238
List of Datafiles in backup set 4893
File LV Type Ckp SCN Ckp Time Name
44 1 Incr 5086113791743 24-FEB-10 /u04/app/oracle/oradata/ORADB1/NETINSIGHT_INDEXES_03.dbf
As you can see, the level 0 and level 1 backups are showing as available. To double check, I perform a crosscheck backup of database;
RMAN> crosscheck backup of database;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=74 devtype=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4927_piece_1_date_20100221_711576046 recid=4872 stamp=711576046
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4928_piece_1_date_20100221_711576046 recid=4873 stamp=711576046
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4930_piece_1_date_20100221_711578189 recid=4874 stamp=711578189
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4929_piece_1_date_20100221_711578185 recid=4875 stamp=711578186
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4932_piece_1_date_20100221_711579570 recid=4876 stamp=711579570
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4931_piece_1_date_20100221_711579392 recid=4877 stamp=711579393
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4934_piece_1_date_20100221_711580369 recid=4878 stamp=711580370
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4935_piece_1_date_20100221_711580535 recid=4879 stamp=711580535
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4933_piece_1_date_20100221_711580122 recid=4880 stamp=711580123
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4948_piece_1_date_20100224_711835237 recid=4892 stamp=711835238
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4947_piece_1_date_20100224_711835238 recid=4893 stamp=711835238
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4949_piece_1_date_20100224_711836434 recid=4894 stamp=711836436
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4950_piece_1_date_20100224_711836866 recid=4895 stamp=711836866
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4951_piece_1_date_20100224_711837267 recid=4896 stamp=711837268
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4952_piece_1_date_20100224_711837971 recid=4897 stamp=711837972
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4953_piece_1_date_20100224_711837989 recid=4898 stamp=711837989
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4955_piece_1_date_20100224_711838522 recid=4899 stamp=711838522
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4954_piece_1_date_20100224_711838520 recid=4900 stamp=711838521
Crosschecked 18 objects
RMAN>
So I'm unclear as to why RMAN believes the backups of these files don't exist when I attempt to restore the database. Anyone have a clue?
NOTE: I've also tried to restore spcifically with the tag= clause but I get the same results:
RMAN> restore database from tag='TAG20100221T200045';
Starting restore at 25-FEB-10
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/25/2010 13:41:04
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 44 found to restore
RMAN-06023: no backup or copy of datafile 43 found to restore
RMAN-06023: no backup or copy of datafile 42 found to restore
RMAN-06023: no backup or copy of datafile 40 found to restore
RMAN-06023: no backup or copy of datafile 39 found to restore
RMAN-06023: no backup or copy of datafile 38 found to restore
RMAN-06023: no backup or copy of datafile 37 found to restore
RMAN-06023: no backup or copy of datafile 36 found to restore
RMAN-06023: no backup or copy of datafile 35 found to restore
RMAN-06023: no backup or copy of datafile 34 found to restore
RMAN-06023: no backup or copy of datafile 33 found to restore
RMAN-06023: no backup or copy of datafile 32 found to restore
RMAN-06023: no backup or copy of datafile 31 found to restore
RMAN-06023: no backup or copy of datafile 30 found to restore
RMAN-06023: no backup or copy of datafile 29 found to restore
RMAN-06023: no backup or copy of datafile 28 found to restore
RMAN-06023: no backup or copy of datafile 27 found to restore
RMAN-06023: no backup or copy of datafile 26 found to restore
RMAN-06023: no backup or copy of datafile 25 found to restore
RMAN-06023: no backup or copy of datafile 24 found to restore
RMAN-06023: no backup or copy of datafile 23 found to restore
RMAN-06023: no backup or copy of datafile 22 found to restore
RMAN-06023: no backup or copy of datafile 21 found to restore
RMAN-06023: no backup or copy of datafile 20 found to restore
RMAN-06023: no backup or copy of datafile 19 found to restore
RMAN-06023: no backup or copy of datafile 18 found to restore
RMAN-06023: no backup or copy of datafile 17 found to restore
RMAN-06023: no backup or copy of datafile 16 found to restore
RMAN-06023: no backup or copy of datafile 15 found to restore
RMAN-06023: no backup or copy of datafile 14 found to restore
RMAN-06023: no backup or copy of datafile 13 found to restore
RMAN-06023: no backup or copy of datafile 12 found to restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
RMAN-06023: no backup or copy of datafile 9 found to restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to 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 restoreJust as a follow on to my last post, after the RMAN-06023 messages, I list backups of the three datafiles and as you can see RMAN thinks that they are available. If I exit RMAN and list them at the OS level, they are where RMAN things they should be:
RMAN> restore database;
Starting restore at 25-FEB-10
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/25/2010 16:17:39
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 1 found to restore
RMAN> list backup of datafile 4;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
4880 Incr 0 1.36G DISK 00:08:57 21-FEB-10
BP Key: 4880 Status: AVAILABLE Compressed: YES Tag: TAG20100221T200045
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4933_piece_1_date_20100221_711580122
List of Datafiles in backup set 4880
File LV Type Ckp SCN Ckp Time Name
4 0 Incr 5086110241948 21-FEB-10 /u02/app/oracle/oradata/ORADB1/users01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
4890 Incr 1 934.82M DISK 00:09:42 22-FEB-10
BP Key: 4890 Status: AVAILABLE Compressed: YES Tag: TAG20100222T200047
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4943_piece_1_date_20100222_711664989
List of Datafiles in backup set 4890
File LV Type Ckp SCN Ckp Time Name
4 1 Incr 5086111401249 22-FEB-10 /u02/app/oracle/oradata/ORADB1/users01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
4898 Incr 1 947.57M DISK 00:08:49 24-FEB-10
BP Key: 4898 Status: AVAILABLE Compressed: YES Tag: TAG20100224T200037
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4953_piece_1_date_20100224_711837989
List of Datafiles in backup set 4898
File LV Type Ckp SCN Ckp Time Name
4 1 Incr 5086113791743 24-FEB-10 /u02/app/oracle/oradata/ORADB1/users01.dbf
RMAN>
RMAN> list backup of datafile 3;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
4874 Incr 0 2.65G DISK 00:19:50 21-FEB-10
BP Key: 4874 Status: AVAILABLE Compressed: YES Tag: TAG20100221T200045
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4930_piece_1_date_20100221_711578189
List of Datafiles in backup set 4874
File LV Type Ckp SCN Ckp Time Name
3 0 Incr 5086110241948 21-FEB-10 /u02/app/oracle/oradata/ORADB1/sysaux01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
4885 Incr 1 1.95G DISK 00:15:54 22-FEB-10
BP Key: 4885 Status: AVAILABLE Compressed: YES Tag: TAG20100222T200047
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4940_piece_1_date_20100222_711663910
List of Datafiles in backup set 4885
File LV Type Ckp SCN Ckp Time Name
3 1 Incr 5086111401249 22-FEB-10 /u02/app/oracle/oradata/ORADB1/sysaux01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
4895 Incr 1 1.97G DISK 00:18:13 24-FEB-10
BP Key: 4895 Status: AVAILABLE Compressed: YES Tag: TAG20100224T200037
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4950_piece_1_date_20100224_711836866
List of Datafiles in backup set 4895
File LV Type Ckp SCN Ckp Time Name
3 1 Incr 5086113791743 24-FEB-10 /u02/app/oracle/oradata/ORADB1/sysaux01.dbf
RMAN>
RMAN>
RMAN> list backup of datafile 1;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
4875 Incr 0 4.37G DISK 00:22:53 21-FEB-10
BP Key: 4875 Status: AVAILABLE Compressed: YES Tag: TAG20100221T200045
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level0_set_4929_piece_1_date_20100221_711578185
List of Datafiles in backup set 4875
File LV Type Ckp SCN Ckp Time Name
1 0 Incr 5086110241948 21-FEB-10 /u01/app/oracle/oradata/ORADB1/system01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
4884 Incr 1 1.93G DISK 00:12:34 22-FEB-10
BP Key: 4884 Status: AVAILABLE Compressed: YES Tag: TAG20100222T200047
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4939_piece_1_date_20100222_711663601
List of Datafiles in backup set 4884
File LV Type Ckp SCN Ckp Time Name
1 1 Incr 5086111401249 22-FEB-10 /u01/app/oracle/oradata/ORADB1/system01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
4894 Incr 1 1.92G DISK 00:13:46 24-FEB-10
BP Key: 4894 Status: AVAILABLE Compressed: YES Tag: TAG20100224T200037
Piece Name: /u03/oracle_backups/ORADB1/offline/ORADB1_level1_set_4949_piece_1_date_20100224_711836434
List of Datafiles in backup set 4894
File LV Type Ckp SCN Ckp Time Name
1 1 Incr 5086113791743 24-FEB-10 /u01/app/oracle/oradata/ORADB1/system01.dbf
RMAN> exit
$ ls -ltr /u03/oracle_backups/ORADB1/offline
total 59743688
-rwx------ 1 oracle oinstall 7677960192 2010-02-25 11:13 ORADB1_level0_set_4927_piece_1_date_20100221_711576046
-rwx------ 1 oracle oinstall 7980834816 2010-02-25 11:24 ORADB1_level0_set_4928_piece_1_date_20100221_711576046
-rwx------ 1 oracle oinstall 4691853312 2010-02-25 11:29 ORADB1_level0_set_4929_piece_1_date_20100221_711578185
-rwx------ 1 oracle oinstall 2847391744 2010-02-25 11:34 ORADB1_level0_set_4930_piece_1_date_20100221_711578189
-rwx------ 1 oracle oinstall 3530924032 2010-02-25 11:39 ORADB1_level0_set_4931_piece_1_date_20100221_711579392
-rwx------ 1 oracle oinstall 1566449664 2010-02-25 11:41 ORADB1_level0_set_4932_piece_1_date_20100221_711579570
-rwx------ 1 oracle oinstall 1459781632 2010-02-25 11:43 ORADB1_level0_set_4933_piece_1_date_20100221_711580122
-rwx------ 1 oracle oinstall 561774592 2010-02-25 11:44 ORADB1_level0_set_4934_piece_1_date_20100221_711580369
-rwx------ 1 oracle oinstall 58753024 2010-02-25 11:44 ORADB1_level0_set_4935_piece_1_date_20100221_711580535
-rwx------ 1 oracle oinstall 4364124160 2010-02-25 11:56 ORADB1_level1_set_4947_piece_1_date_20100224_711835238
-rwx------ 1 oracle oinstall 2971877376 2010-02-25 12:01 ORADB1_level1_set_4948_piece_1_date_20100224_711835237
-rwx------ 1 oracle oinstall 2066546688 2010-02-25 12:03 ORADB1_level1_set_4949_piece_1_date_20100224_711836434
-rwx------ 1 oracle oinstall 2119360512 2010-02-25 12:06 ORADB1_level1_set_4950_piece_1_date_20100224_711836866
-rwx------ 1 oracle oinstall 1003356160 2010-02-25 12:06 ORADB1_level1_set_4951_piece_1_date_20100224_711837267
-rwx------ 1 oracle oinstall 1637105664 2010-02-25 12:08 ORADB1_level1_set_4952_piece_1_date_20100224_711837971
-rwx------ 1 oracle oinstall 993607680 2010-02-25 12:08 ORADB1_level1_set_4953_piece_1_date_20100224_711837989
-rwx------ 1 oracle oinstall 1130496 2010-02-25 12:09 ORADB1_level1_set_4955_piece_1_date_20100224_711838522
-rwx------ 1 oracle oinstall 283344896 2010-02-25 12:09 ORADB1_level1_set_4954_piece_1_date_20100224_711838520
-rwx------ 1 oracle oinstall 4344365056 2010-02-25 16:01 ORADB1_level1_set_4937_piece_1_date_20100222_711662448
-rwx------ 1 oracle oinstall 2959015936 2010-02-25 16:05 ORADB1_level1_set_4938_piece_1_date_20100222_711662448
-rwx------ 1 oracle oinstall 2067202048 2010-02-25 16:07 ORADB1_level1_set_4939_piece_1_date_20100222_711663601
-rwx------ 1 oracle oinstall 2089304064 2010-02-25 16:08 ORADB1_level1_set_4940_piece_1_date_20100222_711663910
-rwx------ 1 oracle oinstall 955711488 2010-02-25 16:09 ORADB1_level1_set_4941_piece_1_date_20100222_711664370
-rwx------ 1 oracle oinstall 1623564288 2010-02-25 16:11 ORADB1_level1_set_4942_piece_1_date_20100222_711664872
-rwx------ 1 oracle oinstall 980238336 2010-02-25 16:12 ORADB1_level1_set_4943_piece_1_date_20100222_711664989
-rwx------ 1 oracle oinstall 280952832 2010-02-25 16:12 ORADB1_level1_set_4944_piece_1_date_20100222_711665385
-rwx------ 1 oracle oinstall 1130496 2010-02-25 16:12 ORADB1_level1_set_4945_piece_1_date_20100222_711665521 -
Use of imp/exp to restore a database will fail ??
I have a database that uses mdsys and other user-defined objects. This week I've had the "pleasure" to try to restore a database from scratch using imp, but had to abandon because imp refuses to create tables if they refer to objects, that upon export had a different id than the database being imported to.
Since mdsys for instance, is always excluded from exports (like sys and system) when you create a new database, the spatial objects are created with a different ID than the original database. Hence, every table you have with spatial data will not be imported.
So imp only works if the internal object ids match.
What would be the "imp/exp" procedure to do a full db restore that bypasses the above problem? Has datadump solved this issue?Correct - all schemas considered part of the dictinary are excluded (why has things become so complicated- in the old days we had ONE place where everything dictionary went).
That's the problem. I have tables in my export that depends on MDSYS objects. In other words, spatial data. So, to re-create my database I must first create a database and ADD a MDSYS schema. So yes, I created the schema prior to import. The problem is, that the MDSYS objects then do not get the same object-ids. And there lies the problem. IMP will not import my tables with spatial data in them because the reference to the MDSYS objects do not match the object ID that was used during export. Why this rule is applied is the mystery.
In addition, which I rote in the spatial forum, anything related to the mapviewer application is also placed in the MDSYS schema, excluding them from export; regardless that the data related to mapviewer is not related to database objects. The result is, that your Oracle Mapviewer application data is lost. The "official workaround" is to run pre-scripts that copy the dictionary views to fixed tables, then run your export. And on import you run a post-script to copy it back. Rather silly and inflexible. -
Restore controlfile,database(PIT) from backups(non-defualt location)
Hi,
Below is the script i m using to do db point-in-time recovery. But the problem is the backups was taken in a non-defualt location and i want the restore and recovery to be happened from there. Mostly facing issue with controlfile recovery. Just don't know how to tell RMAN that my controlfile rman backup is in non-defualt location '/fulldbbackup/'
backup Script
run{
allocate channel ch1 device type disk ;
backup database TAG = 'DR_test_backup' format '/fulldbbackup/%D_RMAN_DATAFILE_BACKUP_%U.bak';
sql 'alter system archive log current';
backup archivelog all delete input TAG = 'DR_test_backup2' format '/fulldbbackup/%D_RMAN_ARCHIVELOG_%U.bak';
backup current controlfile TAG='DR_test_backup' format '/fulldbbackup/%D_RMAN_CURRENT_CONTROL_BACKUP_%U.bak';
==============================================================
rman target / nocatalog
RMAN> sql "alter session set nls_date_format = ''dd.mm.yyyy hh24:mi:ss''";
RMAN> CROSSCHECK BACKUPPIECE TAG = 'DR_TEST_BACKUP';
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/fulldbbackup/26_RMAN_CURRENT_CONTROL_BACKUP_0mnbvhlq_1_1.bak recid=22 stamp=784320186
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/fulldbbackup/26_RMAN_ARCHIVELOG_0lnbvhlm_1_1.bak recid=21 stamp=784320184
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/fulldbbackup/26_RMAN_ARCHIVELOG_0knbvhl2_1_1.bak recid=20 stamp=784320164
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/fulldbbackup/26_RMAN_ARCHIVELOG_0jnbvhkp_1_1.bak recid=19 stamp=784320154
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/fulldbbackup/26_RMAN_DATAFILE_BACKUP_0inbvhkf_1_1.bak recid=18 stamp=784320144
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/fulldbbackup/26_RMAN_DATAFILE_BACKUP_0hnbvhgn_1_1.bak recid=17 stamp=784320024
Crosschecked 6 objectsRecovery Script (.ksh)
#!/bin/ksh
export ORACLE_SID=prod2
echo $ORACLE_SID
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
echo $ORACLE_HOME
export PATH
echo $PATH
RMAN=$ORACLE_HOME/bin/rman
$RMAN target sys/sys@prod2 nocatalog << EOF
set dbid 1428819349;
run {
startup nomount;
sql "alter session set nls_date_format = ''dd.mm.yyyy hh24:mi:ss''";
allocate channel ch00 device type disk;
allocate channel ch01 device type disk;
set controlfile autobackup format for device type disk to '/fulldbbackup/26_RMAN_CURRENT_CONTROL_BACKUP_0mnbvhlq_1_1.bak';
restore controlfile from autobackup;
alter database mount;
catalog start with '/fulldbbackup';
set until time "to_date('26.05.2012 18:43:15','dd.mm.yyyy hh24:mi:ss')";
restore database;
recover database;
alter database open resetlogs;
release channel ch00;
release channel ch01;
exit;
EOF
echo "Completed"Thanks in advanceYou can restore control file by specifying the path explicitly.
-- In the auxillary server
Make sure you have the CONTROL_FILES parameter in the pfile. The control files will be restored to this path
*.control_files='+LMNPROD_DG01/lmnprod/lmnprod_control01.ctl','+LMNPROD_DG01/lmnprod/lmnprod_control02.ctl','+LMNPROD_DG01/lmnprod/lmnprod_control03.ctl'Create spfile from pfile. Then
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup nomount
SQL> show parameter spfileStep5. Restore Control file
The below command will create all the 3 control files mentioned in CONTROL_FILES parameter in the spfile.
$ rman target /
restore controlfile from '/path_where_bkp_piece_is_stored/RMAN_CURRENT_CONTROL_BACKUP_0mnbvhlq_1_1.bak';After restoring the control file and mounting the DB , you can use CATALOG command to catalog backup pieces -
Restore NOARCHIVELOG database in oracle 9i
Hello guys,
Please help me establish a way to restore my db.
Here is the scenario ...
The db version 9.2 was installed and running in the server (Windows).
The DB was installed in D: drive.
The C: drive of the server failed, so the server went down.
The DB was up and running by the time.
After dealing and starting up the server, Oracle was not starting.
I made a copy of the entire folder in which oracle resided (D:\Oracle)
No backup, just a copy and paste of the folder in another drive.
Now, I installed a new copy of Oracle db 9.2 , and I wonder how can I restore the db.
The previous db was in NOARCHIVELOG mode.
I have read that the only way is to perform a cold restore ... I have tried in different ways, but I think that
the problem is with the fact that I do not posses a real "backup" of my db.
>
Only cold backups (that is, backups created when the database was shut down normally) can be used in restoring a database in NOARCHIVELOG mode
>
Can you sugest me any ideas on resolving this?Hello,
I applied the followings, and I think I am up with something right now ..
Below are the steps:
1 - I created the database with the same name.
SQL> shutdown immediateI copied all files from the folder I made a copy into the
D:\oracle\oradata\db_name
Then I applied:
SQL> startup nomountAfter that I applied
CREATE CONTROLFILE REUSE DATABASE "db_name" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 50
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 113
LOGFILE
GROUP 1 'D:\oracle\oradata\db_name\REDO01.LOG' SIZE 100M,
GROUP 2 'D:\oracle\oradata\db_name\REDO02.LOG' SIZE 100M,
GROUP 3 'D:\oracle\oradata\db_name\REDO03.LOG' SIZE 100M
DATAFILE
'D:\oracle\oradata\db_name\CWMLITE01.DBF',
'D:\oracle\oradata\db_name\DRSYS01.DBF',
'D:\oracle\oradata\db_name\EXAMPLE01.DBF',
'D:\oracle\oradata\db_name\INDX01.DBF',
'D:\oracle\oradata\db_name\ODM01.DBF',
'D:\oracle\oradata\db_name\SYSTEM01.DBF',
'D:\oracle\oradata\db_name\TEMP01.DBF',
'D:\oracle\oradata\db_name\TOOLS01.DBF',
'D:\oracle\oradata\db_name\UNDOTBS01.DBF',
'D:\oracle\oradata\db_name\USERS01.DBF',
'D:\oracle\oradata\db_name\XDB01.DBF'
CHARACTER SET WE8MSWIN1252Here it yeld an error saying that
>
TEMP01.DBF is not a database file
>
I removed from the above, and it went ok.
After that I opened up the db and it looks fine now
Any advise on the below
>
TEMP01.DBF is not a database file
>
I have some data there, but I do not know what to ....
The most strange thing I note, is this:
If I apply:
Select *
From table_nameI see the results, but if I go and apply:
Select count(1)
From table_nameIt says:
ERROR at line 2:
ORA-00376: file 11 cannot be read at this time
ORA-01111: name for data file 11 is unknown - rename to correct file
ORA-01110: data file 11: 'D:\ORACLE\ORA92\DATABASE\MISSING00011'Moreover, if I go from EM console and apply:
Select *
From table_name
order by fieldit says
ORA-25153 tEMPORARY TABLESPACE IS EMPTYAny ideas? -
How to restore a database from backup taken in standby database
Its our environment standard to run backup in standby database.
Now we have to perform refresh production database to UAT database.
I have performed normal refresh/duplicate. Is there any additional procedures need to be followed to perform refresh from standby database backupRMAN Restoration to New Server with Different Directory and New Database Name
In this case, I have an existing production database with RMAN Level 0 backup:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'C:\flash_recovery_area\galaxy\backupsets\autobackup\SAMSUNG-ctl_%F';
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'C:\flash_recovery_area\galaxy\backupsets\level0\level0-%d-%T-%U' MAXPIECESIZE 4G;
DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE - 7';
SHOW ALL;
REPORT SCHEMA;
LIST BACKUP OF DATABASE;
REPORT NEED BACKUP;
REPORT UNRECOVERABLE;
LIST EXPIRED BACKUP BY FILE;
LIST ARCHIVELOG ALL;
REPORT OBSOLETE;
CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK COPY OF ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP DEVICE TYPE DISK;
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
RUN {
sql 'alter system archive log current';
BACKUP INCREMENTAL LEVEL 0 DATABASE PLUS ARCHIVELOG DELETE INPUT;
LIST BACKUP OF DATABASE;
REPORT NEED BACKUP;
REPORT UNRECOVERABLE;
LIST EXPIRED BACKUP BY FILE;
LIST ARCHIVELOG ALL;
REPORT OBSOLETE;
CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK COPY OF ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP DEVICE TYPE DISK;
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
The backupsets will be restored into a new server with different file structure. The database will also be different. In the new server, I have created a blank database (SID or CUSTOM database with the name DBGRID). This is easier so I won't have to create any directories, user ORADIM or create new PWFile.
This document assumes that a blank (starter) database has been created in the new server. The RDBMS version is the same as the source database.
In this example, the source database name is GALAXY and the target database name is DBGRID.
Let me know if you have any feedback or comments. All I want is to share these steps with you and make it better so we can help other DBA's as well.
Steps start here
-->
ORIGINAL DATABASE: GALAXY
DUPLICATE DATABASE: DBGRID
FROM THE SOURCE DATABASE (GALAXY)
1. Backup the database using RMAN incremental backups.
2. Check the RMAN logs generated and look for the result of the command:
C:\Users\Administrator>set ORACLE_SID=GALAXY
C:\Users\Administrator>rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 1 06:55:08 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: GALAXY (DBID=3578870300)
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name GALAXY
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
1 680 SYSTEM *** C:\ORACLE\ORADATA\GALAXY\SYSTEM01.DBF
2 510 SYSAUX *** C:\ORACLE\ORADATA\GALAXY\SYSAUX01.DBF
3 140 UNDOTBS1 *** C:\ORACLE\ORADATA\GALAXY\UNDOTBS01.DBF
4 5 USERS *** C:\ORACLE\ORADATA\GALAXY\USERS01.DBF
5 106 EXAMPLE *** C:\ORACLE\ORADATA\GALAXY\EXAMPLE01.DBF
6 2048 ALLINDEX *** C:\ORACLE\ORADATA\GALAXY\ALLINDEX01.DBF
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
1 29 TEMP 32767 C:\ORACLE\ORADATA\GALAXY\TEMP01.DBF
This command shows all the physical database files that will be backed-up by the current RMAN job.
List the online redolog files:
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
3 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO03A.LOG NO
3 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO03B.LOG NO
2 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO02A.LOG NO
2 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO02B.LOG NO
1 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO01A.LOG NO
1 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO01B.LOG NO
6 rows selected.
3. Since the target server has different structure, it is easier to use a pfile to startup the database rather than restoring the spfile from backup.
C:\Users\Administrator>set ORACLE_SID=GALAXY
C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 1 06:56:14 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create pfile='C:\TEMP\initGALAXYrman.ora' from spfile;
File created.
4. Edit the pfile to have the following parameters:
(These parameters has been edited to fit the target database requirements)
galaxy entries has been changed to dbgrid. Directories has been corrected as well.
dbgrid.__db_cache_size=192937984
dbgrid.__java_pool_size=4194304
dbgrid.__large_pool_size=4194304
dbgrid.__oracle_base='D:\app\Administrator'#ORACLE_BASE set from environment
dbgrid.__pga_aggregate_target=281018368
dbgrid.__sga_target=524288000
dbgrid.__shared_io_pool_size=0
dbgrid.__shared_pool_size=301989888
dbgrid.__streams_pool_size=4194304
*.audit_file_dest='D:\app\Administrator\admin\DBGRID\adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='D:\oradata\DBGRID\control01.ctl','D:\oradata\DBGRID\control02.ctl'
*.db_block_size=8192
*.db_domain=''
Leave as it is for now --> *.db_name='GALAXY'
*.db_recovery_file_dest='D:\fra\backupsets\duplicate'
*.DB_RECOVERY_FILE_DEST_SIZE=4G
*.diagnostic_dest='D:\app\Administrator'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DBGRIDXDB)'
*.job_queue_processes=1000
*.log_archive_dest_1='location=D:\fra\backupsets\archs'
*.log_buffer=10485760
*.memory_target=805306368
*.open_cursors=300
*.processes=800
*.remote_login_passwordfile='EXCLUSIVE'
*.session_cached_cursors=300
*.sessions=885
*.undo_tablespace='UNDOTBS1'
Make sure that all the directory values in this edited pfile are existing in the target server.
5. Copy all the RMAN backup pieces generated in the source database. Transfer the edited pfile as well. Make sure that all directories presented in the pfile exists in the target server.
In this example, RMAN backupsets are located at:
Backupsets:
Level0 and Level1 = D:\fra\backupsets\duplicate\level0 , D:\fra\backupsets\duplicate\level1
Controlfile and Spfile Autobackup = D:\fra\backupsets\duplicate\autobackup
Edited pfile initGALAXYrman= C:\TEMP\initDBGRIDnew.ora
FROM THE TARGET DATABASE (DBGRID)
6. Connect to RMAN and perform database duplication using RMAN backup restoration
C:\Users\Administrator>rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 1 07:26:45 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> set dbid = 3578870300; --> THIS IS THE DBID OF THE SOURCE DATABASE!
executing command: SET DBID
RMAN> startup nomount pfile='C:\TEMP\initDBGRIDnew.ora'; -->restore the edited pfile
Oracle instance started
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 327156176 bytes
Database Buffers 192937984 bytes
Redo Buffers 14192640 bytes
RMAN> restore controlfile from 'D:\fra\backupsets\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00'; -->restore the correct controlfile
Starting restore at 01-AUG-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
output file name=D:\ORADATA\DBGRID\CONTROL01.CTL
output file name=D:\ORADATA\DBGRID\CONTROL02.CTL
Finished restore at 01-AUG-12
RMAN> alter database mount; -->mount the database
database mounted
released channel: ORA_DISK_1
RMAN> catalog start with "D:\fra\backupsets\duplicate";
--> catalog the location of the backup pieces to make it known to the control file
Starting implicit crosscheck backup at 01-AUG-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
Crosschecked 3 objects
Finished implicit crosscheck backup at 01-AUG-12
Starting implicit crosscheck copy at 01-AUG-12
using channel ORA_DISK_1
Finished implicit crosscheck copy at 01-AUG-12
searching for all files in the recovery area
cataloging files...
no files cataloged
searching for all files that match the pattern D:\fra\backupsets\duplicate
List of Files Unknown to the Database
=====================================
File Name: D:\FRA\BACKUPSETS\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-01NHGTGV_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-03NHGTMT_1_1
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: D:\FRA\BACKUPSETS\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-01NHGTGV_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-03NHGTMT_1_1
RMAN> list backup summary; -->check your backup they are now known
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
1 B A A DISK 01-AUG-12 1 2 NO TAG20120801T011054
2 B 0 A DISK 01-AUG-12 1 2 NO TAG20120801T011137
3 B A A DISK 01-AUG-12 1 2 NO TAG20120801T011405
RMAN> list archivelog all; -->list you archivelog for point in time recovery
List of Archived Log Copies for database with db_unique_name GALAXY
=====================================================================
Key Thrd Seq S Low Time
26 1 29 A 01-AUG-12
Name: D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001
Perform database restoration and recovery. The sequence number is Seq+1 for complete recovery, so that will be 29 + 1 = 30. You can also do recovery via SCN or time based recovery.
Remember in the previous step: RMAN> REPORT SCHEMA;
Each datafile has a corresponding datafile number.
Follow the format to convert them into their respective new restoration directory in the target server.
SET NEWNAME has the format:
SET NEWNAME FOR DATAFILE [FILE NUMBER IN THE REPORT SCHEMA COMMAND] TO
‘[NEW LOCATION AND FILENAME OF THE DATAFILES]’;
RMAN> run {
2> SET UNTIL SEQUENCE 30 THREAD 1;
3> set newname for datafile 1 to 'D:\oradbgrid\oradata\SYSTEM01.DBF';
4> set newname for datafile 2 to 'D:\oradbgrid\oradata\SYSAUX01.DBF';
5> set newname for datafile 3 to 'D:\oradbgrid\oradata\UNDOTBS01.DBF';
6> set newname for datafile 4 to 'D:\oradbgrid\oradata\USERS01.DBF';
7> set newname for datafile 5 to 'D:\oradbgrid\oradata\EXAMPLE01.DBF';
8> set newname for datafile 6 to 'D:\oradbgrid\oradata\ALLINDEX01.DBF';
9> restore database;
10> switch datafile all;
11> recover database;
12> }
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 01-AUG-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 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 D:\oradbgrid\oradata\SYSTEM01.DBF
channel ORA_DISK_1: restoring datafile 00002 to D:\oradbgrid\oradata\SYSAUX01.DBF
channel ORA_DISK_1: restoring datafile 00003 to D:\oradbgrid\oradata\UNDOTBS01.DBF
channel ORA_DISK_1: restoring datafile 00004 to D:\oradbgrid\oradata\USERS01.DBF
channel ORA_DISK_1: restoring datafile 00005 to D:\oradbgrid\oradata\EXAMPLE01.DBF
channel ORA_DISK_1: restoring datafile 00006 to D:\oradbgrid\oradata\ALLINDEX01.DBF
channel ORA_DISK_1: reading from backup piece D:\FRA\BACKUPSETS\DUPLICATE\LEVEL0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
channel ORA_DISK_1: piece handle=D:\FRA\BACKUPSETS\DUPLICATE\LEVEL0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1 tag=TAG20120801T011137
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:06
Finished restore at 01-AUG-12
Starting recover at 01-AUG-12
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 29 is already on disk as file D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001
archived log file name=D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001 thread=1 sequence=29
media recovery complete, elapsed time: 00:00:01
Finished recover at 01-AUG-12
Log in to SQL*Plus to recreate the redolog files.
Format:
ALTER DATABASE RENAME FILE ‘[OLD REDOLOG LOCATION]’ TO ‘[NEW REDOLOG LOCATION]’;
C:\Users\Administrator>sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 1 08:54:27 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select instance_name, status from v$instance;
INSTANCE_NAME STATUS
dbgrid MOUNTED
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO03A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO03A.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO03B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO03B.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO02A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO02A.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO02B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO02B.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO01A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO01A.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO01B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO01B.LOG';
Database altered.
Open the database in resetlogs option. Create spfile from the edited pfile then bounce the database.
RMAN> alter database open resetlogs;
database opened
SQL> create spfile from pfile='C:\TEMP\initDBGRIDnew.ora';
File created.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 327156176 bytes
Database Buffers 192937984 bytes
Redo Buffers 14192640 bytes
Database mounted.
Database opened.
SQL> select instance_name, status from v$instance;
INSTANCE_NAME STATUS
dbgrid OPEN
Create a new TEMP tablespace, make this as the new default temporary tablespace. Drop the old TEMP tablespace. Restart the database.
SQL> CREATE TEMPORARY TABLESPACE TEMP01 TEMPFILE 'D:\oradbgrid\oradata\TEMP0101.dbf' SIZE 200M;
Tablespace created.
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP01;
Database altered.
SQL> drop tablespace TEMP including contents and datafiles;
Tablespace dropped.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance sta -
11g New features to restore entire schema for 4 to 5 days back.
please help with 11g New features to restore entire schema for 4 to 5 days back by enabling FRA or FRA with archive in 11.2.0.2 database.
Any other option to restore schema??As it has been discussed in another thread, the schema is not a physical thing, it is a logical set of objects that user has.
So, to restore schema you will need to restore all tables in this schema.
As it was answered above, you can use Flashback Table for every table (with some limitations though).
Another option is using LogMiner. With some limitations as well.
For example, you cannot to "restore" a truncated table with LM. -
Alter database open resetlogs upgrade ; throwing error
Recently i have cloned a database from 11.2.0.2 to 11.2.0.3 on a new server.... I got the error as fowwos,
contents of Memory Script:
Alter clone database open resetlogs;
executing Memory Script
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00601: fatal error in recovery manager
RMAN-03004: fatal error during execution of command
RMAN-10041: Could not re-create polling channel context following failure.
RMAN-10024: error setting up for rpc polling
RMAN-10005: error opening cursor
RMAN-10002: ORACLE error: ORA-03114: not connected to ORACLE
RMAN-03002: failure of Duplicate Db command at 07/12/2012 16:19:24
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 29247
Session ID: 200 Serial number: 5
So i have tried
SQL> alter database open resetlogs upgrade;
alter database open resetlogs upgrade
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
SQL> alter database open upgrade;
alter database open upgrade
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '+DATA_CMX/cmx/datafile/system.270.788451975'
Any help ?Hi,
Duplicate is not supported using different version of database, so I recommend you don't use duplicate.
Because RMAN "duplicate" attempts to automatically rename (rename required recover) and open the database you may not use RMAN duplicate for this case, only RMAN restore.
Perform this work using normal restore database.
See this example.
On prod database with db_name/db_unique_name dbupg:
Recovery Manager: Release 11.2.0.2.0 - Production on Fri Jul 13 15:15:59 2012
RMAN> backup database plus archivelog delete input;
Starting backup at 13-JUL-12
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=52 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=17 RECID=1 STAMP=788540852
input archived log thread=1 sequence=18 RECID=2 STAMP=788541371
channel ORA_DISK_1: starting piece 1 at 13-JUL-12
channel ORA_DISK_1: finished piece 1 at 13-JUL-12
piece handle=/u01/app/oracle/flash_recovery_area01/DBUPG/backupset/2012_07_13/o1_mf_annnn_TAG20120713T151612_800shf7w_.bkp tag=TAG20120713T151612 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u01/app/oracle/flash_recovery_area01/DBUPG/archivelog/2012_07_13/o1_mf_1_17_800rz40y_.arc RECID=1 STAMP=788540852
archived log file name=/u01/app/oracle/flash_recovery_area01/DBUPG/archivelog/2012_07_13/o1_mf_1_18_800shcsd_.arc RECID=2 STAMP=788541371
Finished backup at 13-JUL-12
Starting backup at 13-JUL-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DS8000_DG/dbupg/datafile/system.271.788537119
input datafile file number=00002 name=+DS8000_DG/dbupg/datafile/sysaux.272.788537167
input datafile file number=00003 name=+DS8000_DG/dbupg/datafile/undotbs1.273.788537199
input datafile file number=00004 name=+DS8000_DG/dbupg/datafile/users.275.788537229
channel ORA_DISK_1: starting piece 1 at 13-JUL-12
channel ORA_DISK_1: finished piece 1 at 13-JUL-12
piece handle=/u01/app/oracle/flash_recovery_area01/DBUPG/backupset/2012_07_13/o1_mf_nnndf_TAG20120713T151614_800shgw5_.bkp tag=TAG20120713T151614 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 13-JUL-12
channel ORA_DISK_1: finished piece 1 at 13-JUL-12
piece handle=/u01/app/oracle/flash_recovery_area01/DBUPG/backupset/2012_07_13/o1_mf_ncsnf_TAG20120713T151614_800sjm29_.bkp tag=TAG20120713T151614 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 13-JUL-12
Starting backup at 13-JUL-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=19 RECID=3 STAMP=788541412
channel ORA_DISK_1: starting piece 1 at 13-JUL-12
channel ORA_DISK_1: finished piece 1 at 13-JUL-12
piece handle=/u01/app/oracle/flash_recovery_area01/DBUPG/backupset/2012_07_13/o1_mf_annnn_TAG20120713T151652_800sjnf7_.bkp tag=TAG20120713T151652 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u01/app/oracle/flash_recovery_area01/DBUPG/archivelog/2012_07_13/o1_mf_1_19_800sjn5q_.arc RECID=3 STAMP=788541412
Finished backup at 13-JUL-12
RMAN> backup current controlfile;
Starting backup at 13-JUL-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 13-JUL-12
channel ORA_DISK_1: finished piece 1 at 13-JUL-12
piece handle=/u01/app/oracle/flash_recovery_area01/DBUPG/backupset/2012_07_13/o1_mf_ncnnf_TAG20120713T153435_800tkwl2_.bkp tag=TAG20120713T153435 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 13-JUL-12I used same server to do this work... I really dont recommend that, if yes you must be aware about location of restore... you should use new server:
Create a spfile:
*.control_files='+DS8000_DG/dbclone/controlfile/Current.277.788541913'
*.db_name='dbupg'
*.db_unique_name='dbclone'
*.audit_file_dest='/u01/app/oracle/admin/dbclone/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.db_block_size=8192
*.db_create_file_dest='+MMC'
*.db_domain=''
*.db_recovery_file_dest_size=107374182400
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area01'
*.diagnostic_dest='/u01/app/oracle'
*.log_file_name_convert='+DS8000_DG','+MMC'
*.memory_target=1031798784
*.open_cursors=300Make backup available on new server:
and:
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 13 15:33:24 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1027182592 bytes
Fixed Size 2227936 bytes
Variable Size 599785760 bytes
Database Buffers 419430400 bytes
Redo Buffers 5738496 bytes
SQL> show parameter db_n
NAME TYPE VALUE
db_name string dbupg
SQL> show parameter db_un
NAME TYPE VALUE
db_unique_name string dbclone
RMAN> restore controlfile from '/u01/app/oracle/flash_recovery_area01/DBUPG/backupset/2012_07_13/o1_mf_ncnnf_TAG20120713T153435_800tkwl2_.bkp';
Starting restore at 13-JUL-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=290 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output file name=+DS8000_DG/dbclone/controlfile/current.277.788541913
Finished restore at 13-JUL-12
RMAN> startup mount
database is already started
database mounted
released channel: ORA_DISK_1
RMAN> run {
2> SET NEWNAME FOR DATABASE TO '+MMC';
3> restore database ;
4> }
executing command: SET NEWNAME
Starting restore at 13-JUL-12
Starting implicit crosscheck backup at 13-JUL-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=290 device type=DISK
Crosschecked 4 objects
Finished implicit crosscheck backup at 13-JUL-12
Starting implicit crosscheck copy at 13-JUL-12
using channel ORA_DISK_1
Crosschecked 2 objects
Finished implicit crosscheck copy at 13-JUL-12
searching for all files in the recovery area
cataloging files...
no files cataloged
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 +MMC
channel ORA_DISK_1: restoring datafile 00002 to +MMC
channel ORA_DISK_1: restoring datafile 00003 to +MMC
channel ORA_DISK_1: restoring datafile 00004 to +MMC
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area01/DBUPG/backupset/2012_07_13/o1_mf_nnndf_TAG20120713T151614_800shgw5_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area01/DBUPG/backupset/2012_07_13/o1_mf_nnndf_TAG20120713T151614_800shgw5_.bkp tag=TAG20120713T151614
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
Finished restore at 13-JUL-12
RMAN> recover database;
Starting recover at 13-JUL-12
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 13-JUL-12So, just startup with upgrade option.
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 13 15:39:31 2012
SQL> alter database open resetlogs upgrade; Now you can upgrade your database.
After upgrade database you can change the database name using NID:
$ nid
DBNEWID: Release 11.2.0.3.0 - Production on Fri Jul 13 15:50:23 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Keyword Description (Default)
TARGET Username/Password (NONE)
DBNAME New database name (NONE)
LOGFILE Output Log (NONE)
REVERT Revert failed change NO
SETNAME Set a new database name only NO
APPEND Append to output log NO
HELP Displays these messages NOHTH,
Levi Pereira
Edited by: Levi Pereira on Jul 13, 2012 4:04 PM
Maybe you are looking for
-
Batch split in inbound delivery VL31N / VL32N
Hi, I am using standard function GN_DELIVERY_CREATE in order to create inbound delivery document, it works fine, but it doesn't allow to specify batch split! So, in order to enter a batch split I have as first create the delivery with this standard
-
RFC_NO_AUTHORITY......urgent
Hi all, when client tried to open the Bex analyser he is getting the error "run time error 61704 application error".When i tried and checked in st22 i could see the short dump "RFC_NO_AUTHORITY" The detailed short dump is as below,
-
XML TO .CSV Conversion issue
Hi All, I Developed an MDM to 3rd Party FTPscenario with FCC . The data from MDM comes as XML and i placed it at the FTP succesfully with .CSV format. But the issue is with tirmming of before Zeros in excel file, eg: The value of a field GTIN_No is 0
-
Error Message :- ORA-12203 TNS : Unable to connect to destination
Hi, I am trying to install Oracle 8i and oracle Forms and reports on my personal system for prectise purpose, I have window XP on my system and I installed Oracle Forms & Reports first on my system in C: drive, then I installed Oracle 8i(sql, pl/sql)
-
Guten Tag, mein Widget Browser geht nicht! Diese Fehler erhalte ich. Ich nutze eine GDATA firewall