Oracle
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" =... »
Redo on unchanged column values
I recently spoke with an Oracle DBA. He mentioned they had a third party application that was generating gobs of redo by updating rows to their existing values, i.e., update t set c = c. This bothered me, as my understanding was that other than recursive SQL such as extent allocation, block... »
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... »
Converting SCN to decimal
I found a slick little script at the following URL for converting an SCN to decimal. http://www.bluegecko.net/oracle/converting-hexadecimal-oracle-scns-to-decimal/ You can take the raw SCN and substitute it below… scn=0x0623.02021908;echo $((${scn%%.*}*4294967296+0x${scn##*.})) »
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... »
CLUSTERING_FACTOR
I had to analyze a performance problem this morning, and it occurred to me it is a good example of troubleshooting queries impacted by the clustering_factor of an index. As such, below is the email exchange. I took a look, and I think I understand why the query optimizer is choosing a full scan and... »
Converting lock modes to determine what the root cause is
Take name|mode print hex(1415053316) …and convert to hex… 0x54580004 …then take the first two, second two, and last four values to get the reason code. 54 in hex = T 58 in hex = X and 0004 = 4. This lock was caused by the same unique key values being inserted (or attempting to) by multiple sessions. »
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 ... »
Troubleshooting “library cache lock”
If you have several users waiting on a library cache lock, they are normally blocked by one user that is waiting on a library cache pin. You have to find out who is blocking the user waiting on the library cache pin and find out what they are doing. Our test case performs the following... »