Wednesday, April 27, 2011

complete recovery of datafile using RMAN

You can perform following experiment to perform complete recovery of datafile in archivelog mode.
1. Assume database is up and running.
2. Delete datafile 4.
3. Valid backup must exist.
4. All the redo logs after the last valid backup exist.

To restore it,
1. RMAN> SQL'alter database datafile 4 offline';
2. RMAN> restore datafile 4;
3. RMAN> recover datafile 4;
4. RMAN>SQL'alter database datafile 4 online';

If an active redo log file is lost, then incomplete recovery of a datafile is not possible . Instead we have to perform Tablespace point in time recovery.

Saturday, April 2, 2011

Resolving Exception in thread "main" error

When trying to execute dbca from my unix(ubuntu 9) prompt, I get following error:

Exception in thread "main"
and prompt returns.
Solution: If working on the local machine, set DISPLAY variable as
$ DISPLAY=:0.0
$ export DISPLAY

$ dbca

and everything works fine.