Integrate EM Console Startup/Shutdown into Clusterware Control

When installing a RAC clusterware is responsible for starting and stopping required resources automatically and in required order. Under normal circumstances every resource is integrated with one exception: EM Control.

So this is a short guide on how to integrate EM Console startup/shutdown into Clusterware resource control.

First of all you need a startup/shutdown script:

#!/bin/sh
 case $1 in
 'start')
 /u01/app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole
 RET=$?
 ;;
 'stop')
 /u01/app/oracle/product/11.2.0/db_1/bin/emctl stop dbconsole
 RET=$?
 ;;
 'check')
 /u01/app/oracle/product/11.2.0/db_1/bin/emctl status dbconsole
 RET=$?
 ;;
 esac
 exit $RET

After creating the script and placing is under /scripts you need to add the resource:

#crsctl add resource crs_dbconsole type cluster_resource -attr " ACTION SCRIPT= '/scripts/crs_dbconsole.sh' ,
PLACEMENT= 'restricted' , HOSTING_MEMBERS= 'node1' , CHECK_INTERVAL='30' , 
START_DEPENDENICES= 'hard(appsvip)' ,STOP_DEPENDENCIES= 'hard(appsvip)' , RESTART_ATTEMPTS='2' "
Posted in Oracle in general | 5 Comments

Creating a Oracle 10g Release 2 or 11g Release 1 database on a 11g Release 2 Cluster

Today i installed a Oracle 11g Release 2 cluster on Solaris SPARC. Installation went smooth – except installation was not able to set up SSH equivalency automatically so i had to configure it myself.

After installing Oracle 11g R2 grid infrastructure i installed a Oracle 10g Release 2 database binary. Went perfectly fine.

After that i tried to create a database but dbca was unable to recognize the RAC cluster; instead dbca wanted to create a single node database.

This issue can be observed when running a 10.2.0.4.0 or 11.1.0.6.0 or 11.1.0.7.0 database with 11g R2 clusterware. The configuration itself IS supported; but it does not work “out-of-the-box”. This post is about how to fix this error.

Continue reading

Posted in Oracle in general | 6 Comments

How to trace DBCA (>= 10g)

Tracing DBCA can be useful. Starting with 10g onwards this can be achieved by:

1. Copy dbca to dbca_debug

cp dbca dbca_debug

2. Edit dbca_debug file, fine the last line and add “-DDEBUG” before the “-classpath” argument. The edited line looks like:

# Run DBCA
$JRE_DIR/bin/java -Dsun.java2d.font.DisableAlgorithmicStyles=true -DORACLE_HOME=$OH
-DDISPLAY=$DISPLAY -DJDBC_PROTOCOL=thin -mx128m -DDEBUG
-classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS

Starting dbca_debug now will produce debug messages on console:

-bash-3.00$ ./dbca_debug
Warning: Cannot convert string "-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-1" to type FontStruct
[main] [14:59:30:465] [CommandLineArguments.process:563]  CommandLineArguments->process: number of arguments = 0
[main] [14:59:31:49] [Host.checkOPS:2055]  Inside checkOPS
[main] [14:59:31:49] [Host.checkOPS:2067]  Trying to check cluster existence
[main] [14:59:31:99] [Library.getInstance:97]  Created instance of Library.
[main] [14:59:31:99] [Version.isPre10i:189]  isPre10i.java: Returning FALSE
[main] [14:59:31:99] [UnixSystem.getCSSConfigType:2080]  configFile=/var/opt/oracle/ocr.loc
[main] [14:59:31:101] [Utils.getPropertyValue:292]  propName=local_only propValue=FALSE
[main] [14:59:31:101] [UnixSystem.getCSSConfigType:2124]  configType=false
[main] [14:59:31:101] [Version.isPre10i:189]  isPre10i.java: Returning FALSE
[main] [14:59:31:108] [OCRTree.init:202]  calling OCRTree.init
[main] [14:59:31:108] [Version.isPre10i:189]  isPre10i.java: Returning FALSE
[main] [14:59:31:113] [OCRTree.<init>:158]  calling OCR.init at level 7
[main] [14:59:31:115] [OCR.init:279]  OCR instance is not present
[main] [14:59:31:117] [OCR.<init>:230]  Called into OCR.java Constructor: level =7
[main] [14:59:31:117] [OCR.loadLibrary:301]  
 Inside constructor of OCR
[main] [14:59:31:117] [OCR.loadLibrary:309]  Going to load the ocr library
[...]
[...]
Posted in Oracle in general | 3 Comments

Creating database clones with ZFS really FAST

While working on my most recent project i tested an interesting ZFS feature: writeable snapshots aka “clones”.

While testing i came to the conclusion that with the help of clones oracle databases (and, of course – other databases as well) can be clones extremely fast with almost no disk space required. So i tested it.

Read on for the results…

Continue reading

Posted in Oracle in general | 3 Comments

Building a custom and cheap storage server yourself – Part III

This is part III of my most recent project named “Building a custom and cheap storage server yourself”. Part I can be found here and Part II here.

Part II left with a current status of a crashing machine during high I/O loads.During the previous weeks i tried to solve the stability problems. And finally: we solved them!

This third part is about our problems, what caused them and how we finally solved them….

Continue reading

Posted in Openstorage | 5 Comments

I am Oracle Certified Trainer now

Just a short note from myself:

Last week i successfully completed all requirements to become an

Oracle Certified Trainer

Preparing for the course took all my time so there was little time left to write in my blog. Beside preparing for the trainer tests i worked a lot on my other project: building a cheap custom storage yourself.

Posted in Oracle in general | 6 Comments

Building a custom and cheap storage server yourself – Part II

