Control File and SPFILE Autobackup command struck
O.S Version:
Linux Version "Red Hat Enterprise Linux Server release 6.2 (Santiago)
Linux version 2.6.32-220.13.1.el6.x86_64 ([email protected]) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Thu Mar 29 11:46:40 EDT 2012
2.6.18-308.16.1.el5 x86_64
Tape Archiver : HP Data Protector
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Problem :
In one of our environment, OEM grid 11g scheduled Level 0 backup struck at the Control File and SPFILE Autobackup.
RMAN Script:
run {
2> backup format '<%d_%s:%t:%p:%f>.df' incremental level 0 cumulative database;
3> sql 'alter system archive log current';
4> backup format '<%d_%s:%t:%p>.al' archivelog all not backed up;
5> }
RMAN Configuration
RMAN> show all;
RMAN configuration parameters for database with db_unique_name TestDB are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 45 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO 'TestDB_%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'TestDB_%F';
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=TestDB,OB2BARLIST=Siv_ORA_TESTSrvr1_TestDB_DB,OB2BARHOSTNAME=TESTSrvr1)';
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DG_TestDB_UAT_DATA_01/TestDB/TEMPFILE/snapcf_TestDB.f';
RMAN Log:
1. Backup started at 07-SEP-2013 07:09:46
Finished backup at 07-SEP-2013 07:16:38
Wherein the Control file backup started at 07-SEP-2013 07:16:38 failed at 09/07/2013 12:44:38. It kept struck for 5 Hours.
Starting backup at 07-SEP-2013 07:09:46
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=250 instance=TestDB device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Data Protector A.06.20/370
allocated channel: ORA_SBT_TAPE_2
Finished backup at 07-SEP-2013 07:16:38
Starting Control File and SPFILE Autobackup at 07-SEP-2013 07:16:38
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_SBT_TAPE_1 channel at 09/07/2013 12:44:38
ORA-19506: failed to create sequential file, name="TestDB_c-2078060264-20130907-ff", parms=""
ORA-27028: skgfqcre: sbtbackup returned error
ORA-19511: Error received from media manager layer, error text:
Vendor specific error: Cannot find requested element ERR(-2)
ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
Process ID: 2045
Session ID: 89 Serial number: 36509
RMAN> delete noprompt archivelog all backed up 1 times to sbt;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 09/07/2013 13:00:07
RMAN-06004: ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
RMAN> **end-of-file**
Why does the RMAN Backup struck at Controlfile , SPFile autobackup?
Hello;
I believe the issue is caused by your media management software. You should contact your media management vendor.
Try the same operation to disk and I bet it works.
Best Regards
mseberg
Similar Messages
-
Control file and spfile auto backup backup is failing
Hello All,
I am using Oracle RAC 11gR2 with ASM. My database is 2 nodes RAC1 and RAC2.
I am taking RMAN database backups to ASM diskgroup (FRA) and to a Network File System mounted on both RAC1 and RAC2. I have this requirement to take backup also outside ASM.
I have set: CONFIGURE CONTROL FILE AUTOBACKUP ON;
I am runing the RMAN backup job from node 2 (RAC2)
I am facing the below error when taking a backup to the Network File system;
Starting Control File and SPFILE Autobackup at 08-SEP-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_1 channel at 09/08/2012 18:20:06
ORA-00245: control file backup failed; target is likely on a local file systemHow could I solve that ?
Regards,NB wrote:
Is that general configuration ? or i can only do it for the sessions that RMAN to NFS?at rman
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'location_of_shared_storage%F'; -
I can only backup the datafiles but not the control files and SPFiles
Hello, all,
I am using the Oracle 10g on a linux server which runs redhat 9. I want to backup the whole database to the disk, but not the flash recovery area. It is /rawdata. I will show how I configure the backup part in EM. Is there anything wrong?
1. the ARCHIVELOG is on
2. under Administration, in the All Initialization Parameters, I remove the string value of “log_archive_dest_1”. After that, I go to the SPFile and remove the string value of “log_archive_dest_1”
3. configure backup settings and policies. The Disk Backup Location field is set to /rawdata. Select Image Copy for Disk Backup type. Test Disk backup is successful.
4. go to Policy page. Select “Automatically backup the control file and server parameter file (SPFile) with every backup and database structural change.) input /rawdata into the filed: Autobackup Disk Location
Select “Optimize the whole database backup by skipping unchanged files such as read-only and offline datafiles that have been backed up”
Select “Retain backups that are necessary for a recovery to any time whin the specified number of days (point-in-time recovery)
Accept the default of 31days
5. go to Schedul Backup
6. select customized from the backup Strategy drop-down menu. Select the Whole Database
7. in the Options page, select “Full backup” in the Backup Type section. Select “Online Backup” in the Backup Mode section. Select “back up all archived logs on disk” in the Advanced section.
8. in the Setting page, select “Disk”
9. in the Schedule page, accept the default job name and description. Select Immediately to execute the job immediately.
10. just submit the job.
After several minutes, the job is failed while the Prebackup and Postbackup are succeeded. The log says:
Recovery Manager: Release 10.1.0.2.0 - Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
RMAN>
connected to target database: ORCL10G (DBID=770753237)
using target database controlfile instead of recovery catalog
RMAN>
Starting backup at 11-OCT-06
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=268 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00001 name=+DATADG/orcl10g/system01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSTEM_FNO-1_68hvin50 tag=BACKUP_ORCL10G_000_101106111844 recid=108 stamp=603544772
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile fno=00003 name=+DATADG/orcl10g/sysaux01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSAUX_FNO-3_69hvin6d tag=BACKUP_ORCL10G_000_101106111844 recid=109 stamp=603544813
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=+DATADG/orcl10g/example01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-EXAMPLE_FNO-5_6ahvin7g tag=BACKUP_ORCL10G_000_101106111844 recid=110 stamp=603544829
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile fno=00002 name=+DATADG/orcl10g/undotbs01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-UNDOTBS1_FNO-2_6bhvin7v tag=BACKUP_ORCL10G_000_101106111844 recid=111 stamp=603544835
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=+DATADG/orcl10g/users01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-USERS_FNO-4_6chvin87 tag=BACKUP_ORCL10G_000_101106111844 recid=112 stamp=603544841
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 11-OCT-06
Starting Control File and SPFILE Autobackup at 11-OCT-06
piece handle=/rawdata/c-770753237-20061011-05 comment=NONE
Finished Control File and SPFILE Autobackup at 11-OCT-06
RMAN>
Starting backup at 11-OCT-06
current log archived
using channel ORA_DISK_1
archived log /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_cqhvf270 not found or out of sync with catalog
trying alternate file for archivelog thread 1, sequence 1062
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 10/11/2006 11:20:54
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_puhkv41f
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN>
Recovery Manager complete.
It seems the system tries to find a file “arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_cqhvf270” in /rawdata. I just can not understand.
What should I do? Any advice is highly appreciated!
Qianthe string value in the field of 'log_archive_dest_1" under "All Initialization parameters" is "LOCATION=+DATADG/orcl10g/". The same value was in the field under SPFile.
I reset these values and tried to backup the whole database. The same error appeared. The log says:
Recovery Manager: Release 10.1.0.2.0 - Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
RMAN>
connected to target database: ORCL10G (DBID=770753237)
using target database controlfile instead of recovery catalog
RMAN>
Starting backup at 11-OCT-06
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=245 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00001 name=+DATADG/orcl10g/system01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSTEM_FNO-1_6ghvj9rd tag=BACKUP_ORCL10G_000_101106043753 recid=114 stamp=603563922
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile fno=00003 name=+DATADG/orcl10g/sysaux01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSAUX_FNO-3_6hhvj9sq tag=BACKUP_ORCL10G_000_101106043753 recid=115 stamp=603563963
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=+DATADG/orcl10g/example01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-EXAMPLE_FNO-5_6ihvj9tu tag=BACKUP_ORCL10G_000_101106043753 recid=116 stamp=603563977
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile fno=00002 name=+DATADG/orcl10g/undotbs01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-UNDOTBS1_FNO-2_6jhvj9ud tag=BACKUP_ORCL10G_000_101106043753 recid=117 stamp=603563984
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=+DATADG/orcl10g/users01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-USERS_FNO-4_6khvj9uk tag=BACKUP_ORCL10G_000_101106043753 recid=118 stamp=603563990
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 11-OCT-06
Starting Control File and SPFILE Autobackup at 11-OCT-06
piece handle=/rawdata/c-770753237-20061011-07 comment=NONE
Finished Control File and SPFILE Autobackup at 11-OCT-06
RMAN>
Starting backup at 11-OCT-06
current log archived
using channel ORA_DISK_1
archived log /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_cqhvf270 not found or out of sync with catalog
trying alternate file for archivelog thread 1, sequence 1062
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 10/11/2006 16:40:05
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_puhkv41f
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN>
Recovery Manager complete.
Why the system keeps trying to find files under /rawdata? It is the destination, not the source.
Any help is appreciated!
Qian
Message was edited by:
QianChen -
In 10g can we dump control file and get SCN info.
Hi,
I have a question can any one help me on this.
In 9.2.0.5 we could dump the control file and get the SCN using the command :
alter session set events 'immediate trace name CONTROLF level 10';
In 10.1.0.4.0 the output of the dump has changed and we do not get the SCN. or any of the following information :
DATABASE ENTRY
CHECKPOINT PROGRESS RECORDS
EXTENDED DATABASE ENTRY
REDO THREAD RECORDS
LOG FILE RECORDS
DATA FILE RECORDS
RMAN CONFIGURATION RECORDS
LOG FILE HISTORY RECORDS
OFFLINE RANGE RECORDS
ARCHIVED LOG RECORDS
BACKUP SET RECORDS
BACKUP PIECE RECORDS
BACKUP DATAFILE RECORDS
Can I get similar output in 10g as 9i ?
with regards,
Dilip.Hi.
What are you trying to achieve here? If you just want the current SCN, you can get it using one of these:
SQL> select current_scn from v$database;
CURRENT_SCN
8058824527
1 row selected.
SQL>or
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
8079317404
1 row selected.
SQL>Cheers
Tim... -
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 -
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 -
Restore control file and openresetlogs
hi
When I restore controlfile from autobackup
and than restore database and recover database;
I can only open the database with openresetlogs option.
why?1-)
Does all datafiles and control files have scn or
checkpoint scn?
and Does all redolog groups have same scn?
what is SCN?
Any changes i.e DML in a database is assigned a system change number (SCN) ,SCN is assigned for changes that is why its called system change number.Both SCN and changes are written to redo log files.
SQL> select current_scn from v$database
2 /
CURRENT_SCN
756124
SQL> /
CURRENT_SCN
756125
SQL> /
CURRENT_SCN
756136
SQL> /
CURRENT_SCN
756138
SQL> /
CURRENT_SCN
756140
SQL> /
CURRENT_SCN
756394
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
Database mounted.
SQL> select current_scn from v$database
2 /
CURRENT_SCN
0
SQL> /
CURRENT_SCN
0
SQL> /
CURRENT_SCN
0
SQL> /
CURRENT_SCN
0
SQL> When yours database in mount state no activity either from user ends ,background process or foreground process no scn is going to assigned.
whats the use of SCN why it is inremented?
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/consist.htm#CNCPT221
2-)
Does checkpoint scn changes every checkpoint(log switch,etc....).not every second.
checkpoint scn changes after every logswitch cause after log switch an event occur for chekpoint ,this event starts writing dirty buffer from database buffer cache to datafile for which redo log file contains data.After flusing alls dirty buffer from database buffer to datafile an SCN is assigned (system change number assigned) this chekpoint is also a change thats why it is also assigned SCN which is checkpoint SCN,CKPT process gives the database a timestamp/SCN by incrementing a number in controlfile header and broadcast that same SCN to alls datafiles.
CKPT can occur for the number of reason one for is log switch when yours redo log filled , you can also manually trigger checkpoint by issuing alter system command or you may set parameters like log_checkpoint_timeout etc.
3-)
What about scn?? Does it the one that I see from
select current_scn from v$database? which changes every one second?
Check first question reply.
Khurram -
Hi all,
I want to multiplex my control file to another volume. I have an spfile (no init.ora file). Do I just use an alter system with scope = SPFILE?
i.e. ALTER SYSTEM SET CONTROL_FILES=... scope=SPFILE"
Thanks for any feedback.geeter wrote:
Hi all,
I want to multiplex my control file to another volume. I have an spfile (no init.ora file). Do I just use an alter system with scope = SPFILE?
i.e. ALTER SYSTEM SET CONTROL_FILES=... scope=SPFILE"
Thanks for any feedback.Change spfile while database running
Close the db
Start it and it will use new settings for CONTROL_FILES
Kamran Agayev A.
Oracle ACE
My Oracle Video Tutorials - http://kamranagayev.wordpress.com/oracle-video-tutorials/ -
Recover from missing files(redo log file/control file) and state of the DB
Hello,
i hv go through the doc. as well. But have some doubts what will happen in each on these situations.
Pls help me to clarify these!
Scenario is like this;
hv 3 redo log files - multiplxed
hv 3 control files - multiplxed
- What will happen if 1 redo log file missing when starting the DB?
- What will happen if 1 redo log file missing when using(performing operations) the DB?
(will it recover automatically/db abort/even redo log lost will the DB run as usual... ?)
-How to recover this lost redo log?
- What will happen if 1 control file missing when starting the DB?
- What will happen if 1 control file missing when using(performing operations) the DB?
(will it recover automatically/db abort/even control file lost will the DB run as usual... ?)
-How to recover this lost redo log?
thanks- What will happen if 1 redo log file missing when starting the DB?IF you have multiplexed the members you can drop the lost file and will be able to open the DB
What will happen if 1 redo log file missing when using(performing operations) the DB?Again if multiplexed it will drop a warinign in the alert log and contnue to write on othere members
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/recoscen.htm#sthref1385
- What will happen if 1 control file missing when starting the DB?Just remove the entry from the init.ora and start the DB
What will happen if 1 control file missing when using(performing operations) the DB?Will shutdown -
ORA-00245: control file backup failed; target is likely on a local file sys
Hello,
our RAC (Linux, 11.2.0.3.0) is rather new and we are still on gaining experiences with that system...
When starting the backup with RMAN we are getting the following error:
Starting Control File and SPFILE Autobackup at 04-JUL-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_1 channel at 07/04/2012 16:41:48
ORA-00245: control file backup failed; target is likely on a local file system
The reason for the error is clear ORA-00245 - in a RAC environment the location of the Snapshot Controlfile must be on a shared location.
When executing the RMAN command "show all" on each node, we are getting
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0.3/db/dbs/snapcf_PROD021.f'; # default
for node #1
and
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0.3/db/dbs/snapcf_PROD022.f'; # default
for node #2
When using a shared location for the Snapshot Controlfile do we still need to setup 2 different names for that file?
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/<shared location>/snapcf_PROD021.f'; # default
for node #1 and
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/<shared location>/snapcf_PROD022.f'; # default
for node #2
Or should we configure just one Snapshot Controlfile?
The RMAN setup for "CONFIGURE SNAPSHOT CONTROLFILE NAME TO..." must be changed on both nodes - correct?
Hopefully my question is clear enough - any help will be appreciated.
Rgds
JH
Edited by: VivaLaVida on 05.07.2012 11:41No, it must be configured on a shared storage:Not really required, i've RAC setup and snapshot is configured on local storage.
Configuring the RMAN Snapshot Control File Location
The snapshot control file is a copy of a database control file created in an operating system-specific location by Recovery Manager. RMAN creates the snapshot control file so that it has a consistent version of a control file to use when either resynchronizing the recovery catalog or backing up the control file. In Oracle RAC, the snapshot control file is only needed on the nodes on which RMAN performs backups; the snapshot control file does not need to be globally available to all instances in an Oracle RAC environment.
See below from doc.
http://docs.oracle.com/cd/B28359_01/rac.111/b28254/rman.htm#i455026 -
How to restore SPFILE & Control File ???
Dear Experts,
Please bear with me for this simple question.
I am regularly taking backup's to tape using Tivoli MML. My backup's are all successful. We do not have recovery catalog database configured. Below is my full database backup script:
OS: Windows 2008 R2 64-bit
DB: Oracle 11g R2 (11.2.0.2)
run
allocate channel c1 type SBT_TAPE parms 'ENV=(TDPO_OPTFILE=C:\Program Files\Tivoli\TSM\AgentOBA64\tdpo.opt)';
allocate channel c2 type SBT_TAPE parms 'ENV=(TDPO_OPTFILE=C:\Program Files\Tivoli\TSM\AgentOBA64\tdpo.opt)';
backup as compressed backupset format '%d_%u.bkp' database ;
sql "alter system switch logfile";
backup as compressed backupset format '%d_%u.alg' archivelog all delete input;
release channel c1 ;
release channel c2 ;
}and below is the log of the full database bakcup:
allocated channel: c1
channel c1: sid=58 devtype=SBT_TAPE
channel c1: Data Protection for Oracle: version 5.5.2.0
allocated channel: c2
channel c2: sid=57 devtype=SBT_TAPE
channel c2: Data Protection for Oracle: version 5.5.2.0
sql statement: alter system switch logfile
Starting backup at 26-OCT-11
channel c1: starting compressed full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00001 name=D:\ORACLE\ORADATA\ABCDB\SYSTEM01.DBF
input datafile fno=00004 name=D:\ORACLE\ORADATA\ABCDB\USERS01.DBF
input datafile fno=00008 name=D:\ORACLE\ORADATA\ABCDB\HR_DATA
input datafile fno=00009 name=D:\ORACLE\ORADATA\ABCDB\PROC_DATA
channel c1: starting piece 1 at 26-OCT-11
channel c2: starting compressed full datafile backupset
channel c2: specifying datafile(s) in backupset
input datafile fno=00003 name=D:\ORACLE\ORADATA\ABCDB\SYSAUX01.DBF
input datafile fno=00005 name=D:\ORACLE\ORADATA\ABCDB\SYS_DATA
input datafile fno=00002 name=D:\ORACLE\ORADATA\ABCDB\UNDOTBS01.DBF
input datafile fno=00007 name=D:\ORACLE\ORADATA\ABCDB\GL_DATA
input datafile fno=00006 name=D:\ORACLE\ORADATA\ABCDB\AUD_DATA
channel c2: starting piece 1 at 26-OCT-11
channel c2: finished piece 1 at 26-OCT-11
piece handle=ABCDB_4mmq31ib.bkp tag=FULLDB_26OCT2011_2 comment=API Version 2.0,MMS Version 5.5.2.0
channel c2: backup set complete, elapsed time: 00:00:15
channel c2: starting compressed full datafile backupset
channel c2: specifying datafile(s) in backupset
including current control file in backupset
channel c2: starting piece 1 at 26-OCT-11
channel c1: finished piece 1 at 26-OCT-11
piece handle=ABCDB_4lmq31ib.bkp tag=FULLDB_26OCT2011_2 comment=API Version 2.0,MMS Version 5.5.2.0
channel c1: backup set complete, elapsed time: 00:00:19
channel c2: finished piece 1 at 26-OCT-11
piece handle=ABCDB_4nmq31ir.bkp tag=FULLDB_26OCT2011_2 comment=API Version 2.0,MMS Version 5.5.2.0
channel c2: backup set complete, elapsed time: 00:00:10
Finished backup at 26-OCT-11
Starting Control File and SPFILE Autobackup at 26-OCT-11
piece handle=c-2814270906-20111026-00 comment=API Version 2.0,MMS Version 5.5.2.0
Finished Control File and SPFILE Autobackup at 26-OCT-11
sql statement: alter system switch logfile
Starting backup at 26-OCT-11
current log archived
channel c1: starting compressed archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=267 recid=160 stamp=765559302
channel c1: starting piece 1 at 26-OCT-11
channel c2: starting compressed archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=1 sequence=268 recid=161 stamp=765559508
input archive log thread=1 sequence=269 recid=162 stamp=765559508
input archive log thread=1 sequence=270 recid=163 stamp=765560395
channel c2: starting piece 1 at 26-OCT-11
channel c1: finished piece 1 at 26-OCT-11
piece handle=ABCDB_4pmq31jj.alg tag=ARCHIVE_26OCT2011_@ comment=API Version 2.0,MMS Version 5.5.2.0
channel c1: backup set complete, elapsed time: 00:00:08
channel c2: finished piece 1 at 26-OCT-11
piece handle=ABCDB_4qmq31jj.alg tag=ARCHIVE_26OCT2011_@ comment=API Version 2.0,MMS Version 5.5.2.0
channel c2: backup set complete, elapsed time: 00:00:08
channel c1: starting compressed archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=271 recid=164 stamp=765560433
input archive log thread=1 sequence=272 recid=165 stamp=765560434
channel c1: starting piece 1 at 26-OCT-11
channel c1: finished piece 1 at 26-OCT-11
piece handle=ABCDB_4rmq31jr.alg tag=ARCHIVE_26OCT2011_@ comment=API Version 2.0,MMS Version 5.5.2.0
channel c1: backup set complete, elapsed time: 00:00:04
Finished backup at 26-OCT-11
Starting Control File and SPFILE Autobackup at 26-OCT-11
piece handle=c-2814270906-20111026-01 comment=API Version 2.0,MMS Version 5.5.2.0
Finished Control File and SPFILE Autobackup at 26-OCT-11
released channel: c1
released channel: c2
RMAN>I want to restore SPFILE and controlfile on a new host. I did the following to restore:
1) started database instance in nomount mode from RMAN (it started db with dummy parameter file)
2) Set the dbid
3) restore SPFILE/controlfile
But the command says, I have to restore from autobackup. There is no autobackup controlfile available on this server. How do i tell the restore command to restore SPFILE & Controlfile from the tape library?
Appreciate your help in this regard.
Thanks
PremDear ,
Do the following for restore process from backup;
RMAN> restore spfile from autobackup;
note : if given error like this:
RMAN 06172 ,
So you should specify the path where the bkppice availabe
RMAN> restore spfile from 'write the location here';
or
RMAN> restore spfile from autobackup db_flash_recovery_dest=' the location of flash recovery';
Then
SQL > Startup nomount ............... it should read the spfile
and then restore the Controlfile
RMAN> restore controlfile from autobackup;
Hopes it help you
Regards -
DBID in Control File AutoBackup
Documentation states that the format for the controlfile autobackup contains the DBID of the database. See: http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/setup004.htm#i1017907
<quote>
3.4.7.1 Configuring the Control File Autobackup Format
By default, the format of the autobackup file for all configured devices is the substitution variable %F. This variable format translates into c-IIIIIIIIII-YYYYMMDD-QQ, where:
--- IIIIIIIIII stands for the DBID.
--- YYYYMMDD is a time stamp of the day the backup is generated
--- QQ is the hex sequence that starts with 00 and has a maximum
</quote>
When I look at this on my machine I don't see that relation:
SYS@bluebase>select dbid from v$database;
DBID
2842031076
and:
[oracle@blue ~]$ rman target / catalog rman/****@catbase
Recovery Manager: Release 10.2.0.1.0 - Production on Sat Feb 9 13:00:34 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: BLUEBASE (DBID=2842031076)
connected to recovery catalog database
RMAN> show controlfile autobackup;
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
<cut>
Starting Control File and SPFILE Autobackup at 09-02-08 13:03:11
piece handle=/flash/BLUEBASE/autobackup/2008_02_09/o1_mf_s_646232592_3tv5n0hm_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 09-02-08 13:03:13
</cut>
I can not relate the piece name to the DBID?
Thanks.Thank you!
Below a snippet that shows the behaviour you described.
(IMO this is a limitation in the CTRL/SPFILE Autobackup feature)
RMAN> show CONTROLFILE AUTOBACKUP;
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> show CONTROLFILE AUTOBACKUP format;
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/dbatemp/autobackup/%F';
RMAN> backup datafile 3;
Starting backup at 09-02-08 14:20:58
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00003 name=/oradata/db/bluebase/sysaux01.dbf
channel ORA_DISK_1: starting piece 1 at 09-02-08 14:20:59
channel ORA_DISK_1: finished piece 1 at 09-02-08 14:21:14
piece handle=/flash/BLUEBASE/bluebase_ora_df646237258_s244_s1.bkp tag=TAG20080209T142058 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
Finished backup at 09-02-08 14:21:14
Starting Control File and SPFILE Autobackup at 09-02-08 14:21:14
piece handle=/dbatemp/autobackup/c-2842031076-20080209-02 comment=NONE
Finished Control File and SPFILE Autobackup at 09-02-08 14:21:17
-------------------//------------------ -
Cannot recover control file in Oracle10g
Dear friends ,
I have to delete my three control files for testing purpose in ORacle 10g .Before Deleting , I take a backup with control file and spfile using following way :
script :
run
allocate channel t1 type disk;
backup format 'df_%t_%s_%p'
(database);}
AND OUTPUT of RMAN ,
RMAN> show all;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'C:\TEMP\ctrl_file%F';
Now when I run the restore script then it shows follwing error :
RMAN> set DBID=1178861114;
executing command: SET DBID
RMAN> restore controlfile from autobackup db_recovery_file_dest='C:\TEMP\CTRL_FILEC-1178861114-20080413-00';
Starting restore at 13-APR-08
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
recovery area destination: C:\TEMP\CTRL_FILEC-1178861114-20080413-00
database name (or database unique name) used for search: ORCL
channel ORA_DISK_1: no autobackups found in the recovery area
channel ORA_DISK_1: looking for autobackup on day: 20080413
channel ORA_DISK_1: looking for autobackup on day: 20080412
channel ORA_DISK_1: looking for autobackup on day: 20080411
channel ORA_DISK_1: looking for autobackup on day: 20080410
channel ORA_DISK_1: looking for autobackup on day: 20080409
channel ORA_DISK_1: looking for autobackup on day: 20080408
channel ORA_DISK_1: looking for autobackup on day: 20080407
channel ORA_DISK_1: no autobackup in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/13/2008 10:35:34
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
I dont know why my control files are not backed up ? can anybody plz help me ?I can't say why what you did didn't work but I can say that using RMAN is not the best way to recover lost control files.
Lets assume you have three control files located on three different drives. It is impossible to accidentally delete all three so the best solution to losing one is to shutdown the database and copy an existing one to the location where a file has gone missing and rename it to the name of the deleted file.
Failing that you should always have a script created using:
BACKUP CONTROLFILE TO TRACE;I would only use the control files backed up by RMAN to create an auxiliary database such as a standby or for testing. -
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. -
Using archivelog and control file from other Oracle server
I am still bothered with my backup process.
I have 2 AIX boxes (same model, say A and B); both have BAAN 5 and Oracle 10g R2 on. Right now my colleague insists to use the export pump (cold backup) from Prod Oracle server (A) to restore the Oracle server on Box B. The Prod server has the archivelog mode turn on. But it will miss any transaction data from import pump till the crash point of Box A. So this is my confusion.
Can I pass the control files and archivelog files form Box A (prod server) to Box B and use them to restore the Box B as the latest Prod server? How?
I tried to convince them to use the RMAN backup? But not successful?
I think the best way is probably to use the Oracle Data guard. However, there is always one concern to my manager and colleague, that such process will cause the data on the restored server (failover, Box B) not recognizable by the BAAN, which define the objects (tables).
ThanksPerforming a logical backup is not useful to restore to the point of failure. The only valid and available option is a hot backup/archivelog mode. Your recovery manager backup perform a controlfile and redologfile backup, so those can be restored at the destination. You must take care of the way you perform the backup, and ensure the paths where your backup is being deposited are visible by the second node. A shared storage with same mount points is suitable in this case. A tape robot configured at both nodes is also a suitable solution.
Recovery manager perfoms a controlfile and spfile restore, too. This rman command perform the action:
SET DBID <DBID of the database,for which you want to restore the controlfile>;
RESTORE CONTROLFILE FROM <name_of_backupiece_which_contains_the_controlfile backup>';
I don't see any problem on the recovery manager side, and technically speaking, on the Oracle side it is perfectly possible to restore your database at a remote location. I don't know what happens on the BAAN side, if you are required to have it configured to be operative on the target node. You could try to clone your database at the node B, configure BAAN and prepare the proceduere in case of failure.
Configuring a dataguard is also a recomended action. So it is to think about Cold Failed Over clusters. I have recently performed a CFC configuration with BAAN. No problem it works smoothly.
~ Madrid.
Maybe you are looking for
-
Position does not exist in table T528
I have transported from Dev to QAS. I am trying to hire an employee using PA40 and when i select position it is giving an error saying does not exist in table T528
-
Manage multiple iphones on itunes account
How can I manage multiple iphones on one itunes account? I am trying to sync my daughters phone whom has different applications than mine - but my itunes account won't cooperate. Cant find any info on this. Wanted to download the new iOS 5 but nee
-
Rescuing deleted emails from Outlook Express 5 mac vers
Dear Forum I would be grateful if anyone could cast some light on the following puzzle. I am trying to retrieve deleted emails from Microsoft Outlook Express 5 Macintosh edition (vers 5.02 2022) running on a G4. Using Data Recovery 2, I have uncovere
-
Steps to compile and deploy files on jsap
steps to compile and deploy files on jsap classpath that has to be set where to put the .class files (Where to fnd JNDI tab)
-
Issue with executing Business Rules from Planning web
Hi, We are using Hyperion Planning 9.3.0.1 and we keep getting an issue with the Business Rules. We get an error if we try to run the rules from Planning web. The same rules validates and executes fine if we run it from AAS. This issue gets resolved