Recovery of control files. I need to restore database?
I am using below command procedure files recovery: restore the backup controlfile. I'm not restore database in this procedure with RESTORE DATABASE==================================================================================
QUESTION: Do I need to restore a full database to be consistent?
=====================================================
SQL > select name from v$ controlfile;
NAME
--------------------------------------------------------------------------------
/ QA/Data/OBT/QA112QA/Data/control01. CTL
/ QA/Data/OBT/QA112QA/Data/control02. CTL
/ QA/Data/OBT/QA112QA/Data/control03. CTL
[oracle@rh56b64-1 rmanbackup] $ rm /qa/data/obt/QA112QA/data/control01.ctl /qa/data/obt/QA112QA/data/control02.ctl /qa/data/obt/QA112QA/data/control03.ctl
SQL > stop the demolition
ORACLE instance stops.
SQL > startup
ORACLE instance started.
Total System Global Area 275615744 bytes
Bytes of size 2212496 fixed
184552816 variable size bytes
Buffers data 83886080 bytes
Redo buffers 4964352 bytes
ORA-00205: error in the identification of control files, see log alerts for more information
[oracle@rh56b64-1 rmanbackup] $ pwd
/ QA/Data/OBT/rmanbackup
[oracle@rh56b64-1 rmanbackup] $ ls - ltr
Total 591368
-rw - r - 1 oracle oinstall 586711040 24 Dec 19:25 1antmgo6_1_1
-rw - r - 1 oracle oinstall 1435648 24 Dec 19:25 1dntmgov_1_1
-rw - r - 1 oracle oinstall 16809984 24 Dec 19:25 d to cfc-1266678734-20121224-0
-set DBID - get the name of the controlfile autobackup.
-For example, if the name of auto backup is
-CTL_SP_BAK_C-1507972899-20050124-00 the the DBID is
-1266678734. This step is not necessary if the instance is
-Start RMAN
RMAN > set dbid 1266678734
executing command: SET DBID
RMAN > restore controlfile to ' / qa/data/obt/rmanbackup/EFA-1266678734-20121224-0;
From restoration to December 24, 12
using the control file of the target instead of recovery catalog database
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID = 135 type device = DISK
channel ORA_DISK_1: restore the control file
channel ORA_DISK_1: restore complete, duration: 00:00:03
output file name=/qa/data/obt/QA112QA/data/control01.ctl
output file name=/qa/data/obt/QA112QA/data/control02.ctl
output file name=/qa/data/obt/QA112QA/data/control03.ctl
Finished restore at December 24, 12
RMAN > change the editing of the database;
mounted database
output channel: ORA_DISK_1
RMAN > restore database;
From back to December 24, 12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID = 135 type device = DISK
starting media recovery
Journal archived for thread 1 sequence 2 is already on the disc in the file /qa/data/obt/QA112QA/data/redo02.log
Journal archived for thread 1 with sequence 3 is already on the disc in the file /qa/data/obt/QA112QA/data/redo03.log
Journal archived for thread 1 with sequence 4 is already on the disc in the file /qa/data/obt/QA112QA/data/redo01.log
Archive log file name=/qa/data/obt/QA112QA/data/redo02.log thread = 1 sequence = 2
Archive log file name=/qa/data/obt/QA112QA/data/redo03.log thread = 1 = 3 sequence
Archive log file name=/qa/data/obt/QA112QA/data/redo01.log thread = 1 sequence = 4
media recovery complete, duration: 00:00:01
Finished recover at December 24, 12
RMAN > alter database open resetlogs;
open database
Hello
==================================================================================
QUESTION: Do I need to restore a full database to be consistent?
=====================================================
You don't have to restore the full database. You just need to restore the backup controlfile and restore the database.
The steps you mentioned are good restore the controlfile. After recovery, you must open the database in resetlogs.
Also, you can take a look at this http://neeraj-dba.blogspot.com/2011/04/loss-of-control-file-in-various.html
Kind regards
Shivananda
Tags: Database
Similar Questions
-
lost control file and datafile addeed restore/recovery without loss of data
Here, I tried the following
created a new table called t2 and made sure the data went to a specific tablespace...
has taken a level 0 backup
remove the control file
couple of datafile to above tablespace was added and then insert more data
then went out to restore the database... but datafile and control file always could not be open? What is wrong here...
-wnet to session 2 and renamed datafile for file unammedSQL> @datafile -- list of datafile Tablespace File Typ Tablespac File Stat Used MB Free MB FILE_MB MAXMB Datafile_name FILE_ID AUT ---------- -------- --------- --------- ---------- ---------- ---------- -------- ------------------------------ ---------- --- UNDOTBS1 Datafile ONLINE AVAILABLE 16 84 100 1,024 /data/trgt/undotbs01.dbf 3 YES USERS Datafile ONLINE AVAILABLE 1153 895 2048 3,072 /data3/trgt/user02.dbf 5 YES CNT_TST Datafile ONLINE AVAILABLE 1 9 10 0 /data3/trgt/cnt_tst01.dbf 7 NO SYSAUX Datafile ONLINE AVAILABLE 626 35 660 32,768 /data/trgt/sysaux01.dbf 2 YES USERS Datafile ONLINE AVAILABLE 2031 17 2048 2,048 /data3/trgt/move/users01.dbf 4 YES SYSTEM Datafile ONLINE AVAILABLE 712 58 770 32,768 /data/trgt/system01.dbf 1 YES USERS Datafile ONLINE AVAILABLE 65 35 100 32,768 /data3/trgt/users03.dbf 6 YES 7 rows selected. -- new table is created called t2 and its going into TS called cnt_tst SQL> CREATE TABLE TEST.T2 ( C1 DATE, C2 NUMBER, C3 NUMBER, C4 VARCHAR2(300 BYTE) ) TABLESPACE cnt_tst; 2 3 4 5 6 7 8 Table created. -- data inserted SQL> INSERT INTO test.T2 SELECT * FROM (SELECT SYSDATE, ROWNUM C2, DECODE(MOD(ROWNUM,100),99,99,1) C3, RPAD('A',300,'A') C4 FROM DUAL CONNECT BY LEVEL <= 10000) ; 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10000 rows created. SQL> commit; Commit complete. -- to check of cnt_tst has any free space or not, as we can see its full SQL> @datafile Tablespace File Typ Tablespac File Stat Used MB Free MB FILE_MB MAXMB Datafile_name FILE_ID AUT ---------- -------- --------- --------- ---------- ---------- ---------- -------- ------------------------------ ---------- --- UNDOTBS1 Datafile ONLINE AVAILABLE 16 84 100 1,024 /data/trgt/undotbs01.dbf 3 YES USERS Datafile ONLINE AVAILABLE 1153 895 2048 3,072 /data3/trgt/user02.dbf 5 YES SYSAUX Datafile ONLINE AVAILABLE 626 35 660 32,768 /data/trgt/sysaux01.dbf 2 YES USERS Datafile ONLINE AVAILABLE 2031 17 2048 2,048 /data3/trgt/move/users01.dbf 4 YES SYSTEM Datafile ONLINE AVAILABLE 712 58 770 32,768 /data/trgt/system01.dbf 1 YES USERS Datafile ONLINE AVAILABLE 65 35 100 32,768 /data3/trgt/users03.dbf 6 YES CNT_TST Datafile ONLINE AVAILABLE 10 0 10 0 /data3/trgt/cnt_tst01.dbf 7 NO 7 rows selected. SQL> select count(*) from test.t2; COUNT(*) ---------- 10000 1 row selected. -- to get a count and max on date SQL> select max(c1) from test.t2; MAX(C1) ------------------ 29-feb-12 13:47:52 1 row selected. SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog) SQL> -- now control files are removed SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /ctrl/trgt/control01.ctl /ctrl/trgt/control02.ctl 2 rows selected. SQL> SQL> ! rm /ctrl/trgt/control01.ctl SQL> ! rm /ctrl/trgt/control02.ctl SQL> ! ls -ltr /ctrl/trgt/ ls: /ctrl/trgt/: No such file or directory SQL> -- new datafile is added to CNT_TST TABLESPACE and new data is added as well SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF; Tablespace altered. SQL> ALTER SYSTEM CHECKPOINT; System altered. SQL> alter system switch logfile; System altered. SQL> / System altered. SQL> / System altered. SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST03.dbf' SIZE 100M AUTOEXTEND OFF; Tablespace altered. SQL> INSERT INTO test.T2 SELECT * FROM (SELECT SYSDATE, ROWNUM C2, DECODE(MOD(ROWNUM,100),99,99,1) C3, RPAD('A',300,'A') C4 FROM DUAL CONNECT BY LEVEL <= 10000) ; 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10000 rows created. SQL> / 10000 rows created. SQL> commit; Commit complete. SQL> INSERT INTO test.T2 SELECT * FROM (SELECT SYSDATE, ROWNUM C2, DECODE(MOD(ROWNUM,100),99,99,1) C3, RPAD('A',300,'A') C4 FROM DUAL CONNECT BY LEVEL <= 40000) ; 2 3 4 5 6 7 8 9 10 11 12 13 14 15 40000 rows created. SQL> commit; Commit complete. SQL> @datafile -- to make sure new datafile has been registered with the DB Tablespace File Typ Tablespac File Stat Used MB Free MB FILE_MB MAXMB Datafile_name FILE_ID AUT ---------- -------- --------- --------- ---------- ---------- ---------- -------- ------------------------------ ---------- --- CNT_TST Datafile ONLINE AVAILABLE 9 91 100 0 /data3/trgt/CNT_TST03.dbf 9 NO UNDOTBS1 Datafile ONLINE AVAILABLE 16 84 100 1,024 /data/trgt/undotbs01.dbf 3 YES USERS Datafile ONLINE AVAILABLE 1153 895 2048 3,072 /data3/trgt/user02.dbf 5 YES CNT_TST Datafile ONLINE AVAILABLE 9 91 100 0 /data3/trgt/CNT_TST02.dbf 8 NO SYSAUX Datafile ONLINE AVAILABLE 626 35 660 32,768 /data/trgt/sysaux01.dbf 2 YES USERS Datafile ONLINE AVAILABLE 2031 17 2048 2,048 /data3/trgt/move/users01.dbf 4 YES SYSTEM Datafile ONLINE AVAILABLE 712 58 770 32,768 /data/trgt/system01.dbf 1 YES USERS Datafile ONLINE AVAILABLE 65 35 100 32,768 /data3/trgt/users03.dbf 6 YES CNT_TST Datafile ONLINE AVAILABLE 10 0 10 0 /data3/trgt/cnt_tst01.dbf 7 NO 9 rows selected. -- now the count and max ... note count before backup was 10000 and max(c1) was diff SQL> select count(*) from test.t2; COUNT(*) ---------- 70000 1 row selected. SQL> select max(c1) from test.t2; MAX(C1) ------------------ 29-feb-12 13:58:25 1 row selected. SQL> -- now restore starts SQL> shutdown abort; ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@berry trgt]$ rman Recovery Manager: Release 11.2.0.1.0 - Production on Wed Feb 29 14:01:48 2012 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. RMAN> connect catalog rman/pass@rcat connected to recovery catalog database RMAN> connect target / connected to target database (not started) RMAN> startup nomount; Oracle instance started Total System Global Area 188313600 bytes Fixed Size 1335388 bytes Variable Size 125833124 bytes Database Buffers 58720256 bytes Redo Buffers 2424832 bytes RMAN> restore controlfile from autobackup; Starting restore at 29-FEB-12 14:02:37 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=20 device type=DISK recovery area destination: /backup/trgt/flash_recovery_area database name (or database unique name) used for search: TRGT channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120229 channel ORA_DISK_1: AUTOBACKUP found: /backup/trgt/backup/cont_c-3405317011-20120229-09 channel ORA_DISK_1: restoring control file from AUTOBACKUP /backup/trgt/backup/cont_c-3405317011-20120229-09 channel ORA_DISK_1: control file restore from AUTOBACKUP complete output file name=/ctrl/trgt/control01.ctl output file name=/ctrl/trgt/control02.ctl Finished restore at 29-FEB-12 14:02:39 RMAN> alter database mount; database mounted released channel: ORA_DISK_1 RMAN> recover database; Starting recover at 29-FEB-12 14:02:55 Starting implicit crosscheck backup at 29-FEB-12 14:02:55 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=20 device type=DISK Crosschecked 96 objects Finished implicit crosscheck backup at 29-FEB-12 14:02:57 Starting implicit crosscheck copy at 29-FEB-12 14:02:57 using channel ORA_DISK_1 Finished implicit crosscheck copy at 29-FEB-12 14:02:57 searching for all files in the recovery area cataloging files... no files cataloged using channel ORA_DISK_1 starting media recovery archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10 archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10 archived log file name=/redo_archive/trgt/archive/1_11_776523284.dbf thread=1 sequence=11 archived log file name=/redo_archive/trgt/archive/1_12_776523284.dbf thread=1 sequence=12 archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 02/29/2012 14:02:59 ORA-01422: exact fetch returns more than requested number of rows RMAN-20505: create datafile during recovery RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/redo_archive/trgt/online/redo01.log' ORA-00283: recovery session canceled due to errors ORA-01244: unnamed datafile(s) added to control file by media recovery ORA-01110: data file 9: '/data3/trgt/CNT_TST03.dbf' RMAN> -- wnet to session 2 and renamed datafile from unammed
After before was done, went back to session 1 and I tried recovered the DBSQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /data/trgt/system01.dbf /data/trgt/sysaux01.dbf /data/trgt/undotbs01.dbf /data3/trgt/move/users01.dbf /data3/trgt/user02.dbf /data3/trgt/users03.dbf /data3/trgt/cnt_tst01.dbf /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008 /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009 9 rows selected. SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008' as '/data3/trgt/CNT_TST02.dbf'; Database altered. SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009' as '/data3/trgt/CNT_TST03.dbf'; Database altered. SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /data/trgt/system01.dbf /data/trgt/sysaux01.dbf /data/trgt/undotbs01.dbf /data3/trgt/move/users01.dbf /data3/trgt/user02.dbf /data3/trgt/users03.dbf /data3/trgt/cnt_tst01.dbf /data3/trgt/CNT_TST02.dbf /data3/trgt/CNT_TST03.dbf 9 rows selected.
RMAN> recover database; Starting recover at 29-FEB-12 14:06:16 using channel ORA_DISK_1 starting media recovery archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13 archived log file name=/redo_archive/trgt/online/redo02.log thread=1 sequence=14 archived log file name=/redo_archive/trgt/online/redo03.log thread=1 sequence=15 media recovery complete, elapsed time: 00:00:00 Finished recover at 29-FEB-12 14:06:17 RMAN> alter database open resetlogs; database opened new incarnation of database registered in recovery catalog starting full resync of recovery catalog full resync complete starting full resync of recovery catalog full resync complete RMAN> exit Recovery Manager complete. [oracle@berry trgt]$ [oracle@berry trgt]$ [oracle@berry trgt]$ sq SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 29 14:07:18 2012 Copyright (c) 1982, 2009, 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> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss: 2 SQL> SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss"; Session altered. SQL> select count(*) from test.t2; select count(*) from test.t2 * ERROR at line 1: ORA-00376: file 8 cannot be read at this time ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf' SQL> select max(c1) from test.t2; select max(c1) from test.t2 * ERROR at line 1: ORA-00376: file 8 cannot be read at this time ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf' SQL> alter database datafile 8 online; alter database datafile 8 online * ERROR at line 1: ORA-01190: control file or data file 8 is from before the last RESETLOGS ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf' {code} so what did i do wrong in my recovery that i could not get my data?? how can i avoid this?? and restore my DB? Edited by: user8363520 on Feb 29, 2012 12:24 PM
user8363520 wrote:
so can get us this or can't do?You seem to have:
(a) old version of data through rman backup files
(b) old version of the control file
(c) Backed archived redo logs
(d) recovery archived logs that have been recently generated
(e) current online redo logsTherefore, you should be able to bring back the database in the State wherever it was when you made the abandonment.
I don't do enough laps to be able to cite details on the commands to use (and I often find myself using the command line recovery after that file of rman restore, but the steps you need must be)Take a copy of security of the data current, archived and online redo log files.
Restore the backup control file, data files, and archived recovery logs
Recover the database by using up to cancel backup control file
You have to do 'create datafile' bit as the collection hits the 'missing file' bit
You will need to provide the names of the archived and log files online redo recovery reached their
(although, presumably, you could leave copies of the logs stored in the default location)Concerning
Jonathan Lewis
http://jonathanlewis.WordPress.com
Author: core Oracle -
Recovery of control files lost.
Hello
I run my database in noarchivelog mode. This is a database of test of pure on my laptop at home.
Scenario of
1 copy the existing control to another location on my PC.
2. open the database and made some changes to the database (create tables).
3. deletion of the existing control files.
4 database could not be mounted.
5. restore control of the location of backup files.
6. the database is mounted under the mat.
7. recovered using backup controlfile but could not recover.
8 save the control to trace file
9 a created control file by changing the trace file
10. fixed using the database backup, applied to newspapers and recovered control file.
My question is why could not recover the database in the first case of a copy of OS control files, but could recover when I manually created control file.
Thank you
Hello
1. as indicated, you are in noarchive logmode (kind only OLR is used for recovery)
2. now, you closed the database mode compatible and prior (in the db is running), you have taken a backup.
3. the backup controlfile doesn' the changes you have made
4. now, when you start the instance and the restoration of the controlfile back, there he changes (blurred) didn't know where in the end. The CNS is lower compared to datafile_header
5. now you have activated 4 times files newspapers is getting crushed and change is lost at the level of the RSC and it's already emptied to the data files and controlfile (YVERT updated)
6. then, do you think you are looking for old OLR changing
Specify log: {
=suggested | filename | AUTO | CANCEL} /u01/app/oracle/oradata/testdb/redo02.log ORA-00326: log begins at change 939321, need earlier change 918423--- here the log is looking for earlier one ORA-00334: archived log: '/u01/app/oracle/oradata/testdb/redo02.log' So he could not be able to open.
7. When you created new controlfile, he succeeded, since your last stop was in line. so the controlfile read all the headers of data file all in harmony, let me open it.
Cause is switching to log files
-Thank you
Pavan Kumar N
-
Hi all
My db instance running with control 3-files if my 2 controlfiles are lost due to disk failures... is - this run of the instance or an abortion?
I have my doubts regarding... If we put 3 controlfile in INIT.ora... like CONTROL_FILES ='/... Control1.ctl ',' /... Control2.ctl ',' /... Control3.CTL'.
I think oracle server process written information updated at the same time 3 controlfiles right?... If she writes... While the loss of 2 controlfiles why not abort instance occur?
Please let me knowuser603328 wrote:
Hi all
My db instance running with control 3-files if my 2 controlfiles are lost due to disk failures... is - this run of the instance or an abortion?
I have my doubts regarding... If we put 3 controlfile in INIT.ora... like CONTROL_FILES ='/... Control1.ctl ',' /... Control2.ctl ',' /... Control3.CTL'.
I think oracle server process written information updated at the same time 3 controlfiles right?... If she writes... While the loss of 2 controlfiles why not abort instance occur?
Please let me knowIf you're on a * nix environment, it files are kept open by the oracle process even if they are deleted. This may be a reason that you may not have seen the instance be abandoned immediately. Once you close the database and could therefore stop the process, next start would happen not because of control files is not available. So have you tested this on windows or linux?
HTH
Aman... -
Incompatible control file and the data after the backup files
The company that I work has servers where some components are new more, so have a backup in the event of hardware failure. If we intend to do some clones of 1:1 of the current servers to change them in case of emergency. As most of the necessary data is not volatile and we reset stuff in any case, there is no need of replicaton, replace an old version of the database works very well. Now we could not easily get substitutes for our old material, so we had to set up new machines. And that's where my trouble starts, because now I had to actually set up the system and the database rather than do a simple copy of byte to byte. I'm mainly a programmer, using Oracle of 'other' side, but as our DBA is yet to come and the work must be done now...
So I did some reasearch and decided to do a normal backup of the cold. I have dumped the controlfile, copied data and configuration files to the new server and read the prompt SQL (no mistake there) control file. After some initial hiccups with the system (memory, etc.), I was finally about to start the database, only to get an error ORA-01190 ("1 database or control file is from before the last RESETLOGS").
I guess I did is a bad thing when you restart the database (used the wrong part of the control file) or when the copy of the data. The original data have split two readers for simplicity and logical, I copied their entire contents. So maybe I don't not copied to little but too?
As I said in the introductory paragraph, I'm not a DBA, but I'm willing to learn and listen. I don't expect a complete solution, but some guidelines when to look and what to avoid. Any help on this would be appreciated.Currently, there are some points need clarification,
1. you don't need to re-create the control file, if you have a clean shutdown database and copied all the files at the same time (data files, control files etc.)
2. If you stop DB, copied files of data but do not copy the control at shutdown file, you must re-create the control file.
3. the error ORA-19909 suggested you resetlog prior to recovery.
ORA-19909: string data file belongs to an orphan incarnation
Cause: The data file specified has been restored from a backup that was taken during a period of time that has already been abandoned by a resetlogs operation or Oracle cannot identify what incarnation of database file belongs. The alert log contains more information.
Action: Restore a backup of this file that belongs to the current or a previous incarnation of the database. If you use RMAN to restore, RMAN automatically selects a good backup.4. it would be better that again follow you from scratch the article.
for example,.
Copy the files you did copy over the data base to the bottom of the old server,
modify the control file creation scriptRECOVER DATABASE USING BACKUP CONTROLFILE;
ALTER DATABASE OPEN RESETLOGS; -
ORA-01207: file is newer than the control file - old control file
Hello
Please indicate why I am facing this problem:
SQL> startup ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2233344 bytes Variable Size 641731584 bytes Database Buffers 419430400 bytes Redo Buffers 5541888 bytes Database mounted. ORA-01122: database file 1 failed verification check ORA-01110: data file 1: '/var/oracle/oradata/system.dbf' ORA-01207: file is more recent than control file - old control file
I use Oracel XE 11g on CentOS
Thank you in anticipation
You have restored the old control file while your data files are recent. Restore the last control file and then recover your database to open it.
-
Hi all
9i
RHEL5
I have configured for the main database and emergency dataguard.
I want to create 3 database on another server in restore RMAN backup taken of database primary 2 weeks ago.
I then want to apply any archivelogs succeeding to make it current.
My question is, can I get the file of current mode control ensures to restore my db from backup primary RMAN?
Current control for the primary and standby files the same? Just in case, I'm switching to the db backup?
Thank you very much
JC
Yes, because the control files are interchangeable between the databases and relief.
http://docs.Oracle.com/CD/B28359_01/server.111/b28294/RMAN.htm#BAJDCCGD
-
Hello
I try to simulate recovery scenarios. My Oracle database 11g is configured with two control files. I stopped the database and a corrupt control files by editing with random characters using a hex editor. When I started the database, everything is going like nothing happened. No warning, no errors, in Enterprise Manager the State control of the file is VALID. I opened the control file, but it is still published (so it has not been automatically replaced by the good, which is not a good thing anyway).
Why is this happening? The system is unable to warn me if one of the control files is corrupt?
Thank you
Adrian
Published by: Adrian P on December 7, 2010 10:10Maybe you just edited a part that Oracle doesn't care much in normal conditions of use? Check the v$ archived_log, maybe you'll see your changes?
-
restore database backup cold no redo file
Hi all
I use oracle 10 g 2 Sun 10. I have a cold backup (control files and data files), any redo files.
I will restore the database from this backup? control to recreate... file is possible.
Thanks in advanceSee below the example;
C:\Documents and Settings\Administrator>dir D:\oracle\product\10.2.0\oradata\TES T Volume in drive D has no label. Volume Serial Number is 04E5-FDAC Directory of D:\oracle\product\10.2.0\oradata\TEST 07/30/2010 07:03 PM
. 07/30/2010 07:03 PM .. 07/30/2010 07:02 PM 7,389,184 CONTROL01.CTL 07/30/2010 07:02 PM 7,389,184 CONTROL02.CTL 07/30/2010 07:02 PM 7,389,184 CONTROL03.CTL 07/30/2010 07:02 PM 104,865,792 EXAMPLE01.DBF 07/30/2010 07:02 PM 272,637,952 SYSAUX01.DBF 07/30/2010 07:02 PM 513,810,432 SYSTEM01.DBF 07/07/2010 10:01 PM 20,979,712 TEMP01.DBF 07/13/2010 08:50 PM 52,436,992 TEMP1.DBF 07/30/2010 07:02 PM 31,465,472 UNDOTBS01.DBF 07/30/2010 07:02 PM 10,493,952 USER02.DBF 07/30/2010 07:02 PM 5,251,072 USERS01.DBF 11 File(s) 1,034,108,928 bytes 2 Dir(s) 24,985,423,872 bytes free C:\Documents and Settings\Administrator>sqlplus "/as sysdba" SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 30 19:04:18 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL> startup nomount; ORACLE instance started. Total System Global Area 125829120 bytes Fixed Size 1247660 bytes Variable Size 71304788 bytes Database Buffers 50331648 bytes Redo Buffers 2945024 bytes SQL> CREATE CONTROLFILE REUSE DATABASE "TEST" RESETLOGS NOARCHIVELOG 2 MAXLOGFILES 16 3 MAXLOGMEMBERS 3 4 MAXDATAFILES 100 5 MAXINSTANCES 8 6 MAXLOGHISTORY 292 7 LOGFILE 8 GROUP 1 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\REDO_01.LOG' SIZE 50M, 9 GROUP 2 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\REDO_02.LOG' SIZE 50M, 10 GROUP 3 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\REDO_03.LOG' SIZE 50M 11 DATAFILE 12 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSTEM01.DBF', 13 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\UNDOTBS01.DBF', 14 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSAUX01.DBF', 15 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\USERS01.DBF', 16 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\EXAMPLE01.DBF', 17 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\USER02.DBF' 18 CHARACTER SET WE8MSWIN1252; Control file created. SQL> alter database open resetlogs; Database altered. SQL> -
Hi all.
I really need your help on this:
(1) version: 11.2.0.1 EE / Windows.
(2) database does not start, don't get database.
Alert.log info:
Instance of stopped by USER, pid = 3652
2015-11-22 15:57:19.763000 - 04:30
I found this after using adrci:
2015-11-22 15:49:15.727
SESSION ID: (191.1) 2015-11-22 15:49:15.727
CUSTOMER ID :() 2015-11-22 15:49:15.727
NAME OF THE SERVICE :() 2015-11-22 15:49:15.727
MODULE NAME: (sqlplus.exe) 2015-11-22 15:49:15.727
ACTION NAME :() 2015-11-22 15:49:15.727
Informational message:
Control file 1 has seq 2713995, low 2713994 file # 0
Error: kccpb_sanity_check_2
Control file sequence number mismatch!
fhcsq: bhcsq 2713995: 2714016 cfn 0
2015-11-22 15:49:15.758
USER (ospid: 2504): put an end to the instance
Verification of MOS Note: 435436.1 I must:
(1) to restore a backup of a controlfile and recover
OR
(2) to recreate the controlfile
OR
(3) restore the backup data and recovery
It is a database, that I was not, up to now administer. But:
(1) I tried from the database with addressed controlfile (the one located in FRA). No luck. (Create pfile from spfile / startup pfile)
(2) the database is not mount / open. It hangs on the editing process. So I can not issue an alter database controlfile to trace.
It seems that my options are:
(1) manual creation of controlfile with open resetlogs option. This option is viable, but risky if we miss a datafile or something GOLD
(2) restoration of RMAN backup. The thing is that the most recent copy of automatic backup of controlfile is since a few days early (4 / 5 days).
I found this link: http://gavinsoorma.com/2009/07/rman-recovery-from-loss-of-all-control-files/
The procedure seems easy, but since this controlfile is not in the current SNA of database (data files, etc.). I'm not sure it if it would work.
So in short, I think I have an automatic backup controlfile and it's OK. but a little old. I can restore from this copy of CF?
Please I'm pressed real here, so help will be greatly appreciated!....
Thanks in advance!
Best regards, Luis...!
Hello
It seems that my options are:
(1) manual creation of controlfile with open resetlogs option. This option is viable, but risky if we miss a datafile or something GOLD
(2) restoration of RMAN backup. The thing is that the most recent copy of automatic backup of controlfile is since a few days early (4 / 5 days).
It seems that you have few options,
In my opinion, you should start with option 2), but you have logs archived redo and all and all the backups of catalog and perform a restore.
After, if not works, you must manually create the control files, but you are right, you must carefully on all the data files. Here a log generated in the last level 0 RMAN backup could help you, don't forget the newspaper are all entries of data for backup files.
I wish to have more ideas to help you, but I have no other.
I hope this helps.
Kind regards
Juan M
-
ORA-01194: file 1 needs a recovery more match
Hello
I tested on Linux Redhat 5.4 RMAN / Oracle 11.2.0.2 and had the following problems:
My configuration:
>
RMAN > show all.
Database with db_unique_name TESTDB RMAN configuration parameters are:
CONFIGURE REDUNDANCY 1 RETENTION STRATEGY; # by default
CONFIGURE BACKUP OPTIMIZATION
SET UP DEFAULT DISK DEVICE TYPE; # by default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT for DEVICE TYPE DISK TO ' / opt/BACKUP/11.2.0.2/RMAN/TESTDB/CONTROLFILES/%F';
SET UP THE DEVICE TYPE DISK PARALLELISM 1 BACKUP BACKUPSET TYPE; # by default
CONFIGURE BACKUP OF DATA TO DISK FILE TYPE DEVICE TO 1; # by default
CONFIGURE BACKUP ARCHIVELOG FOR DEVICE TYPE DISK TO 1; # by default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT ' / opt/BACKUP/11.2.0.2/RMAN/TESTDB/DATA/%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # by default
CONFIGURE ENCRYPTION OF DATABASE # by default
CONFIGURE THE ENCRYPTION ALGORITHM "AES128"; # by default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AND 'DEFAULT' LIBERATION OPTIMIZE FOR TRUE LOAD; # by default
CONFIGURE THE NONE ARCHIVELOG DELETION POLICY; # by default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ' / opt/BACKUP/11.2.0.2/RMAN/TESTDB/CONTROLFILES/snapcf_TESTDB.f';
>
My 2 backups:
>
RMAN > list backup;
List of backup sets
===================
Time of accomplishment BS key Type LV size device Type elapsed time
------- ---- -- ---------- ----------- ------------ ---------------
* Incr 43 0 M DISK 00:14:17 971,77 2 March 11 *.
BP key: 44 status: AVAILABLE Tablet: NO Tag: TAG20110302T062419
Part name: /opt/BACKUP/11.2.0.2/RMAN/TESTDB/DATA/01m66ikk_1_1
List of defined backup data files 43
Name of file LV Type cash SNA cash time
---- -- ---- ---------- --------- ----
* 1 0 incr 1001503 /CDATA/TESTDB/system01.dbf* March 2, 11
* 2 0 1001503 /CDATA/TESTDB/sysaux01.dbf* incr 2 March 11
* 3 0 incr 1001503 /CDATA/TESTDB/undotbs01.dbf* March 2, 11
* 4 0 incr 1001503 /CDATA/TESTDB/users01.dbf* March 2, 11
Time of accomplishment BS key Type LV size device Type elapsed time
------- ---- -- ---------- ----------- ------------ ---------------
* 53 full 9.36 M DISK 00:00:11 March 2, 11 *.
BP key: 58 situation: AVAILABLE Tablet: NO Tag: TAG20110302T063849
Part name: /opt/BACKUP/11.2.0.2/RMAN/TESTDB/CONTROLFILES/c-2528028017-20110302-00
SPFILE included: Modification Date: March 2, 11
SPFILE db_unique_name: TESTDB
Control file included: cash SNA: 1002272 cash time: March 2, 11
Time of accomplishment BS key Type LV size device Type elapsed time
------- ---- -- ---------- ----------- ------------ ---------------
Incr 78 0 M DISK 00:13:38 970,24 March 2, 11
BP key: 81 situation: AVAILABLE Tablet: NO Tag: TAG20110302T064449
Part name: /opt/BACKUP/11.2.0.2/RMAN/TESTDB/DATA/03m66jr1_1_1
List of defined backup data files 78
Name of file LV Type cash SNA cash time
---- -- ---- ---------- --------- ----
1 0 incr 1002771 /CDATA/TESTDB/system01.dbf March 2, 11
2 0 1002771 /CDATA/TESTDB/sysaux01.dbf incr 2 March 11
3 0 incr 1002771 /CDATA/TESTDB/undotbs01.dbf March 2, 11
4 0 incr 1002771 /CDATA/TESTDB/users01.dbf March 2, 11
Time of accomplishment BS key Type LV size device Type elapsed time
------- ---- -- ---------- ----------- ------------ ---------------
93 full 9.36 M DISK 00:00:10 March 2, 11
BP key: 98 situation: AVAILABLE Tablet: NO Tag: TAG20110302T065836
Part name: /opt/BACKUP/11.2.0.2/RMAN/TESTDB/CONTROLFILES/c-2528028017-20110302-01
SPFILE included: Modification Date: March 2, 11
SPFILE db_unique_name: TESTDB
Control file included: cash SNA: 1003421 cash time: March 2, 11
RMAN >
>
I want to rebuild the database from the first backup and I always get the error:
>
RMAN > RUN
2 > {}
3 > # STARTUP NOMOUNT;
4 > # RESTORE SPFILE to ' / u01/app/oracle/product/11.2.0.2/db_1/dbs/spfileTESTDB.ora' tag "TAG20110302T063849".
5 > # SHUTDOWN IMMEDIATE;
6 > # STARTUP NOMOUNT;
7 > # RESTORE CONTROLFILE tag "TAG20110302T063849".
8 > # STARTUP MOUNT;
* 9 > SET up to this THAT SNA 1002272. *
10 > RESTORE database;
11 > RECOVER DATABASE;
12 > ALTER DATABASE OPEN RESETLOGS;
{13 >}
executing command: SET until clause
From restoration to March 2, 11
using channel ORA_DISK_1
channel ORA_DISK_1: from the restore backup set data file
channel ORA_DISK_1: specifying datafile (s) to restore from backup set
channel ORA_DISK_1: restore datafile 00001 to /CDATA/TESTDB/system01.dbf
channel ORA_DISK_1: restore datafile 00002 to /CDATA/TESTDB/sysaux01.dbf
channel ORA_DISK_1: restore datafile 00003 to /CDATA/TESTDB/undotbs01.dbf
channel ORA_DISK_1: restore datafile 00004 in /CDATA/TESTDB/users01.dbf
channel ORA_DISK_1: backup /opt/BACKUP/11.2.0.2/RMAN/TESTDB/DATA/01m66ikk_1_1 piece reading
channel ORA_DISK_1: room handle=/opt/BACKUP/11.2.0.2/RMAN/TESTDB/DATA/01m66ikk_1_1 tag = TAG20110302T062419
channel ORA_DISK_1: restored the backup part 1
channel ORA_DISK_1: restore complete, duration: 00:20:06
Finished restore at March 2, 11
From back to March 2, 11
using channel ORA_DISK_1
starting media recovery
Cannot find the archived log
Archives journal thread = 1 = 3 sequence
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03002: failure of the command recover at 02/03/2011 08:06:37
RMAN-06054: unknown request media recovery log archived for thread 1 with sequence 3 and from the 1001503 SNA
RMAN > * end-of-file *.
RMAN > ALTER DATABASE OPEN RESETLOGS;
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 02/03/2011 08:14:59
ORA-01194: file 1 needs a recovery more match
ORA-01110: data file 1: ' / CDATA/TESTDB/system01.dbf'
>
I don't know since 2 days where it's a mistake? Help, please.
Help, please!
hqt200475
concerningHello
Please also visit:
DATAFILE NEEDS MORE RECOVERY TO BE CONSISTENT [ID 417710.1]
Respect of
HELIOS -
2000 laptop 365DX: need to restore but have a restore partition point or recovery.
Hi guys. I have a laptop HP 2000-365DX with Windows 7 Home Premium. Its so crowded and I need to restore back to original settings. I had installed Ubuntu (partitioned) all the time and has been very stupid, because I deleted my partition recovery HP tools. Now, I searched here on HP.com to order a recovery disc and apparently I can't find one for my specific model. So what I have done is downloaded a file .iso Windows 7 Home Premium (with a good soul on these forums) and I need to download all the drivers for my laptop as well but HP is having some problems now so I can't download them (which is fine that I'm in no hurry). So, that's all as far as my knowledge goes. I have my Win7 disc and hopefully soon have my drivers disk. What I do not know how, it's clear my computer to start from zero Setup Win7 again then all my drivers. I read that DBAN (Darik Boot and Nuke) erases your hard drive clean, but that seems very extreme. Looks like I would use to wipe my drive hard if I had to sell my laptop or to erase the evidence, but if that's my solution I'm cool with that. So, really, I'm wandering what I should do now. And I really re - install my drivers as well? Any help would be greatly appreciated!
Hello
You can delete all existing partitions on the HARD disk during installation, as follows.
Start the installation.
When you get to the screen 'What type on installation', choose the custom (Advanced) option, and then click drive options (Advanced).
Here you can delete all existing partitions at a time by clicking on the partition to highlight it and then click Remove.
A when you're finished, you'll have just one entry named not 'allocated space' - just proceed with the installation.
Kind regards
DP - K
-
Restore the control file considerations
Hello expert,
Assumpition condition is:
All the data files and the redologs are not damaged, but the controlfiles are damaged. We must restore the controlfile autobackup with the following command:
RMAN > STARTUP NOMOUNT;
RMAN > backup RESTORE CONTROLFILE AUTOMATIC;
RMAN > ALTER DATABASE MOUNT;
RMAN > RECOVER DATABASE;
RMAN > ALTER DATABASE OPEN RESETLOGS;
Use of rman RECOVER, DATABASE redo logs to roll changes forward to control files. Can you explain what changes can be included? (Currently I only have one example: we add the new data file once the backup control file.) So we need roll forward the changes to control the file on the new added one.) Other examples?
Thank you and best regards,
Tong Ning
Examine the contents of the controlfile. He has the list of data files, the list of the archivelog files and list of rman backups.
Archivelogs would be saved in the controlfile so that they can be applied.
What about backups? Subsequent backups would certainly no longer be in the controlfile.
Hemant K Collette
-
Restored control file has old data file path?
DB version: 11.2.0.2
On a new machine, we have successfully restored under the data files to the desired location.
After the restoration when I questioned v$ datafile it still shows data from the source server file path because the restored control file still has the old path to this topic.run { set newname for datafile 1 to '/data/oradata/clspdb/clspdb_system01.dbf' ; set newname for datafile 2 to '/data/oradata/clspdb/clspdb_sysaux01.dbf' ; set newname for datafile 3 to '/data/oradata/clspdb/clspdb_undotbs01.dbf' ; . . . . restore database; }
Now I have to issue ALTER DATABASE DATAFILE to RENAME... Since the SQL prompt before I run the RECOVER command. Right?Now I have to issue ALTER DATABASE DATAFILE to RENAME... Since the SQL prompt before I run the RECOVER command. Right?
No need. Include
SWITCH DATAFILE ALL
in the execution block just after the RESTORE command. That is to say. It must precede the RECOVER command. This should update the control file with the new paths
It should look like
run { set newname for datafile 1 to '/data/oradata/clspdb/clspdb_system01.dbf' ; set newname for datafile 2 to '/data/oradata/clspdb/clspdb_sysaux01.dbf' ; set newname for datafile 3 to '/data/oradata/clspdb/clspdb_undotbs01.dbf' ; . . . . restore database; switch datafile all; recover database; }
-
Test system update fails on ORA-01113: file 1 needs media recovery
I use Oracle 9.2.0.6 on HP - UX (B.11.11)
I'm refreshing to a test of production on the same server system.
The update fails on...
ALTER DATABASE OPEN RESETLOGS;
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: ' / elltest/system/system_01.dbf'
I do mainly:
-Place prod tablespaces in backup mode
-Copy the files from production to test directories
-Take prod tablespaces out of backup mode
-pass the prod (once for each newspaper group) log files
-copy files from archive prod to test
STARTUP NOMOUNT
Create control file from a copy of the prod trace file
(CREATE CONTROLFILE REUSE SET DATABASE 'ELLTEST' RESETLOGS ARCHIVELOG)
It works
RECOVER DATABASE USING BACKUP CONTROLFILE
-J' I grab the last log archive copied during production.
ALTER DATABASE OPEN RESETLOGS;
ERROR on line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: ' / elltest/system/system_01.dbf'
I think I have I have all required log archiving prod?
Any advice?What you're trying to do is an incomplete recovery of the database. Since the redo logs are not used in your recovery you must explicitly specify the time to stop. If you do not process assumes a complete recovery and will require a request for reinstatement of online recovery log data that you do not.
You can use UNDO based recovery with
RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROL FILE;
then type CANCEL after the last active log has been applied.
Open with option RESETLOG database. It should work.
Maybe you are looking for
-
When I right click on the RECENT ITEMS tab on the right on the display of the menu pane START, the option CLEAR the RECENT ITEMS LIST does not appear. How can I restore it? original title: restoration CLEARLY the RECENT POSTS
-
I just bought and installed a HP Office Jet 6700 Premium all-in-one CV087A. Everything seems to work fine, but there is no widget for the printer on the dashboard. I have an Apple Mac Book Pro running OS 10.6.8 (Snow Leopard). I have several other
-
failure of configuration for the service mobile ePrint
I have a new HP Photosmart 7515; I tried to connect to ePrintCenter.com with my email address and password and it failed, saying that my password is not valid. I clicked on forgot password link, but I don't receive an email with instructions to rese
-
Parameters of Holster for blackBerry Smartphones
I have a BB case. When I receive a new message and leave BB as soon as I get the message, he opens it. If I wait a few minutes, I can open the messages manually. I wonder if there is a setting replace automatically opening messages. I want to open my
-
A hacker? changed my email msn in Arabic. How can I change it back to English?
A hacker? spam sent to my contacts. He or someone has left my email msn in Arabic. I can only understand English. Thank you, Kentucky.