Tuesday, January 25, 2011

TSPITR using restore point on 10gR2 fails

When try to do RMAN TSPITR using a previous created restore point (no guarantee) rman fails :

RMAN> run {
recover tablespace 'MYTBS' until restore point TEST_RESTORE_POINT2 auxiliary destination = '/data/ttbs/testdb/data';
sql 'alter tablespace "MYTBS" online';

Starting recover at 25-JAN-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=200 instance=testdb1 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=186 instance=testdb1 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/25/2011 12:11:09
RMAN-00600: internal error, arguments [5085] [point] [] [] []

Searching in metalink gave me this :

Bug 8571266 : RMAN TSPITR to restore point fails with RMAN-600 [5085]
Cannot specify TO RESTORE POINT for RMAN TSPITR (tablespace point in time recovery)

Range of versions believed to be affected Versions BELOW, and i have also tried

This issue is fixed in (Server Patch Set)

The documentation states that DB Point in time Recovery can be done using restore points (I have tested and worked fine with RMAN doing incomplete recovery to restore point) and Oracle recommends to create restore point to make point-in-time recovery more manageable.

So i wanted to try using the restore point with TSPITR and its not working. I believe this is a silly RMAN bug because when you create a restore point the database records the scn and time of the restore point !!!

select name, scn , time
from v$restore_point where name='TEST_RESTORE_POINT2';

TEST_RESTORE_POINT2 15940639418 25/01/11 10:10:25,000000000

So the workaround for this bug (silly if you imagine) is to using TSPITR using until scn or until time !!!

run {
recover tablespace 'MYTBS' until scn 15940639418 auxiliary destination = '/data/ttbs/testdb/data';
sql 'alter tablespace "MYTBS" online';

Thursday, January 13, 2011

ORA-01666 When Trying to Activate Standby Database

When Trying to Activate Standby Database , and you use startup or startup mount you will get ORA-01666: controlfile is for a standby database

You must not forget that since this is the standby you must do :

sqlplus / as sysdba
startup nomount
alter database mount standby database;

Then you can perform any operation you want
start the automatic recovery session
fix a gap on log sequences

Wednesday, January 5, 2011

11g RAC Install on Centos VM

The follwoing link can be used to test 11g RAC on x86_64 Linux using vm machines and CentOs.


Can also be used as a general guide for installing 11gRAC

Monday, January 3, 2011

ORA-19573: cannot obtain exclusive enqueue for datafile

This errors is usually happens when tried to restore the tablespace and the tablespace was online and the database open.

Solution :

1) Take the tablespace offline before trying to restore it.
2) DO recovery on the datafiles belonging to the tablespace.