RAC
A simple example of a custom component managed by CRS
You can add custom components to CRS if you have a need. You basically need a program (perhaps as simple as a shell script) that accepts three command line arguments: start stop check Below is an example of a shell script that you can register. #!/bin/sh if ; then /home/oracle/test & elif [ "$1" =... »
Parsing hanganalyze output for blocking sessions
The hanganalyze command was introduced in Oracle 8i. It is very useful, especially to mere mortals like us. It is formatted in a human readable format. In contrast, a systemstate dump normally contains a lot of memory addresses and offsets, which is useful to Oracle support, but not so much to... »
Yet another reason to use Oracle’s JDBC connection manager
Over the weekend we had an odd issue. We have four nodes in a cluster, with two core services. SERVICE_A runs on servers 1 and 2, while SERVICE_B runs on server 4. Server 3 is effectively idle most of the time unless we need to allow for additional throughput. Server... »
How to “unregister” a service from a listener
If a service is registered with your listener outside of the clusterware, you can unregister it with the following call: dbms_service.stop_service(service_name,instance_name) I verified that this will not disconnect existing sessions in the instance on which the service is being stopped. I did this by performing the following steps: create 100 sessions to service and verify some are on... »
VIP migrations
We start with a two node cluster with all components up. linux2:oracle:tst10g2:/home/oracle>./crsstat.ksh HA Resource Target State ———– —— —– ora.linux1.ASM1.asm ONLINE ONLINE on linux1 ora.linux1.LISTENER_LINUX1.lsnr ONLINE ONLINE on linux1 ora.linux1.gsd ONLINE ONLINE on linux1 ora.linux1.ons ONLINE ONLINE on linux1 ora.linux1.vip ONLINE ONLINE on linux1 ora.linux2.ASM2.asm ONLINE ONLINE on linux2 ora.linux2.LISTENER_LINUX2.lsnr ONLINE ONLINE on linux2 ora.linux2.gsd ONLINE ONLINE on linux2 ora.linux2.ons ONLINE ONLINE on linux2 ora.linux2.vip ... »
Manually subscribing to Oracle FAN events
JDBC and dot Net clients are the recommended way to automatically subscribe to high availability events in an Oracle clustered environment, AKA, a RAC. I was curious as to how this could be implemented using your own code behind the scenes. To show this, we will use a combination of PL/SQL and python. First, we... »
Can’t add a service already registered with the listener
This morning, while testing on a two node 10.2.0.3 EE SLES 10 cluster, I found that using srvctl to remove a service from the clusterware does not necessarily stop the service and de-register it from the listener. I’m not sure if this is officially documented, but it will be now…at least in my... »
How does connection re-direction occur in RAC? (Part 1)
I have always been curious as to how a connection request is redirected in a RAC. In other words, let’s assume we have a two node cluster with a given service that only runs on one of the nodes. In this case the reqman service runs only on linux1. In our URL, we only... »
Python based stress tester
I often find myself building something in anticipation of needing it at some point. This is one of those cases :) Below is a template (a real working one for my needs) that you can edit to build a simple load testing tool. We were having a performance problem with one SQL statement, and... »
Great whitepaper on connection management in RAC
This is a fantastic whitepaper on workload management in RAC. It is essential reading for anyone supporting a RAC environment, or an architect of a middle tier that wants to understand how connections are handled by the database. http://www.pythian.com/documents/Pythian_RAC_Whitepaper.pdf »