Tuesday, March 26, 2013

Collaborate 2013 - Lots Of learning Lots of Fun

Collaborate 2013 is right around the corner and that is the place to be this April in Denver.
 There are a lot of Learning and a lot of social Activities. I'm goign to be down there presenting an Paper on Oracle Database Appliance http://bit.ly/YFmPpu .
I will be talking about how to deploy the Database Appliance and how it has changed how i do my day to day work. If you are interested in listening to me talk about Oracle Database Appliance , How it works , how easy it is to deploy etc . Please  join me at http://bit.ly/YFmPpu
There will be a lot of Tracks and Sessions and even time with a lot of influential People.
Below is a sneak peak of what i will be talking about. So if you feel that the Topic interests you. Please Come and join me or just come by to say Hi.


Moving Datafile from Physical Standby to Primary via Rman

Rman is an interesting tool and it seems everyday you learn something new. As part of a production issue we lost a diskgroup . This Diskgroup was only a small subset of the actual data but due to an issue in the underlying disk (External Redundancy). The database crashed. As we were debugging the issue with our vendor . We decided to use Rman and our Physical Standby to bring back the datafiles to help mitigate the outage. Now we could have failed over to our standby but since  our Standby hardware was not sized to handle production workload that was a risk the business was not willing to take.
As Oracle 11.1 you can use file from a standby(physical) database and move them to the primary.
We went thru to the Standby and determined which datafiles were in the particular group and then connected to primary from the standby as an auxiliary and copied the files over the network to the different diskgroup.

connect sys@standby AUXILIARY sys@primary;
BACKUP AS COPY DATAFILE 2 AUXILIARY FORMAT '+DATA/COPY_FILE/COPY_FILE.dbf;
..
..
Once the Files are copied you can switch the datafiles .
CATALOG DATAFILE COPY '+DATA/COPY_FILE/COPY_FILE.dbf';

RUN {
  SET NEWNAME FOR DATAFILE 2 TO ''+DATA/COPY_FILE/COPY_FILE.dbf';
  SWITCH DATAFILE 2;
}
This will allow for a move of the datafile as well as rename on the primary.
you will then  have do a crash recovery on the datafile(s) in question.

recover database 2;
alter database datafile 2 online;
you have just copied a file over the network and plugged it into your primary from standby. This is a pretty convenient if accidents happens.

Google Search