Wednesday, September 30, 2009

Move or Rename Oracle Datafiles

Move or rename the datafiles from current location to another one. Then startup the database in mount mode as:

startup mount

Then rename the datafile as below:

alter database rename file '/abc/mydatafile.dbf' to '/xyz/mydatafile.dbf';

This will update the location of datafile in control file. Then open the database as

alter database open;

You can now view the location of datafile from the v$datafile view.

Identify Oracle Patches Applied in AIX Server

List of installed patches

$ORACLE_HOME/OPatch/opatch lsinventory

Detail List of installed patches

$ORACLE_HOME/OPatch/opatch lsinventory -details

Enviornment variable $ORACLE_HOME must be set.