Rman loss of control file
hi,
i am beginner...
plz i want 2 practice rman
plz guide me for the scenario of loss of controlfile
i.e what could be pre-configuration of rman, how to take backup/restore of controlfile?
RMAN configuration parameters for database with db_unique_name ARCHDATA are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/archivedata/ARCHDATA/rman/bp_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/oracle/product/11.2.0/d_1/dbs/snapcf_archdata.f'; # default
Similar Messages
-
Hi
My database is running on solaris 10. database verrison is 10.2.0.3.0
when connecting ot db after databases get started. it throws error
ORA-00205: error in identifying control file, check alert log for more info
and when I checked in alert log file
Thu Dec 25 18:39:04 2008
Errors in file /testdb/..n/../admin/../udump/mft_ora_7988.trc:
ORA-19502: write error on file "/oradb/../../arch/arch1_2162_623164752_MFT.log", blockno 30721 (blocksize=512)
ORA-27063: number of bytes read/written is incorrect
after browsing google I infer that we lost control file.
I dont have it backup
how do i recover it
Thanks in advance.Do you have backup control file or auto backup control file by rman or not.
If you have backup, try recover controlfile from rman backup( you should know DBID).
Anyway If you don't have rman backup. so recreate controlfile (if you have backup control file to trace, you can use it):
1. Take a full backup of the database, including all datafiles and redo
log files.
2. Connect / as sysdba or as sys user and do a STARTUP NOMOUNT.
3. Issue the CREATE CONTROLFILE statement.
More information on Oracle.
http://www.oracle.com/pls/db102/homepage
Example:
CREATE CONTROLFILE REUSE DATABASE "TESTDB" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 50
MAXLOGMEMBERS 3
MAXDATAFILES 300
MAXINSTANCES 8
MAXLOGHISTORY 500
LOGFILE
GROUP 1 '/oradata/testdb/log1.dbf' SIZE 100M,
GROUP 2 '/oradata/testdb/log2.dbf' SIZE 100M,
GROUP 3 '/oradata/testdb/log3.dbf' SIZE 100M
DATAFILE
'/oradata/testdb/system01.dbf' SIZE 400M,
'/oradata/testdb/sysaux01.dbf' SIZE 500M,
'/oradata/testdb/undotbs01.dbf' SIZE 100M ;
4. Perform media recovery on the database.
RECOVER DATABASE
5. Open the database.
ALTER DATABASE OPEN;
Good Luck. -
No RMAN records in control file
Hi,
We're running 10.2.0.4 Database on AIX with no catalog Database.
We keep all the backup info in controlfiles only.
When we do that backup, we're able to successfully back it up (including archivelogs). But I'm unable to find any records in the controlfiles.
SQL> select * from V$BACKUP_SET;
no rows selected
and
SQL> sho parameter control
NAME TYPE VALUE
control_file_record_keep_time integer 14
Could you advice where my backup info i going?
Thanks
CSMMy backups are safe, I'm connected to the same Database as that's the only one exist in that machine...
I'm seeing list of control files and archivelogs when i give 'list copy;' but not the datafiles.
The only thing I'm doing is, I'm backing up the Database using a 3rd party tool which uses RMAN in turn...
If we assume that tool is doing some mess, it's not happening on all the Databases backed up by that tool... and I'm sure that tool is not doing anything except just using RMAN code snippets.
CSM -
Hi,
We backup our database every using the below rman commmands.
run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
backup incremental level=0
format '/backupdisk/rmanbkps/thu/%d_%t_%s_%p' tag='fullprodbk'
filesperset 8
(database include current controlfile);
sql 'alter system archive log current';
sql 'alter system archive log current';
backup format '/backupdisk/rmanbkps/thu/%d_%t_%s_%p'
archivelog from time 'sysdate-1';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
This mentions to include the current control file. The pieces are created successfully, but nowhere can i see a file in the format
C-IIIIIIIIIIII-YYYYMMDD-QQ
WHERE :-
C-control file
IIIIIIIIII- represents the database identifier.The dbid is printed in decimal format,so that it can be easily associated with the database
where is the control file stored then?? Pls advise.
Thanks in advance.where is the control file stored then?? Pls advise.At rman prompt
RMAN> list backup of controlfile
2> ;
using target database controlfile instead of recovery catalog
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1 Full 1M DISK 00:03:34 30-OCT-07
BP Key: 1 Status: AVAILABLE Tag: TAG20071030T104736
Piece Name: C:\ORACLE\ORA92\DATABASE\02IVPJU8_1_1
Controlfile Included: Ckp SCN: 130119034 Ckp time: 30-OCT-07Khurram -
hi,
RMAN>backup database
on executing the above command does rman backsup the control file also????
Edited by: 793097 on Dec 7, 2010 12:49 AMHi 793097,
Yes it does backup the controlfile implicitly by the command.
There are two flavors.
- If you have configured controlfile autobackup to on (use show all to check) rman will create a separate backup in a file with format c-dbid-date-xx.
- without configuration the backup piece containing datafile 1 (system01.dbf) will also contain the controlfile backup.
Regards,
Tycho -
Control File to a catalog Database
Hi guys,
I'm kind of new here. So sorry if this has already been answered. (did some searching and nothing showed up)
Environment - Oracle 9i
Ok. Currently we are using RMAN with a control file. And there's a requirement to set up a catalog database. I would like to know if there's a way to migrate the current set up to a catalog database. Final goal is to make sure that the past backups will be available after moving to a catalog database.
thanks!
regds,
DamControlfile backup taken during a backup means you will have past information relevant to current state as of the time of the backup. Going forward with a catalog means you will have a longer (as in closer to forever) record of backups whereas a CF only keeps what it can up to the record keep time. You can always catalog prior backups if you want.
-
Hi Everyone,
I just restored my controlfile from autobackup in RMAN and after mounting the database with the restored controlfiles, I took a backup of archivelog and in the end a warning message has been displayed saying that the controlfile autobackup is possible as it is not the current. Can any one of you please explain the warning..
Thanks in advance for your help..Thanks for the reply sir...Here are the details..
ORACLE VERSION -10G release 2 on windows vista home basic.
I have set the controlfile autobackup on in rman configuration
and performed some structural changes to the database, like added some tablespaces.
And went to rman to check the controlfile autobackup available by using list backup by file;
and after that i shutdown the database clean shutdown immediate.
and open rman restored spfile from autobackup
and restored controlfile from autobackup and mounted database.
and after that I issued an archivelog backup from time 'sysdate-2' until time 'sysdate'
and got he following warning which tells
Starting backup at 14-FEB-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=82 recid=69 stamp=710798959
input archive log thread=1 sequence=83 recid=70 stamp=710824731
input archive log thread=1 sequence=84 recid=73 stamp=710844030
input archive log thread=1 sequence=85 recid=75 stamp=710888657
input archive log thread=1 sequence=86 recid=76 stamp=710894748
input archive log thread=1 sequence=87 recid=78 stamp=710939528
input archive log thread=1 sequence=88 recid=81 stamp=710941685
channel ORA_DISK_1: starting piece 1 at 14-FEB-10
channel ORA_DISK_1: finished piece 1 at 14-FEB-10
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\DB202\BACKUPSET\2010_02_14\O1_MF_ANNN
N_TAG20100214T153455_5QJQMLO9_.BKP tag=TAG20100214T153455 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:05:35
Finished backup at 14-FEB-10
RMAN-06497: WARNING: control file is not current, control file autobackup skipped
I am not sure about the warning received. Thanks for the help in advance. -
RMAN & Control file ...
Hi,
Is any reason to use the control file of a production database as repository for RMAN ? If the disks where the control files are located will be broken RMAN can't be used for a restore & recovery.
Thanks for your answers,
PaulAre you basically asking whether it is better to use a control file to store RMAN backup information than an RMAN catalog?
The reasons you should use an RMAN catalog are -
o take advantage of the full features of RMAN (database clone for example).
o recover to another server even if there is a total server loss of the original server and database
o not have to potentially restore the control file copies from a filesystem backup to perform a restore
As someone else pointed out the DBID is stored in the catalog and you will need this to restore from complete database loss.
If you're using a third party product (allocating channels to sbt) then I would use an RMAN catalog to store all the backup information and on which tape they are.
You need to consider if you're a case where the RMAN catalog is not required. What type of disaster are you planning for?
Also, if you use the control file be aware of the control_file_record_keep_time
Message was edited: added the point about control_file_record_keep_time -
Control file failed error while duplicating database using RMAN
I am using oracle database 10g R2 and trying to make a clone of the source database orcl on the same machine but with different directory structure with the name of test.
When i run the duplicate command to create test database, then following error is generted:
D:\>rman target sys@orcl nocatalog auxiliary /
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Nov 11 12:13:26 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
target database Password:
connected to target database: ORCL (DBID=1264668332)
using target database control file instead of recovery catalog
connected to auxiliary database: TEST (not mounted)
RMAN> @script.txt
RMAN> Run {
2> Allocate channel C1 type disk;
3> allocate auxiliary channel 'adisk_0' type DISK;
4> duplicate target database to "test";
5> #BACKUP INCREMENTAL LEVEL 1 DATABASE;
6> #BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
7> #BACKUP INCREMENTAL LEVEL 0 DATABASE;
8> #delete obsolete;
9> }
allocated channel: C1
channel C1: sid=140 devtype=DISK
allocated channel: adisk_0
channel adisk_0: sid=157 devtype=DISK
Starting Duplicate Db at 11-NOV-11
contents of Memory Script:
set until scn 12926250;
set newname for datafile 1 to
"D:\TEST\ORADATA\SYSTEM01.DBF";
set newname for datafile 2 to
"D:\TEST\ORADATA\UNDOTBS01.DBF";
set newname for datafile 3 to
"D:\TEST\ORADATA\SYSAUX01.DBF";
set newname for datafile 4 to
"D:\TEST\ORADATA\USERS01.DBF";
set newname for datafile 5 to
"D:\TEST\ORADATA\EXAMPLE01.DBF";
set newname for datafile 6 to
"D:\TEST\ORADATA\GL.DBF";
restore
check readonly
clone database
executing Memory Script
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 11-NOV-11
channel adisk_0: starting datafile backupset restore
channel adisk_0: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\TEST\ORADATA\SYSTEM01.DBF
restoring datafile 00002 to D:\TEST\ORADATA\UNDOTBS01.DBF
restoring datafile 00003 to D:\TEST\ORADATA\SYSAUX01.DBF
restoring datafile 00004 to D:\TEST\ORADATA\USERS01.DBF
restoring datafile 00005 to D:\TEST\ORADATA\EXAMPLE01.DBF
restoring datafile 00006 to D:\TEST\ORADATA\GL.DBF
channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_07\O1_MF_NNND0_TAG20111107T220822_7CJ
P
channel adisk_0: restored backup piece 1
piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_07\O1_MF_NNND0_TAG20111107T220822_7CJ44MH4_.BKP tag=TAG20111107T220
channel adisk_0: restore complete, elapsed time: 00:01:46
Finished restore at 11-NOV-11
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( 'D:\TEST\ORADATA\REDO01.LOG' ) SIZE 50 M REUSE,
GROUP 2 ( 'D:\TEST\ORADATA\REDO02.LOG' ) SIZE 50 M REUSE,
GROUP 3 ( 'D:\TEST\ORADATA\REDO03.LOG' ) SIZE 50 M REUSE
DATAFILE
'D:\TEST\ORADATA\SYSTEM01.DBF'
CHARACTER SET WE8MSWIN1252
contents of Memory Script:
switch clone datafile all;
executing Memory Script
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=766930525 filename=D:\TEST\ORADATA\UNDOTBS01.DBF
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=766930525 filename=D:\TEST\ORADATA\SYSAUX01.DBF
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=766930526 filename=D:\TEST\ORADATA\USERS01.DBF
datafile 5 switched to datafile copy
input datafile copy recid=4 stamp=766930526 filename=D:\TEST\ORADATA\EXAMPLE01.DBF
datafile 6 switched to datafile copy
input datafile copy recid=5 stamp=766930526 filename=D:\TEST\ORADATA\GL.DBF
contents of Memory Script:
set until scn 12926250;
recover
clone database
delete archivelog
executing Memory Script
executing command: SET until clause
Starting recover at 11-NOV-11
channel adisk_0: starting incremental datafile backupset restore
channel adisk_0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: D:\TEST\ORADATA\SYSTEM01.DBF
destination for restore of datafile 00002: D:\TEST\ORADATA\UNDOTBS01.DBF
destination for restore of datafile 00003: D:\TEST\ORADATA\SYSAUX01.DBF
destination for restore of datafile 00004: D:\TEST\ORADATA\USERS01.DBF
destination for restore of datafile 00005: D:\TEST\ORADATA\EXAMPLE01.DBF
destination for restore of datafile 00006: D:\TEST\ORADATA\GL.DBF
channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_09\O1_MF_NNND1_TAG20111109T223628_7CO
P
channel adisk_0: restored backup piece 1
piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_09\O1_MF_NNND1_TAG20111109T223628_7COGJZVT_.BKP tag=TAG20111109T223
channel adisk_0: restore complete, elapsed time: 00:00:07
channel adisk_0: starting incremental datafile backupset restore
channel adisk_0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: D:\TEST\ORADATA\SYSTEM01.DBF
destination for restore of datafile 00002: D:\TEST\ORADATA\UNDOTBS01.DBF
destination for restore of datafile 00003: D:\TEST\ORADATA\SYSAUX01.DBF
destination for restore of datafile 00004: D:\TEST\ORADATA\USERS01.DBF
destination for restore of datafile 00005: D:\TEST\ORADATA\EXAMPLE01.DBF
destination for restore of datafile 00006: D:\TEST\ORADATA\GL.DBF
channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_10\O1_MF_NNND1_TAG20111110T221428_7CR
P
channel adisk_0: restored backup piece 1
piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_10\O1_MF_NNND1_TAG20111110T221428_7CR1MQFO_.BKP tag=TAG20111110T221
channel adisk_0: restore complete, elapsed time: 00:00:16
starting media recovery
archive log thread 1 sequence 524 is already on disk as file D:\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2011_11_11\O1_MF_1_524_7CS
C
archive log filename=D:\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2011_11_11\O1_MF_1_524_7CSG2HVT_.ARC thread=1 sequence=524
media recovery complete, elapsed time: 00:00:14
Finished recover at 11-NOV-11
contents of Memory Script:
shutdown clone;
startup clone nomount ;
executing Memory Script
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 230686720 bytes
Fixed Size 1248236 bytes
Variable Size 67109908 bytes
Database Buffers 155189248 bytes
Redo Buffers 7139328 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( 'D:\TEST\ORADATA\REDO01.LOG' ) SIZE 50 M REUSE,
GROUP 2 ( 'D:\TEST\ORADATA\REDO02.LOG' ) SIZE 50 M REUSE,
GROUP 3 ( 'D:\TEST\ORADATA\REDO03.LOG' ) SIZE 50 M REUSE
DATAFILE
'D:\TEST\ORADATA\SYSTEM01.DBF'
CHARACTER SET WE8MSWIN1252
released channel: C1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/11/2011 12:16:21
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'TEST' does not match parameter db_name 'orcl'
RMAN> **end-of-file**
Script.txt
Run {
Allocate channel C1 type disk;
allocate auxiliary channel 'adisk_0' type DISK;
duplicate target database to "test";
}Kindly help?Moazzam wrote:
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'TEST' does not match parameter db_name 'orcl'
Kindly help?>Please check what is the value of parameter db_name in the standby database? It should be match with TEST name
Cheers -
Control File error while duplicating Database through Rman
Hi,
Oracle Ver: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
Os:Win Xp
I am trying to create a Standby through Rman....
I am using this Run Block to take backup of Primary Database.......
run {
allocate channel d1 type disk;
allocate channel d2 type disk;
setlimit channel d1 kbytes 2097150;
setlimit channel d2 kbytes 2097150;
backup incremental level 0 format 'e:\Oracle\standby\rman\df_%U' database
include current controlfile for standby;
sql "alter system archive log current";
backup
archivelog all format 'e:\Oracle\standby\rman\al_%U' delete input;
}After taking the Backup when I am trying to create the standby with Duplicate command it s giving me Error...
The Run Block I am using is ......
RMAN> run {
2> allocate auxiliary channel dup1 type disk;
3> allocate auxiliary channel dup2 type disk;
4> set newname for datafile 1 to 'E:\Oracle\standby\system01.dbf';
5> set newname for datafile 2 to 'E:\Oracle\standby\UNDOTBS01.DBF';
6> set newname for datafile 3 to 'E:\Oracle\standby\SYSAUX01.DBF';
7> set newname for datafile 4 to 'E:\Oracle\standby\USERS01.DBF';
8> duplicate target database for standby
9> dorecover;
10> }
allocated channel: dup1
channel dup1: sid=37 devtype=DISK
allocated channel: dup2
channel dup2: sid=36 devtype=DISK
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting Duplicate Db at 02-OCT-08
contents of Memory Script:
set until scn 1105194;
restore clone standby controlfile;
sql clone 'alter database mount standby database';
executing Memory Script
executing command: SET until clause
Starting restore at 02-OCT-08
channel dup1: starting datafile backupset restore
channel dup1: restoring control file
channel dup1: reading from backup piece E:\ORACLE\STANDBY\RMAN\DF_0VJS4RS7_1_1
channel dup1: restored backup piece 1
piece handle=E:\ORACLE\STANDBY\RMAN\DF_0VJS4RS7_1_1 tag=TAG20081002T124502
channel dup1: restore complete, elapsed time: 00:00:01
output filename=D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\CTL1STANDBY.ORA
Finished restore at 02-OCT-08
sql statement: alter database mount standby database
released channel: dup1
released channel: dup2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 10/02/2008 13:01:43
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 10/02/2008 13:01:43
RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
*ORA-00201: control file version 10.2.0.1.0 incompatible with ORACLE version 10.2.0.0.0*
ORA-00202: control file: 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\CTL1STANDBY.ORA'Why i am getting this Incomaptable Control File error inspite of Backing up the control File.....
Regards,
Prosenjit MukherjeeCheck the value for the parameter "COMPATIBLE" in the source and standby database instance parameter files.
"COMPATIBLE" should be the same.
See http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#i70517
"... ensure the COMPATIBLE initialization parameter is set to the same value on both the primary and standby databases"
Edited by: Hemant K Chitale on Oct 2, 2008 4:09 PM
Added link and quote from 10g doc -
Restore from OSB. RMAN-06024: no backup or copy of the control file found
I backed up controlfile for standby on production server to OSB media:
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 10.2.0.5.0 - Production on Tue Jan 25 15:15:33 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: EMGC (DBID=1838014073)
connected to recovery catalog database
RMAN>
RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
BACKUP CURRENT CONTROLFILE FOR STANDBY tag 'stb_ctl';
RELEASE CHANNEL ch1;
CONFIGURE DEVICE TYPE 'SBT_TAPE' CLEAR;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> 2> 3> 4> 5> 6>
allocated channel: ch1
channel ch1: sid=1085 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting backup at 25-JAN-11
channel ch1: starting compressed full datafile backupset
channel ch1: specifying datafile(s) in backupset
including standby control file in backupset
channel ch1: starting piece 1 at 25-JAN-11
channel ch1: finished piece 1 at 25-JAN-11
piece handle=1em30ngu_1_1 tag=STB_CTL comment=API Version 2.0,MMS Version 10.3.0.2
channel ch1: backup set complete, elapsed time: 00:00:27
Finished backup at 25-JAN-11
released channel: ch1
RMAN> list backup of controlfile;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
RMAN configuration parameters are successfully reset to default value
starting full resync of recovery catalog
full resync complete
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1479 Full 512.00K SBT_TAPE 00:00:18 25-JAN-11
BP Key: 1480 Status: AVAILABLE Compressed: YES Tag: STB_CTL
Handle: 1em30ngu_1_1 Media: mf_rman-000003
Standby Control File Included: Ckp SCN: 33567224 Ckp time: 25-JAN-11
RMAN>
On standby server I try to restore this control file but there is some trouble with restore... By the way I can delete that backup piece...
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 10.2.0.5.0 - Production on Tue Jan 25 15:34:32 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: emgc (not mounted)
connected to recovery catalog database
RMAN> set DBID=1838014073;
executing command: SET DBID
database name is "EMGC" and DBID is 1838014073
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
crosscheck backup of controlfile;
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=1em30ngu_1_1 recid=40 stamp=741367328
Crosschecked 1 objects
released channel: ch1
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1479 Full 512.00K SBT_TAPE 00:00:18 25-JAN-11
BP Key: 1480 Status: AVAILABLE Compressed: YES Tag: STB_CTL
Handle: 1em30ngu_1_1 Media: mf_rman-000003
Standby Control File Included: Ckp SCN: 33567224 Ckp time: 25-JAN-11
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
RESTORE CONTROLFILE FROM TAG 'STB_CTL';
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting restore at 25-JAN-11
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/25/2011 15:35:20
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
delete noprompt backup of controlfile;
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
1480 1479 1 1 AVAILABLE SBT_TAPE 1em30ngu_1_1
deleted backup piece
backup piece handle=1em30ngu_1_1 recid=40 stamp=741367328
Deleted 1 objects
released channel: ch1
RMAN>You cannot specify a tag for a standby control file.
read here
http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmstand.htm#1002594
Edited by: Adigozalov Gurban on Jan 25, 2011 2:14 PM -
Hello,
I have 2 disctinct servers.
oracle 10gr2 in each one with the same linux red hat 4 version.
the second server is just to TEST if the backup create with the first one, works fine.
So the install in each server is exactlly the same...
same files, same path etc.
Scenario:
1 from srv one I execute a full backup with RMAN
2 I copy the file in server 2
3 I move a datafile in order to create an error
4 I test : restore database in server 2...
I get the followin error:
RMAN-03002: failure of restore command at 02/24/2008 21:15:37
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 8 found to restore
and this command return no result:
RMAN> list backupset;
RMAN>
the file created with server 1 have been copied in the declared path into server 2...
I have execute a crosscheck backup too
RMAN> crosscheck backup;
using channel ORA_DISK_1
RMAN>
Must I copy the controle file too? in this case will I have an inconsistent error?
Thanks to help
CheersYou must have
controlfile autobackup on
(If you don't change the format it will be in $ORACLE_HOME/dbs, and the format will be c-<database id>-<yyyymmdd>_<piece>.ctl).
You must copy that file, as it has information about your most recent backup, the backup you just made.
Hth
Sybrand Bakker
Senior Oracle DBA -
Control file lost and datafile addeed restore/recovery with no data loss
Here i have tried to the following
created new table called t2 and made sure data went to a specific tablespace...
took a level 0 backup
removed the control file
added couple of datafile to above tablespace and then inserted more data
then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
SQL> @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-- wnet to session 2 and renamed datafile for unammed file
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
/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.after above was done, went back to session 1 and tried recovered the DB
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 PMuser8363520 wrote:
Here i have tried to the following
created new table called t2 and made sure data went to a specific tablespace...
took a level 0 backup
removed the control file
added couple of datafile to above tablespace and then inserted more data
then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
SQL> @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. Upto this i was clear, but now i cann't understand when you actually dropped the control file from you database(in running stat) how can you perform "alter system checkpoint" and other "alter tablespace.." command? Once controlfile is inaccessible, oracle database is not suppose to function. -
Hello All,
The disk failure caused our production data on the disk to be resotred with the backup data available and recovered through RMAN with cotrolfile , and no catalog DB is configured.
I had the restored the spfile and control file then recovered the database,
startup nomount;
RESTORE SPFILE FROM ' path ' ;
Shutdown immediate;
startup nomount
Restore controfile from autobackup;
restore database;
[AT POINT , A MESSAGE PROMPTED LIKE " failur of restored command - some targets not found" (thinking may be few archives are not found, i proceeded to incomeplete recovery of DB) ]
recover database;
Finished reocvery .
Now in the Grid control i see that 60 blocks of a particular datafile are corrupted and needs recovery. Do i need to get the data file resotred again and recover it or any simple way to recover this data file
When i perform the block recovery , it says recovery failed and when i run the data file recovery it succeeds. Please provide you inputs to recover the database as it is production BI database and pretty critical to our client.
Thanks for your valuable time in advance.
Regards,
Ran G.These is a common problem if the object are created due to NOLOGGIN option. If you check most of the object which are facing block corruption is indexes .
Use the below query to check the objects :
It will map each block from v$database_block_corruption to either a segment or if the block is free.
$ sqlplus / as sysdba
set pagesize 2000
set linesize 250
SELECT e.owner, e.segment_type, e.segment_name, e.partition_name, c.file#
, greatest(e.block_id, c.block#) corr_start_block#
, least(e.block_id+e.blocks-1, c.block#+c.blocks-1) corr_end_block#
, least(e.block_id+e.blocks-1, c.block#+c.blocks-1)
- greatest(e.block_id, c.block#) + 1 blocks_corrupted
, null description
FROM dba_extents e, v$database_block_corruption c
WHERE e.file_id = c.file#
AND e.block_id <= c.block# + c.blocks - 1
AND e.block_id + e.blocks - 1 >= c.block#
UNION
SELECT s.owner, s.segment_type, s.segment_name, s.partition_name, c.file#
, header_block corr_start_block#
, header_block corr_end_block#
, 1 blocks_corrupted
, 'Segment Header' description
FROM dba_segments s, v$database_block_corruption c
WHERE s.header_file = c.file#
AND s.header_block between c.block# and c.block# + c.blocks - 1
UNION
SELECT null owner, null segment_type, null segment_name, null partition_name, c.file#
, greatest(f.block_id, c.block#) corr_start_block#
, least(f.block_id+f.blocks-1, c.block#+c.blocks-1) corr_end_block#
, least(f.block_id+f.blocks-1, c.block#+c.blocks-1)
- greatest(f.block_id, c.block#) + 1 blocks_corrupted
, 'Free Block' description
FROM dba_free_space f, v$database_block_corruption c
WHERE f.file_id = c.file#
AND f.block_id <= c.block# + c.blocks - 1
AND f.block_id + f.blocks - 1 >= c.block#
order by file#, corr_start_block#;
Below oracle support note will help you :
ORA-1578 / ORA-26040 Corrupt blocks by NOLOGGING - Error explanation and solution (Doc ID 794505.1)
The Gains and Pains of Nologging Operations (Doc ID 290161.1)
SQL> select d.NAME as DBF_NAME, t.NAME as TS_NAME, d.UNRECOVERABLE_CHANGE# as NOLOG_CHNG#, to_char(d.UNRECOVERABLE_TIME, 'Dy DD-Mon-YYYY HH24:MI:SS') as NOLOG_TIME from V$DATAFILE d join V$TABLESPACE t on d.TS# = t.TS# order by t.NAME;
Thanks,
gssdba.wordpress.com -
RMAN-06024: no backup or copy of the control file found to restore
I am cloning a new database using a full backup from previous nightly rman backup using a standby database utilizing catalog. When I run the duplicate command, I get
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/27/2011 15:04:05
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
But the backup of controlfile does exists in the right place. What am I missing?958210 wrote:
i was trying to clone a database to a remote machine, but it is giving me the following error
'RMAN-06024: no backup or copy of the control file found to restore
ORA-19505: failed to identify file "/u01/app/oracle/product/11.2.0/dbs/c-1617115651-20120912-02"
even though i can list the backup of the control file in the source machine.
thank you
'How do I ask a question on the forums?
SQL and PL/SQL FAQ
Since we don't know what you did, so we can't know what you did wrong
Maybe you are looking for
-
The Bug about 'DB_SECONDARY_BAD' still exists in BerkeleyDB4.8!
The Bug about 'DB_SECONDARY_BAD' still exists in BerkeleyDB4.8? I'm sorry for my poor English, But I just cannot find anywhere else for help. Thanks for your patience first! I'm using BDB4.8 C++ API on Ubuntu 10.04, Linux Kernel 2.6.32-24-generic $un
-
How do I add a drop shadow to the page in Muse?
How can I apply a drop shadow to the page template in Muse? If I place a rectangle it will not change shape according to the page size. Is this a feature?
-
Library transfer - hasn't retained play counts, ratings etc.
Recently got a new laptop, and tried to transfer my iTunes library to it. I followed a guide to do it and still keep all my play counts and song ratings etc. but it hasn't worked. I've got the xml and library files still, so can anyone tell me what i
-
Boot up intermittent on PowerMac G5 Dual-Core
I have an older G5 PowerMac Dual 2.0 10.4x and just recently it will not start up. I get an apple on screen and no spinning loading icon below it then the fans start to ramp up. I end up having to do a power down with the power button. Other times th
-
I have Mac air mid 2011 But I can't make mirror screen of my Mac to TV. What to do? Pls help