This is most commonly caused by incompatible version. Modify COMPATIBLE parameter helps
Register huge amount of archlogs in rman after restore controlfile
•July 29, 2011 • Leave a CommentYou can quite easly catalog archlogs in rman without specifying each file separately
1. If you store archlogs in FRA, you can do this just like this:
catalog recovery area;
2. If you store archlogs in different directory:
catalog start with ""
restoring database – what’s the difference in manually registering archlogs:
•July 29, 2011 • Leave a CommentI. Restore WITHOUT registering archlogs backed up AFTER controlfile that we restoring:
RMAN> restore controlfile from "/rman/red_bkups/red_0emiipq5_1_1.bak";
RMAN> alter database mount;
RMAN> restore database;
SQL> recover database using backup controlfile;
Specify log: {=suggested | filename | AUTO | CANCEL}
...
Log applied.
Media recovery complete.
SQL> alter database open resetlogs;
Database altered.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
1546612
II. Restore WITH registering archlogs backed up AFTER controlfile that we restoring:
RMAN> restore controlfile from "/rman/red_bkups/red_0emiipq5_1_1.bak";
RMAN> alter database mount;
RMAN> restore database;
RMAN> catalog backuppiece "/rman/red_bkups/arch_RED_DB_0cmiipod_12_1";
cataloged backup piece
backup piece handle=/rman/red_bkups/arch_RED_DB_0cmiipod_12_1 RECID=11 STAMP=757775504
RMAN> catalog backuppiece "/rman/red_bkups/arch_RED_DB_0fmiipq8_15_1";
cataloged backup piece
backup piece handle=/rman/red_bkups/arch_RED_DB_0fmiipq8_15_1 RECID=12 STAMP=757775514
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
1546615
Conclusion – manually registering arch logs enable to apply them automaticaly in recover database
RMAN-06054: media recovery requesting unknown archived log
•July 29, 2011 • Leave a CommentYou lost controlfile. Rman setup disabled autobackup controlfile. So it means you have backup of controlfile taken automatically during backup that does file#=1. Starting to restore:
RMAN> set DBID=2273003201
executing command: SET DBID
RMAN> startup nomount
RMAN> restore controlfile from "/rman/red_bkups/red_0emiipq5_1_1.bak";
RMAN> restore database;
channel ORA_DISK_1: restore complete, elapsed time: 00:02:26
Finished restore at 29-JUL-11
RMAN>
RMAN> recover database;
Starting recover at 29-JUL-11
using channel ORA_DISK_1
starting media recovery
unable to find archived log
archived log thread=1 sequence=4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/29/2011 12:41:34
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 4 and starting SCN of 1426007
What this error means??? Well, controlfile you restored is quite old, does not contains any information about archlogs genarated later. All you need to do is to registered them in rman:
RMAN> catalog backuppiece "/rman/red_bkups/arch_RED_DB_0cmiipod_12_1";
cataloged backup piece
backup piece handle=/rman/red_bkups/arch_RED_DB_0cmiipod_12_1 RECID=11 STAMP=757773769
RMAN> catalog backuppiece "/rman/red_bkups/arch_RED_DB_0fmiipq8_15_1";
cataloged backup piece
backup piece handle=/rman/red_bkups/arch_RED_DB_0fmiipq8_15_1 RECID=12 STAMP=757773796
RMAN> recover database;
Starting recover at 29-JUL-11
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=4
channel ORA_DISK_1: reading from backup piece /rman/red_bkups/arch_RED_DB_0fmiipq8_15_1
channel ORA_DISK_1: piece handle=/rman/red_bkups/arch_RED_DB_0fmiipq8_15_1 tag=TAG20110728T125536
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u01/arch/red/1_4_757614883.dbf thread=1 sequence=4
archived log file name=/u01/arch/red/1_5_757614883.dbf thread=1 sequence=5
archived log file name=/u01/arch/red/1_6_757614883.dbf thread=1 sequence=6
archived log file name=/u01/arch/red/1_7_757614883.dbf thread=1 sequence=7
archived log file name=/u01/arch/red/1_8_757614883.dbf thread=1 sequence=8
archived log file name=/u01/arch/red/1_9_757614883.dbf thread=1 sequence=9
archived log file name=/u01/arch/red/1_10_757614883.dbf thread=1 sequence=10
media recovery complete, elapsed time: 00:00:18
Finished recover at 29-JUL-11
RMAN>
Restore controlfile when autobackup controlfile is set to off
•July 29, 2011 • Leave a CommentSo, you try to open database and get error:
ORA-00205: error in identifying control file, check alert log for more info
It means you have problem – you lost controlfile. Your rman controlfile autobackup is set to off.
Remember, it is very good idea to keep logs of you backups scripts somewhere in safe place. You can find them all you need to survive in this situation.
Here is what you can find there:
[oracle@localhost scripts]$ cat hot_bkup_red_20110728_12:54.log
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jul 28 12:54:56 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: RED (DBID=2273003201)
using target database control file instead of recovery catalog
(....)
channel t1: starting full datafile backup set
channel t1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel t1: starting piece 1 at 28-JUL-11
channel t1: finished piece 1 at 28-JUL-11
piece handle=/rman/red_bkups/red_0emiipq5_1_1.bak tag=TAG20110728T125458 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-JUL-11
So this is how to restore you controlfiles:
RMAN> restore controlfile from "/rman/red_bkups/red_0emiipq5_1_1.bak";
Starting restore at 29-JUL-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/u01/oradata/ts1/ora_control1.dbf
output file name=/u01/oradata/ts1/ora_control2.dbf
Finished restore at 29-JUL-11
RMAN> restore database;
Starting restore at 29-JUL-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/oradata/ts1/red_system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/oradata/ts1/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/oradata/ts1/red_undo01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/oradata/ts1/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/oradata/ts1/mgmt_ecm_depot1.dbf
channel ORA_DISK_1: restoring datafile 00006 to /u01/oradata/ts1/mgmt.dbf
channel ORA_DISK_1: restoring datafile 00007 to /u01/oradata/ts1/mgmt_ad4j.dbf
channel ORA_DISK_1: reading from backup piece /rman/red_bkups/red_0dmiipp2_1_1.bak
channel ORA_DISK_1: piece handle=/rman/red_bkups/red_0dmiipp2_1_1.bak tag=TAG20110728T125458
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:25
Finished restore at 29-JUL-11
SQL> alter database open resetlogs;
Database altered.
Restore spfile when autobackup is off
•July 29, 2011 • Leave a CommentWhen you lost whole database including spfile, first think you would need to restore is spfile.
When your rman was configured to have autobackup on – you can do this quite simple. The problem is when it is off. Most probably some spfile backup is somewhere – e.g. while each backup that backup file#1. But you dont have spfile, dont have controlfile, so cannot find this in easy way. So or you have logs of your backups, or you need to guess/try each backup set. This is how to restore spfile:
[oracle@localhost dbs]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Fri Jul 29 11:12:38 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> set DBID=2273003201
executing command: SET DBID
RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/app/oracle/product/11.2.0/dbhome_1/dbs/initred.ora'
starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started
Total System Global Area 158662656 bytes
Fixed Size 2211448 bytes
Variable Size 88080776 bytes
Database Buffers 62914560 bytes
Redo Buffers 5455872 bytes
RMAN> restore spfile from '/rman/red_bkups/red_0emiipq5_1_1.bak';
Starting restore at 29-JUL-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
channel ORA_DISK_1: restoring spfile from AUTOBACKUP /rman/red_bkups/red_0emiipq5_1_1.bak
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 29-JUL-11
RMAN>
EM Grid Control 11g on RHEL 6.1 – yes, it is possible
•July 27, 2011 • Leave a CommentThis is what needs to be done to install sucessfully EM Grid control on RHEL 6.1:
1. Install clean RHEL 6.1 (server)
2. Find in documentation what additional packages needs to be install and install them. What is important: even on RHEL 6.1 x64 you need to install gcc, gclib in 32 version
3. You need to replace java version. Built in this version 1.6_20 will casue error “Connection refuse …” while trying to start some EM agent while installation and you stuck there. You need to update java (download, unzip and replace symbolic link) and jdk (from rpm, no additional work required)
4. Instal Weblogic Server. Important: it needs to be in 10.3.2 (only!) version. Also download from metalink patch WDJ7 and apply this. Ensure proper (installed by you) jdk is used (there will be screen to check it during installation).
5. Install Oracle 11g database – ONLY software. Dont use create database during installation, as cleaning up repository data later is perfectly working (possible, but not not trivial one line command)
6. Create database – manually or using DBCA. When you use DBCA – remember to unmark “Create Enterprise Repository”. We dont need this as installation of grid will create it
7. Run EM Grid installation, it should go ok now.
8. Make changes in firewall
