Category: Oracle

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,…

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…

cx_Oracle cursor fetching behaviour

I have noticed this over the past few months, and think I still may be missing something. Given the following code… #!/home/oracle/local/bin/python import cx_Oracle import sys con = cx_Oracle.connect(“howards”,”******”,”perfrac”) con.cursor().execute(“alter session set events ‘10046 trace name context forever, level 12′”);…

Fire! Fire! Fire!

If you find yourself in the middle of a hung database, you can do what follows (see Metalink for additional information) Can login to the database alter session set events ‘immediate trace name SYSTEMSTATE level 10’; –three time waiting five…

SQL Bind Capture – Part 3

I needed to find out which variables were producing a poor execution plan. Short of enabling 10046 trace with binds enabled, I found the following is a good approximation. Basically: 1. Find the PLAN_HASH_VALUE for the SQL_ID with the poor…

Using a cursor variable in SQL*Plus

Below is a simple example of opening a cursor variable in SQL*Plus and then printing its contents. DBA’s can use this if they are not PL/SQL proficient to do some simple test casing with developer cursor code. SQL> variable b…