Tuesday, December 23, 2008

Oracle XE on OpenVZ (CentOS 4.6)

While recently installing on dedicated server provisioned as a single VPS, following yum install libaio (as well as bc and flex in my case), when I issued

# rpm -ivh oracle-xe-10.2.0.1-1.0.i386.rpm

I was greeted by:

Preparing... ########################################### [100%]
error: unknown error 1 setting key 'kernel.sysrq'
error: unknown error 1 setting key 'kernel.core_uses_pid'
error: %pre(oracle-xe-10.2.0.1-1.0.i386) scriptlet failed, exit status 255
error: install: %pre scriptlet failed (2), skipping oracle-xe-10.2.0.1-1.0


XE, of course, does a sysctl -p to update the live kernel with the values of the sysctl.conf file.

In my case, it was the default RHL sysctl.conf file and .sysrq and .uses_pid could not be updated by OpenVZ to the live kernel.

In any event, re-issue # rpm -ivh oracle-xe-10.2.0.1-1.0.i386.rpm:

Preparing... ########################################### [100%]
1:oracle-xe ########################################### [100%]
Executing Post-install steps...

You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.


So, vi'ing sysctl.conf kernel.sem = 250 32000 100 128, kernel.shmmax = 536870912.

Finally, # grep . kernel/* and verify everything is good.

Happy Birthday Uriel!!!!

Happy Birthday Uriel!!!!

1. Uriel, the Birthday Boy
2. Betzalel, the Birthday Brother (by law, this entitles him to both receive gifts as well as share Uriel's)
3. Elouise's lovely train cake
4. Elouise, The Birthday Mom
5. Daphna, The Birthday Sister (by law, this entitles her to be carted about the flat all day by Birthday Dad).



Oracle XE Backup with Email of Log

To receive a inline copy of your back up log, add the line in bold below to your backup.sh.

Also comment out the two lines in italic.

This assumes you are running in achieve log mode - which, of course, you are :)


#Display the result to user
if [ $failed = 'true' ] ; then
echo '==================== ERROR ========================='
echo ' Backup of the database failed '
echo '==================== ERROR ========================='
echo ${errstr}.
echo Log file is at $rman_backup_current.
else
echo Backup of the database succeeded.
echo Log file is at $rman_backup_current.
mail -s 'Oracle Backup Completed' you@yourdomain.com < /usr/lib/oracle/xe/oxe_backup_current.log

fi

#Wait for user to press any key
#echo -n "Press ENTER key to exit"
#read userinp