It´s been a few months since posting the idea of building a custom made storage system in my blog. During this time we convinced people to give our idea a try, did some minor changes to the box layout and ordered the parts. Finally they arrived at 27th December 2009.

So this is part II of the project called “Building a custom and cheap storage server yourself”. For people dont know what i am talking about: part I can be found here and part III here.

Building the box

We had a budget of approx 12.000 euros for building the prototype of the storage box. We decided to build the prototype with 40 disks from the start and fit an SAN-HBA in it to try COMSTAR (this enables us to export the storage via SAN to other servers). As operating system we choose Open Solaris. Two disks are dedicated to the operating system and are attached directly to the mainboard. The remaining 38 disks are attached to either one Adaptec 52445 or one Adaptec 51645 controller.

Below are some pictures of the components and the final assembled box. Click on the image for a larger version:

Continue reading

Posted in Openstorage | 4 Comments

Oracle 11g R2 for UP-UX (Itanium) and AIX (PPC64) released

When checking OTN today i noticed the release of Oracle 11g Release 2 (11.2.0.1.0) for

  • HP-UX (Itanium) and
  • AIX (PPC64)

I am surprised 11g R2 for Itanium was released prior 11g Release 2 for Windows…..

Posted in Oracle in general | Leave a comment

OOW 2009 catch-up

Perhaps a little bit late but this post is a catch-up of interesting speeches held at the recent Oracle open world 2009:

Posted in Oracle in general | Leave a comment

How much memory is being used per program (not process)

Sometimes administrators want to know how much memory is being used by a program (and not per process). This is especially useful to calculate the memory consumption for an oracle instance. Today i found a nice script for doing so here (local mirror).

When called on an oracle database server it produces the following output:

host:~ # python mem.py
 Private  +   Shared  =  RAM used       Program
308.0 KiB +   0.0 KiB = 308.0 KiB       init
 84.0 KiB + 264.0 KiB = 348.0 KiB       zmd-bin
120.0 KiB + 284.0 KiB = 404.0 KiB       irqbalance
116.0 KiB + 404.0 KiB = 520.0 KiB       acpid
140.0 KiB + 400.0 KiB = 540.0 KiB       portmap
216.0 KiB + 428.0 KiB = 644.0 KiB       auditd
104.0 KiB + 544.0 KiB = 648.0 KiB       hald-addon-storage
364.0 KiB + 308.0 KiB = 672.0 KiB       klogd
232.0 KiB + 444.0 KiB = 676.0 KiB       wrapper
108.0 KiB + 572.0 KiB = 680.0 KiB       hald-addon-acpi
380.0 KiB + 304.0 KiB = 684.0 KiB       udevd
212.0 KiB + 508.0 KiB = 720.0 KiB       resmgrd
164.0 KiB + 592.0 KiB = 756.0 KiB       dd
424.0 KiB + 644.0 KiB =   1.0 MiB       slpd
576.0 KiB + 496.0 KiB =   1.0 MiB       dbus-daemon
332.0 KiB + 792.0 KiB =   1.1 MiB       cron (2)
584.0 KiB + 608.0 KiB =   1.2 MiB       mingetty (6)
508.0 KiB + 712.0 KiB =   1.2 MiB       nscd
384.0 KiB + 880.0 KiB =   1.2 MiB       vsftpd
276.0 KiB +   1.0 MiB =   1.3 MiB       sh
344.0 KiB +   1.1 MiB =   1.4 MiB       mysqld_safe
872.0 KiB + 660.0 KiB =   1.5 MiB       syslog-ng
856.0 KiB + 712.0 KiB =   1.5 MiB       ndo2db-3x (2)
820.0 KiB +   1.1 MiB =   1.9 MiB       powersaved
468.0 KiB +   1.6 MiB =   2.1 MiB       pickup
496.0 KiB +   1.7 MiB =   2.1 MiB       master
712.0 KiB +   1.6 MiB =   2.3 MiB       qmgr
  1.0 MiB +   1.3 MiB =   2.4 MiB       bash
720.0 KiB +   1.9 MiB =   2.6 MiB       smtpd
  2.0 MiB +   1.1 MiB =   3.0 MiB       mount.smbfs (2)
  2.3 MiB + 932.0 KiB =   3.2 MiB       hald
  1.4 MiB +   1.9 MiB =   3.3 MiB       sshd (2)
  1.4 MiB +   2.1 MiB =   3.5 MiB       smbd (2)
996.0 KiB +   2.6 MiB =   3.5 MiB       nagios
  3.1 MiB +   1.2 MiB =   4.3 MiB       cupsd
  2.9 MiB +   1.8 MiB =   4.7 MiB       ntpd
  5.7 MiB + 716.0 KiB =   6.4 MiB       perl
  7.7 MiB + 776.0 KiB =   8.5 MiB       named
  6.6 MiB +   5.9 MiB =  12.5 MiB       httpd2-prefork (11)
 11.9 MiB +   1.2 MiB =  13.1 MiB       slapd
  9.7 MiB +   4.4 MiB =  14.1 MiB       emagent
 10.1 MiB +   5.3 MiB =  15.5 MiB       tnslsnr (2)
 13.3 MiB +   4.9 MiB =  18.2 MiB       exp
 22.1 MiB + 516.0 KiB =  22.6 MiB       nmbd
103.8 MiB +   1.2 MiB = 105.0 MiB       mysqld-max
569.7 MiB +   9.4 MiB = 579.1 MiB       java (4)
  1.5 GiB +   3.4 GiB =   4.9 GiB       oracle (169)

Private  +   Shared  =  RAM used       Program
Warning: Shared memory is slightly over-estimated by this system
for each program, so totals are not reported.

You can see the running oracle programs sum up to 4.9 GB memory useage. Keep in mind several local running oracle instances are counted together here because summarization is being done by program!

Posted in Oracle in general | 3 Comments