Friday, February 29, 2008

Mirroring PFILE

To have two copies of PFILE in a ORACLE Database, follow the below steps...

UNIX:
Create a Symbolic link in $ORACLE_HOME/dbs folder that points to the file in $ORACLE_BASE/admin/XYZ/pfile/initXYZ.ora

ln -s $ORACLE_BASE/admin/XYZ/pfile/initXYZ.ora $ORACLE_BASE/dba/initXYZ.ora
where XYZ is the database

WINDOWS:
Create a pfile in ORACLE_BASE\admin\XYZ\pfile and put an entry in the ORACLE_HOME\dbs\initXYZ.ora as given below
ifile=\admin\XYZ\pfile\initXYZ.ora
where XYZ is the database

Thursday, February 28, 2008

Tablespace Report

Checking the tablespace is a day today activity. We can use the Enterprise Manager in ORACLE 10g to monitor the tablespace. But sometimes the EM eats up lots of system resources, so I don't use EM to monitor the database, but it is quite useful in many places. I decided to come up with a shell script to generate a tablespace report as shown below,


Script to generate and mail the report : Code.zip