Friday, November 14, 2008

Undo Retention Gurantee.

When using AUM, you have three kind of undo extents

1)ACTIVE This means that undo extent is Active and being currently used by a transaction

2)UNEXPIRED This represents the extents which are required to satisfy the time specified by Undo_retention Initialisation parameter.

3)EXPIREDThese are extents which are not being used by transaction and have crossed the time specified by Undo_retention .So generally when undo segment space is full then we try to use the Expired extents and if there is no space to either get a new extent or reuse expired extents, then we go and use Unexpired extents. This sometimes lead to ORA-1555 error.

Starting from 10g, a new feature called Retention Guarantee has been introduced. If Retention Guarantee is enabled then you can be assured that you will not be reusing the Unexpired extents but this will mean higher chances of getting ORA-30036 error i.e failing to extend Undo Rollback segmentPlease refer following post for more details

Thursday, October 30, 2008

How to Deinstall/Uninstall Oracle 10g on Redhat Linux

======================Solution 1====================

Stop all of the processes


Delete the ORACLE_BASE directory (usually the one one level up from ORACLE_HOME)
Delete the oraInventory directory if it isn't inside ORACLE_BASE
Delete /etc/oratab, /etc/oraInst.loc
Delete /user/local/bin/coraenv, /user/local/bin/oraenv, /user/local/bin/dbhome
Undo any environment settings you may have modified (in .bash_profile and bashrc)

That should be just about it. That's how I usually clean out my system between installs.

=======================Solution 2=======================

You don't need to run OUI, you can do this manually also. Here are the steps which I follow:

Stop all the databases and listener on the box either manually or using your startup script (/etc/init.d/oracle stop).

$ORACLE_HOME/bin/localconfig delete

rm -rf /etc/ora*

*********** /etc/oratab include contest as below to note which ORACLE_SID/ORACLE_HOME
test:/home/oracle/oracle/product/10.2.0/db_2:N
orcl:/u01/app/oracle/product/10.2.0/db_1:N
********** /etc/oraInst.loc is the ORACLE install location
inventory_loc=/home/oracle/oraInventory
inst_group=dba

rm -rf $ORACLE_HOME

rm -rf $ORACLE_BASE

rm -rf /tmp/Ora*
rm -rf /var/tmp/.oracle

This should be enough to remove the whole software from the box, you can drop the OS users and their home directories also if you want.

Oracle 10G 10.2.0 Database Installation Guide

Oracle 10G 10.2.0 Database Installation Guide

1. Preinstallation.

- check the physical configuration
- Physical MEM and Swap, swap=2*physical memory.

#grep MemTotal /proc/meminfo
MemTotal: 1917952 kB
#free
total used free shared buffers cached
Mem: 1917952 1893332 24620 0 7780 917124
-/+ buffers/cache: 968428 949524
Swap: 4096564 1642720 2453844

# grep SwapTotal /proc/meminfo
SwapTotal: 4096564 kB

- The system must be running the following kernel version (or a later version):
Red Hat Enterprise Linux 3.0:
2.4.21-27.EL
# cat /proc/version
Linux version 2.6.18-53.el5xen (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Wed Oct 10 16:48:44 EDT 2007

#uname -r
2.6.18-53.el5xen

[root@testsrv01 database]# hostname
testsrv01.sscsi.ca
# cat /etc/hosts | grep `eval hostname`

- Add new group and user.
# /usr/sbin/groupadd oinstall
add oracle inventory owner group.
# /usr/sbin/groupadd dba
add database owner group
#/usr/sbin/groupadd oper
add operation group
# /usr/sbin/useradd -g oinstall -G dba,oper oracle
add user oracle with certain groups.


HOw to apply patch/rpm

-- install some package/patches # rpm -Uvh . C

2. Run runInstaller from /oratemp/database - which is the software folder.

- Copy Oracle CD file to local directory: *.gz.
- gunzip *.gz. You get *.cpio file
- Run cat *.cpio | cpio -idmv