How to restore controlfile ?
Hi,
I have a database. its has only one controlfile (multiplexing is not done).
But I have a proper backup of all...
All of sudden controlfile got corrupted.
Now I need to restore controlfile from backup. But I dont remember my DBid.
Can someone help how to proceed now?
Thanks & Regards,
Suresh S.
please find the DBID from log files and restore the controlfile from backup.
this may help you http://download-west.oracle.com/docs/cd/B19306_01/backup.102/b14192/recov004.htm#CFABADJC
also take it as a lesson and do multiplexing of controlfiles and immediately take full backup of database
Similar Messages
-
FOR EXPERTS!! How to restore controlfile from tape using TSM??
Hi ,
I have a backup of my database (controlfiles, datafiles and archives) on tapes (TSM).
I'm doing some tests and i delete all my controlfiles.
Now i'm trying to restore the control file using the following:
RMAN>set DBID=1489198124;
RMAN>run{
allocate channel t1 device type sbt_tape parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo_capdb15p.opt)';
restore controlfile from autobackup;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/10/2007 16:25:30
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
The autobackup is OFF now (i will put this ON later and become a production enviroment).
How can i get the controlfile backup from tape. I have this backup on tape made by RMAN using TIVOLI STORAGE MANAGER.
Tks,
Paulo.This is the command:
run {
allocate channel t1 device type sbt_tape parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo_capdb15p.opt)';
backup current controlfile;
This is my backups!!!
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
5234 Incr 0 7.25M SBT_TAPE 00:00:06 10-MAY-07
BP Key: 5236 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Handle: BKP_HOT_SEMANAL_02ihckld_1_1 Media: 35240
Control File Included: Ckp SCN: 215589 Ckp time: 10-MAY-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
5254 Incr 1 7.25M SBT_TAPE 00:00:04 10-MAY-07
BP Key: 5260 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Handle: BKP_HOT_SEMANAL_05ihcksm_1_1 Media: 35240
Control File Included: Ckp SCN: 215769 Ckp time: 10-MAY-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
5315 Incr 0 7.25M SBT_TAPE 00:00:05 10-MAY-07
BP Key: 5327 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Handle: BKP_HOT_SEMANAL_0aihcld9_1_1 Media: 35212
Control File Included: Ckp SCN: 216284 Ckp time: 10-MAY-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
5454 Incr 0 7.25M SBT_TAPE 00:00:04 10-MAY-07
BP Key: 5459 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Handle: BKP_HOT_SEMANAL_0gihcmjn_1_1 Media: 35240
Control File Included: Ckp SCN: 217433 Ckp time: 10-MAY-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
5553 Incr 0 7.11M DISK 00:00:01 10-MAY-07
BP Key: 5556 Status: AVAILABLE Compressed: NO Tag: SEMANAL
Piece Name: /oracle/product/10.2.0/db/dbs/BKP_HOT_SEMANAL_0nihcv0m_1_1
Control File Included: Ckp SCN: 260191 Ckp time: 10-MAY-07 -
How to restoring controlfile when autobackup was not enabled from TAPE?
Database was dropped an year back and we need to restore the database
1)controlfile autobackup was not enabled
2)backups are in tape
3)no catalog db used
4)DBID is known.
we can request to load tapes that are holding backups from 1 week prior of db drop date
we can not use "restore controlfile from autobackup" as autobackup was not enabled. So how can we restore the controlfile?user8860934 wrote:
Database was dropped an year back and we need to restore the database
1)controlfile autobackup was not enabled
2)backups are in tape
3)no catalog db used
4)DBID is known.
we can request to load tapes that are holding backups from 1 week prior of db drop date
we can not use "restore controlfile from autobackup" as autobackup was not enabled. So how can we restore the controlfile?Do you have full backup... did include current controlfile mentioned in the script?
1)catalog those backupsets
2)check the backup summary for controlfiles & datafiles, SPFILE(optional)
3) if exist then you can restore using DBID or catalog start with commands.
Thanks -
Oracle 9i. RMAN. How to restore standby controlfile using "from tag" clause
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 9.2.0.8.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: crvs (not mounted)
connected to recovery catalog database
RMAN> list backup tag stby_ctrl;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
142851 Full 7M SBT_TAPE 00:01:44 02.02.11
BP Key: 142852 Status: AVAILABLE Tag: STBY_CTRL
Piece Name: CRVS_20110202.c7m3kbrd_1_1.stb
Controlfile Included: Ckp SCN: 67168490043 Ckp time: 02.02.11
RMAN> run
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/oracle/apps/osb/lib/libobk.so';
RESTORE standby CONTROLFILE from tag stby_ctrl;
release channel ch1;
2> 3> 4>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "from": expecting one of: "to"
RMAN-01007: at line 4 column 29 file: standard input
RMAN> run
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/oracle/apps/osb/lib/libobk.so';
RESTORE CONTROLFILE from tag stby_ctrl;
release channel ch1;
2> 3> 4> 5> 6>
allocated channel: ch1
channel ch1: sid=13 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting restore at 04.02.11
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/04/2011 09:49:26
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the controlfile found to restore
RMAN> run
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/oracle/apps/osb/lib/libobk.so';
RESTORE CONTROLFILE from 'CRVS_20110202.c7m3kbrd_1_1.stb';
release channel ch1;
2> 3> 4> 5> 6>
allocated channel: ch1
channel ch1: sid=13 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting restore at 04.02.11
channel ch1: restoring controlfile
channel ch1: restore complete
replicating controlfile
input filename=/data02/crvs/ctrl/control01.ctl
output filename=/data02/crvs/ctrl/control02.ctl
Finished restore at 04.02.11
released channel: ch1
RMAN>The error message states:
RMAN-01005: syntax error: found "from": expecting one of: "to"restore TO where?
Personally I'd never use RMAN to restore a control file. Takes less time to job copy an existing one. -
How to restore (not duplicate) DB from RAC ASM to non ASM
Hello everybody,
i am trying to recover db from RAC+ASM to non ASM no RAC node. I am running Oracle 10g (10.2.0.4) on Win2003 Server. I have functional backup from my prod system.
Here are my steps:
*1. On prod server i make backup running this script in RMAN*
configure channel device type 'SBT_TAPE' parms'SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=e:\backup)';
RUN {
backup device type SBT_TAPE database tag zal20081129;
SQL 'alter system archive log current';
backup device type SBT_TAPE archivelog ALL tag zal20081129;
*2. I prepared clon instance on another server (The same Oracle version) and start it to nomount mode.*
*3. I copied the backup from prod server to clon server to exactly the same path. (e:\backup)*
*4. I connect to RMAN on my new node and I use the DBID parameter and I restore controlfile.*
rman
connect target /
set DBID 3079749916
startup nomount
run {
allocate CHANNEL CTAPE DEVICE TYPE 'SBT_TAPE' PARMS'SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=f:\backup)';
allocate channel CDISK DEVICE TYPE DISK;
restore controlfile from 'f:\backup\78k91lrn_1_1';
alter database mount;
*5.Then I check the backup, crosscheck etc.*
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
169 Full 42.78G SBT_TAPE 01:12:54 04-MAR-09
BP Key: 169 Status: AVAILABLE Compressed: NO Tag: DATAFILES
Handle: 75k91hcj_1_1 Media:
List of Datafiles in backup set 169
File LV Type Ckp SCN Ckp Time Name
1 Full 928460863 04-MAR-09 +DATA/agost/datafile/system.272.668509367
2 Full 928460863 04-MAR-09 +DATA/agost/datafile/undotbs1.273.668509387
3 Full 928460863 04-MAR-09 +DATA/agost/datafile/sysaux.263.668509393
4 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_archive_data.298.668509401
5 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_archive_index.258.668509401
6 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_blob.259.668509401
7 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_data.274.668509405
8 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_index.275.668509533
9 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_report_data.260.668509661
10 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_report_index.261.668509661
12 Full 928460863 04-MAR-09 +DATA/agost/datafile/undotbs2.264.668509661
13 Full 928460863 04-MAR-09 +DATA/agost/datafile/users.265.668509667
14 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_index.270.668510837
15 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_index.299.668510843
16 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_data.300.668510859
17 Full 928460863 04-MAR-09 +DATA/agost/datafile/ifsapp_data.301.668510865
BS Key Size Device Type Elapsed Time Completion Time
171 1.98G SBT_TAPE 00:02:54 04-MAR-09
BP Key: 171 Status: AVAILABLE Compressed: NO Tag: ARCHIVE_LOGS
Handle: 77k91lm2_1_1 Media:
List of Archived Logs in backup set 171
Thrd Seq Low SCN Low Time Next SCN Next Time
1 790 927018133 03-MAR-09 927379509 03-MAR-09
1 791 927379509 03-MAR-09 927635333 03-MAR-09
1 792 927635333 03-MAR-09 927804715 03-MAR-09
1 793 927804715 03-MAR-09 928438198 04-MAR-09
1 794 928438198 04-MAR-09 928496353 04-MAR-09
1 795 928496353 04-MAR-09 928496667 04-MAR-09
2 941 927018173 03-MAR-09 927414357 03-MAR-09
2 942 927414357 03-MAR-09 927725821 03-MAR-09
2 943 927725821 03-MAR-09 927747874 03-MAR-09
2 944 927747874 03-MAR-09 927804436 03-MAR-09
2 945 927804436 03-MAR-09 928375778 03-MAR-09
2 946 928375778 03-MAR-09 928460503 04-MAR-09
2 947 928460503 04-MAR-09 928496341 04-MAR-09
2 948 928496341 04-MAR-09 928496660 04-MAR-09
*6. Then I run this script to restore and recover db.*
run {
SET UNTIL SEQUENCE 795 THREAD 1;
SET UNTIL SEQUENCE 948 THREAD 2;
restore database;
switch datafile all;
recover database;
*7. Everything goes well see under.*
RMAN> 2> 3> 4> 5> 6> 7>
executing command: SET until clause
executing command: SET until clause
Starting restore at 04-MAR-09
using channel ORA_DISK_1
using channel ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: starting datafile backupset restore
channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to +DATA/agost/datafile/system.272.668509367
restoring datafile 00002 to +DATA/agost/datafile/undotbs1.273.668509387
restoring datafile 00003 to +DATA/agost/datafile/sysaux.263.668509393
restoring datafile 00004 to +DATA/agost/datafile/ifsapp_archive_data.298.668509401
restoring datafile 00005 to +DATA/agost/datafile/ifsapp_archive_index.258.668509401
restoring datafile 00006 to +DATA/agost/datafile/ifsapp_blob.259.668509401
restoring datafile 00007 to +DATA/agost/datafile/ifsapp_data.274.668509405
restoring datafile 00008 to +DATA/agost/datafile/ifsapp_index.275.668509533
restoring datafile 00009 to +DATA/agost/datafile/ifsapp_report_data.260.668509661
restoring datafile 00010 to +DATA/agost/datafile/ifsapp_report_index.261.668509661
restoring datafile 00012 to +DATA/agost/datafile/undotbs2.264.668509661
restoring datafile 00013 to +DATA/agost/datafile/users.265.668509667
restoring datafile 00014 to +DATA/agost/datafile/ifsapp_index.270.668510837
restoring datafile 00015 to +DATA/agost/datafile/ifsapp_index.299.668510843
restoring datafile 00016 to +DATA/agost/datafile/ifsapp_data.300.668510859
restoring datafile 00017 to +DATA/agost/datafile/ifsapp_data.301.668510865
channel ORA_SBT_TAPE_1: reading from backup piece 75k91hcj_1_1
channel ORA_SBT_TAPE_1: restored backup piece 1
piece handle=75k91hcj_1_1 tag=DATAFILES
channel ORA_SBT_TAPE_1: restore complete, elapsed time: 01:25:12
Finished restore at 04-MAR-09
Starting recover at 04-MAR-09
using channel ORA_DISK_1
using channel ORA_SBT_TAPE_1
starting media recovery
channel ORA_SBT_TAPE_1: starting archive log restore to default destination
channel ORA_SBT_TAPE_1: restoring archive log
archive log thread=1 sequence=794
channel ORA_SBT_TAPE_1: restoring archive log
archive log thread=2 sequence=947
channel ORA_SBT_TAPE_1: reading from backup piece 77k91lm2_1_1
channel ORA_SBT_TAPE_1: restored backup piece 1
piece handle=77k91lm2_1_1 tag=ARCHIVE_LOGS
channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:02:26
archive log filename=E:\ORADATA\AGOST\FLASHBACK\AGOST\ARCHIVELOG\2009_03_04\O1_MF_1_794_4TX5D7RD_.ARC thread=1 sequence=794
archive log filename=E:\ORADATA\AGOST\FLASHBACK\AGOST\ARCHIVELOG\2009_03_04\O1_MF_2_947_4TX5D7OY_.ARC thread=2 sequence=947
channel default: deleting archive log(s)
archive log filename=E:\ORADATA\AGOST\FLASHBACK\AGOST\ARCHIVELOG\2009_03_04\O1_MF_2_947_4TX5D7OY_.ARC recid=1563 stamp=680629925
channel default: deleting archive log(s)
archive log filename=E:\ORADATA\AGOST\FLASHBACK\AGOST\ARCHIVELOG\2009_03_04\O1_MF_1_794_4TX5D7RD_.ARC recid=1562 stamp=680629925
media recovery complete, elapsed time: 00:00:13
Finished recover at 04-MAR-09
*8. Then when i want to open database*
using command 'Alter system open resetlogs;' I got this error:
RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 03/05/2009 07:26:03
RMAN-06003: ORACLE error from target database:
ORA-00600: internal error code, arguments: [kgeade_is_0], [|http://forums.oracle.com/forums/], [], [|http://forums.oracle.com/forums/], [], [|http://forums.oracle.com/forums/], [], [|http://forums.oracle.com/forums/]
In the alert log I have got this error: (for every log group)
ORA-00313: open failed for members of log group 4 of thread 2
ORA-00312: online log 4 thread 2: '+FLASHBACK/agost/onlinelog/group_4.260.668510637'
ORA-17503: ksfdopn:2 Failed to open file +FLASHBACK/agost/onlinelog/group_4.260.668510637
ORA-15001: diskgroup "FLASHBACK" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to Cluster Manager
ORA-00312: online log 4 thread 2: '+DATA/agost/onlinelog/group_4.268.668510633'
ORA-17503: ksfdopn:2 Failed to open file +DATA/agost/onlinelog/group_4.268.668510633
ORA-15001: diskgroup "DATA" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to Cluster Manager
So obviouslly database wants to open online logs in the path like ASM. Which is wrong. What should I do to tell database to open it according to init.ora parameters
*.db_create_file_dest='e:\oradata\agost'
*.db_create_online_log_dest_1='e:\oradata\agost'
Any suggestions???
ThanksHi,
thanks for you quick answer. But I do restore to the local file system, even if the log says:
restoring datafile 00001 to +DATA/agost/datafile/system.272.668509367
restoring datafile 00002 to +DATA/agost/datafile/undotbs1.273.668509387 .....
all the datafiles are correctly restored. I think oracle uses the parameter db_create_file_dest and creates the files there.
I tried also the script with SET NEW NAME:
run {
Set newname for datafile 1 to 'e:\oradata\AGOST\system.272.668509367';
Set newname for datafile 2 to 'e:\oradata\AGOST\undotbs1.273.668509387';
Set newname for datafile 3 to 'e:\oradata\AGOST\sysaux.263.668509393';
Set newname for datafile 4 to 'e:\oradata\AGOST\ifsapp_archive_data.298.668509401';
Set newname for datafile 5 to 'e:\oradata\AGOST\ifsapp_archive_index.258.668509401';
Set newname for datafile 6 to 'e:\oradata\AGOST\ifsapp_blob.259.668509401';
Set newname for datafile 7 to 'e:\oradata\AGOST\ifsapp_data.274.668509405';
Set newname for datafile 8 to 'e:\oradata\AGOST\ifsapp_index.275.668509533';
Set newname for datafile 9 to 'e:\oradata\AGOST\ifsapp_report_data.260.668509661';
Set newname for datafile 10 to 'e:\oradata\AGOST\ifsapp_report_index.261.668509661';
Set newname for datafile 12 to 'e:\oradata\AGOST\undotbs2.264.668509661';
Set newname for datafile 13 to 'e:\oradata\AGOST\users.265.668509667';
Set newname for datafile 14 to 'e:\oradata\AGOST\ifsapp_index.270.668510837';
Set newname for datafile 15 to 'e:\oradata\AGOST\ifsapp_index.299.668510843';
Set newname for datafile 16 to 'e:\oradata\AGOST\ifsapp_data.300.668510859';
Set newname for datafile 17 to 'e:\oradata\AGOST\ifsapp_data.301.668510865';
Set newname for tempfile 1 to 'e:\oradata\AGOST\temp.276.668509397';
SQL "ALTER DATABASE RENAME FILE ''+DATA/agost/onlinelog/group_1.256.668509345'' TO ''e:\oradata\AGOST\REDO01.LOG'' ";
SQL "ALTER DATABASE RENAME FILE ''+FLASHBACK/agost/onlinelog/group_1.257.668509351'' TO ''e:\oradata\AGOST\REDO02.LOG'' ";
SQL "ALTER DATABASE RENAME FILE ''+DATA/agost/onlinelog/group_2.257.668509357'' TO ''e:\oradata\AGOST\REDO03.LOG'' ";
SQL "ALTER DATABASE RENAME FILE ''+FLASHBACK/agost/onlinelog/group_2.258.668509361'' TO ''e:\oradata\AGOST\REDO04.LOG'' ";
SQL "ALTER DATABASE RENAME FILE ''+DATA/agost/onlinelog/group_3.266.668510623'' TO ''e:\oradata\AGOST\REDO05.LOG'' ";
SQL "ALTER DATABASE RENAME FILE ''+FLASHBACK/agost/onlinelog/group_3.259.668510627'' TO ''e:\oradata\AGOST\REDO06.LOG'' ";
SQL "ALTER DATABASE RENAME FILE ''+DATA/agost/onlinelog/group_4.268.668510633'' TO ''e:\oradata\AGOST\REDO07.LOG'' ";
SQL "ALTER DATABASE RENAME FILE ''+FLASHBACK/agost/onlinelog/group_4.260.668510637'' TO ''e:\oradata\AGOST\REDO08.LOG'' ";
SET UNTIL SEQUENCE 795 THREAD 1;
SET UNTIL SEQUENCE 948 THREAD 2;
restore database;
switch datafile all;
recover database;
But it gives me this error in RMAN:
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
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
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
sql statement: ALTER DATABASE RENAME FILE ''+DATA/agost/onlinelog/group_1.256.668509345'' TO ''e:\oradata\AGOST\REDO01.LOG''
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 03/06/2009 10:48:55
RMAN-20000: abnormal termination of job step
RMAN-11003: failure during parse/execution of SQL statement: ALTER DATABASE RENAME FILE '+DATA/agost/onlinelog/group_1.256.668509345' TO 'e:\oradata\AGOST\REDO01.LOG'
RMAN-11001: Oracle Error:
ORA-00600: internal error code, arguments: [kgeade_is_0], [], [], [], [], [], [], []
and in alert log i have got this:
Errors in file c:\oracle\product\10.2.0\admin\agost\udump\agost_ora_3200.trc:
ORA-00600: internal error code, arguments: [kgeade_is_0], [], [], [], [], [], [], []
Fri Mar 06 10:48:55 2009
ORA-600 signalled during: ALTER DATABASE RENAME FILE '+DATA/agost/onlinelog/group_1.256.668509345' TO 'e:\oradata\AGOST\REDO01.LOG' ...
dont know what to do.
There must be way how to recover it. I think my first try (without SET NEWNAME) is closer to the end, there is only need to "repair" the online logs.
Any other suggestions?
thanks -
How to Restore Control file to New Server
I want to test my backup by restoring the full backup of my production database on a separate test server.
I have taken following action for restore to test server:
• Copy full backup to Test Server on same folder where it was in Production Server.
• Copy parameter file to Test Server. (Edit control file location on it)
• Connect Rman
• Set DB with new DBID
• Startup Nomount (from new parameter file)
RUN
ALLOCATE CHANNEL c1 TYPE DISK;
RESTORE CONTROLFILE FROM AUTOBACKUP;
ALTER DATABASE MOUNT;
Then we found following error:
RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
Starting restore at 07-NOV-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20071107
channel ORA_DISK_1: looking for autobackup on day: 20071106
channel ORA_DISK_1: looking for autobackup on day: 20071105
channel ORA_DISK_1: looking for autobackup on day: 20071104
channel ORA_DISK_1: looking for autobackup on day: 20071103
channel ORA_DISK_1: looking for autobackup on day: 20071102
channel ORA_DISK_1: looking for autobackup on day: 20071101
channel ORA_DISK_1: no autobackup in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/07/2007 16:35:13
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
Can anyone guide me, how to restore control file?
IrfanRMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
Starting restore at 07-NOV-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day:
20071107
channel ORA_DISK_1: looking for autobackup on day:
20071106
channel ORA_DISK_1: looking for autobackup on day:
20071105
channel ORA_DISK_1: looking for autobackup on day:
20071104
channel ORA_DISK_1: looking for autobackup on day:
20071103
channel ORA_DISK_1: looking for autobackup on day:
20071102
channel ORA_DISK_1: looking for autobackup on day:
20071101
channel ORA_DISK_1: no autobackup in 7 days found
RMAN-00571:It seems to me its not finding the contolfile from 7 days before sysdate ,increase the window size using
RMAN>restore controlfile from autobackup maxdays 15;Khurram -
How to extract controlfile from backup set?
Hi
If I use this "INCLUDE CURRENT CONTROLFILE" in backup command direct to tape and no catalog, How to extract controlfile from backup set from tape?
Thanks,
Taohiko
Edited by: taohiko on Sep 17, 2009 7:54 AMyes
list backup of controlfile
will show you where controlfile backup piece reside with backup piece name
after then
restore controlfile from 'backup_piece_naem_with_its_full_path_from_above_command_result';Khurram -
Restore controlfile from tape backup without autobackup setting on
I am testing a scenraio of restoring control file if we loose all control files.
My RMAN settings for CONTROLFILE AUTOBACKUP is OFF. But, I have taken a backup of controlfile using 'BACKUP CURRENT CONTROL FILE' .
When I tried to restore control file. I am receiving following error:
RMAN> run {
2> allocate channel c101 type sbt_tape;
3> restore controlfile ;
4> }
allocated channel: c101
channel c101: sid=153 devtype=SBT_TAPE
channel c101: VERITAS NetBackup for Oracle - Release 6.0 (2006110304)
Starting restore at 24-MAY-2007 13:44:59
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/24/2007 13:44:59
RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP
My question is, How can I restore control file from tape backup without CONTROLFILE AUTOBACKUP setting ON.
It sounds like, There is no way we can restore control file from tape backup if you've not set the CONTROLFILE AUTOBACKUP is ON.
Please adviceWhen all controlfiles are lost and a recovery catalog is NOT used, RMAN has no information , where to find the controlfile backup. It's not enough to specify the channel, such a channel could hold many different backups from many different databases. You have tell , which database and which backupset. Modify your run block:
SET DBID <DBID of the database,for which you want to restore the controlfile>;
RESTORE CONTROLFILE FROM <name_of_backupiece_which_contains_the_controlfile backup>';
Werner -
Restore controlfile from leagato tape backup
I am using legato tool to perform rman tape backup.
I use the following script on legato to get the controlfile backup.
"backup current controlfile format '%d_%s_%p.ctrl'; "
If I lost the controlfile how do i restore controlfile from the tape. Assume that the DB in nomount stage.Hi,
backing up autobackup controlfiles to legato is possible. All you have to do is to configure autobackup accordingly. By default autobackup controlfiles will get written to disk.
However i strongly recommend to use a rman backup catalog. This will save you a lot of time consuming trouble if you need to restore your database.
The rman catalog database itself does not need any license and is rather small (5 GB on disk, 512 MB memory).
Restoring the control file will be something like this:
set controlfile autobackup format for device type sbt to '%F';
restore controlfile from autobackup;
Ronny Egner
My Blog: http://blog.ronnyegner-consulting.de -
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 -
Set until time clause to restore controlfile
Hello
How can I use "set until" clause to restore the controlfile ?
The database is already in archivelog mode.
RMAN>
run {
set until time "TO_DATE('2011-02-24 09:30:00','yyyy-mm-dd hh24:mi:ss')";
restore controlfile from autobackup;
RMAN>
RMAN> 2> 3> 4>
executing command: set until time
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 02/24/2011 09:52:54
ORA-01507: database not mountedThis is the rman backup log:
Starting Control File and SPFILE Autobackup at 24-FEB-11
piece handle=/oracle/ora1020/dbs/c-1270860316-20110224-01 comment=NONE
Finished Control File and SPFILE Autobackup at 24-FEB-11I can also confirm that it was backed up.
ls -l /oracle/ora1020/dbs/c-1270860316-20110224-01
-rw-r----- 1 oracle dba 7143424 Feb 24 09:25 /oracle/ora1020/dbs/c-1270860316-20110224-01For Datafiles and ArchiveLogs :
SET UNTIL works because RMAN can query the Controlfile (that is already present) {OR the Catalog, if available} to determine the Database Incaranation and identify all the BackupSets, BackupPieces and SCNs for datafiles.
For Controlfiles :
SET UNTIL needs to be able to query a source or determine a default location. If a Catalog is available, it can query the catalog. In the absence of the catalog, it can only determine the expected location to restore from on the basis of the AUTOBACKUP location and FORMAT.
When you have AutoBackup to Disk, using an FRA and have the AUTOBACKUP FORMAT set correctly you will notice that the controlfile backups go to a directory that has the date as part of the directory name. RMAN can "query" the backups it finds in each of the folders in the autobackup location and determine the correct piece to restore from. This is predicated on the FORMAT being the expected format. That is why the example also shows how you set the FORMAT before you do the restore -- to "tell" RMAN what format to expect. (Remember that it has no repository -- controlfile or catalog -- to query so it doesn't know the backup piece names, unless they follow the expected location and format !)
All of this works well on disk. On tape, it has to actually send it's requests to the Medial Management Layer -- it is the Media Management Layer that maintains the catalog of tapes and files on tapes. (Remember that RMAN still doesn't have a repository that it can query !).
Going back to my earlier comment that SET UNTIL is used for Datafiles and Archivelogs : Because it is much easier for RMAN to query a known repository for all the information it needs.
Hemant K Chitale -
When to restore controlfile, rman is complaining database not mounted?
to restore controlfile, shouldn`t the database be in NOMOUNT status?
if yes, then why rman is complaining ORA-01507?
where I went wrong? Please advise.
C:\Documents and Settings\PhoenixBai>rman target / nocatalog
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Dec 14 10:35:51 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 234883972 bytes
Database Buffers 369098752 bytes
Redo Buffers 7135232 bytes
RMAN> restore controlfile until time 'sysdate-1.5/24';
Starting restore at 14-DEC-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/14/2010 10:36:12
ORA-01507: database not mounted
RMAN>it doesn`t. I tried long before this one.
the dilemma i am facing is that I need to recover to the time which was included in incarnation 2.
And to be able to reset database to incarnation 2, i need to startup MOUNT the database.
And once you startup mount the database RESTORE CONTROLFILE won`t work any more.
below is the standard procedure, documented on 10gR2 doc, but still, i am getting errors:
Why it is throwing errors? HOw can I fix?
RMAN> alter database mount;
database mounted
RMAN> list incarnation of database orcl;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 ORCL 1264908153 PARENT 1 30-AUG-05
2 2 ORCL 1264908153 PARENT 534907 07-DEC-10
3 3 ORCL 1264908153 CURRENT 56335397 14-DEC-10
RMAN> reset database to incarnation 2;
database reset to incarnation 2
RMAN> restore database until scn 56335390;
Starting restore at 14-DEC-10
using channel ORA_DISK_1
creating datafile fno=6 name=E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\ETLTBS01.ORA
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
restoring datafile 00002 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
restoring datafile 00003 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
restoring datafile 00004 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
restoring datafile 00005 to E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
channel ORA_DISK_1: reading from backup piece E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2
MF_NNND1_TAG20101213T132300_6JCCFO2X_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2010_12_13\O1_MF_NNND1_TAG20101213
O2X_.BKP tag=TAG20101213T132300
channel ORA_DISK_1: restore complete, elapsed time: 00:00:55
Finished restore at 14-DEC-10
RMAN> recover database until scn 56335390;
Starting recover at 14-DEC-10
using channel ORA_DISK_1
starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 12/14/2010 11:36:14
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
start until change 56335390
ORA-00283: recovery session canceled due to errors
ORA-38727: FLASHBACK DATABASE requires a current control file.Edited by: PhoenixBai on Dec 14, 2010 11:37 AM -
Backup set is over 7 days -- DB status is NOMOUNT -- RESTORE CONTROLFILE
I'm trying to do a restore of a control file using RMAN.
After doing a STARTUP NOMOUNT of the database, I try:
SET DBID = [whatever]
RESTORE CONTROLFILE FROM AUTOBACKUP;
The error I get is:
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
And that's true. The backup set I'm trying to restore from is over 7 days old.
I tried
RESTORE CONTROLFILE FROM AUTOBACKUP UNTIL TIME "TO_DATE('12/17/08 18:00:00', 'MM/DD/YY HH24:MI:SS')"
and I get the same error.
All the examples I've seen using UNTIL TIME seem to assume that the database status is MOUNT not NOMOUNT, which is needed if you don't have a control file in the first place.
How do I get around this problem?
=== AlAl,
Set your env variable oracle_sid = whatever_sid
then from command line
c:> rman target /
or
$> rman target /
And use one of the following to list your backups
RMAN> LIST BACKUP;
RMAN> LIST BACKUP OF DATABASE;
RMAN> LIST BACKUP SUMMARY;
RMAN> LIST INCARNATION;
RMAN> LIST BACKUP BY FILE;
RMAN> LIST COPY OF DATABASE ARCHIVELOG ALL;
RMAN> LIST COPY OF DATAFILE 1, 2, 3;
RMAN> LIST BACKUP OF DATAFILE 11 SUMMARY;
RMAN> LIST BACKUP OF ARCHIVELOG FROM SEQUENCE 1437;
RMAN> LIST CONTROLFILECOPY "/tmp/cntrlfile.copy";
RMAN> LIST BACKUPSET OF DATAFILE 1;Regards -
Uanble to RESTORE CONTROLFILE IN NOMOUNT
Hi,
I have a problem in database which has catalog tablespace..i have rman level 0 backup for that database.
yesterday entire database was corrupted ..so i should recover entire database with backuped control file.
here my problem
$ rman target sys/selva@rmain catalog rcat/rcat
RMAN> shutdown immediate
RMAN>exit
$ rman target sys/selva@rmain catalog rcat/rcat
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04004: error from recovery catalog database: ORA-01034: ORACLE not available
HOW DO YOU RESTORE CONTROLFILE IN NOMOUNT STAGE??? DURING NOMOUNT OR MOUNT STAGE WE CANNOT OPEN CATALOG USER RCAT .
HOW DO YOU PERFORM INCOMPLETE RECOVERY ON DATABASE WHICH HAS CATALOG TABLESPACE???
ORACLE 9I
REDHAT 5
THANK U
SELVAsybrand_b wrote:
Selva,
To answer this question I would first like you to tak a scissor , remove the CAPS LOCK from your keyboard, and I recommend you stop using uppercase and boldface.
That is definitely shouting and should be avoided.sorry....
Obviously when you need to recover a catalog database you need to do so in
nocatalog mode
So you need to use
rman nocatalog target /
and leave out the catalog part.acctually i have two incarnation ..i lost current incarnation datafiles and backup..
so that i want to restore controlfile and move to previous incarnation..
rman target / RMAN> reset database to incarnation 20;
ERROR: cannot reset without catalog database -
How to restore the control fie? without having RMAN catalog.
Hi ,
can anyone help me out here.???
How can i restore the control file.if i dont have the RMAN catalog.
Please provide me steps that'll be helpful. I am frsher in oracle DBA
Please mail me: [email protected]
Regards
Vikas SinghHi Vikas,
You can restore the control if you have the full backup of your database in some location.
Lets assume you have the full backup piecs in loc "/u02/backup/..bkp"
steps:
shut abort;
startup nomount;
catalog start with "/u02/backup/..bkp"
restore spfile from '/u02/backup/..bkp";
restore controlfile from "/u02/backup/..bkp"
shut immediate;
startup mount;
alter database open;
Once the db is up with controlfile immediately take the full database backup of your database.
Let me know having issue after following this.
-- rohit
http://dbarohit.blogspot.in/
Maybe you are looking for
-
Cannot answer calls on I phone 5.
The phone rings, actually it doesn't ring, it vibrates. Nothing shows up on the phone as per caller, ID or an answer option/page. If I go to the call pad screen on the PHONE icon, again its as tho no one is calling. The only reason I know it is an
-
Movement type and obyc transaction and general modification
Dear All, I would like to seek advice. How to know from movement type, I can know that it is using what transaction and what general modification in OBYC? I a bit surprise to know from forum that some even can tell movement type 201 is GBB-VBR. May I
-
[svn:fx-trunk] 8702: -add textLayout source project to trunk
Revision: 8702 Author: [email protected] Date: 2009-07-20 19:15:02 -0700 (Mon, 20 Jul 2009) Log Message: -add textLayout source project to trunk -to build from frameworks/build.xml: ant tlf -removed in/tlf directory, no more pre-built tlf -upd
-
Outlook causes Itunes not to function
If I open Outlook before I tunes then I cannot get Itunes to play any songs. Once I open itunes then I cannot play any sounds on my computer. If i open itunes first then the sound works and songs play but outlook has some issues. Anyone have any idea
-
Tcode Lp10 requested quantity calculation.
Hi Friends, I want to know logic for requested quantity calculation in LP10 as I see that there is stock available for the material but qty is not calcualted in requested quantity field. Thanks, Kiran