Oracle

A simple example of a custom component managed by CRS

Friday, August 27, 2010
By Steve

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

Friday, August 6, 2010
By Steve

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

Saturday, July 17, 2010
By Steve

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

Tuesday, June 15, 2010
By Steve

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

Monday, June 7, 2010
By Steve

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

Sunday, June 6, 2010
By Steve

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

Tuesday, May 4, 2010
By Steve

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

Monday, March 15, 2010
By Steve

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

Thursday, February 11, 2010
By Steve

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”

Wednesday, January 27, 2010
By Steve

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... »

Switch to our mobile site