We have an active/passive data center setup. We replicate the database data using GoldenGate, and maintain the application software through regular build processes. ATG publishing is included in the database data, and the targeter files are maintained via rsync. We…
Category: Python
Python implementation of luhn algorithm
The luhn algorithm, or mod 10, was developed by an IBM scientist in the 1950’s. To a large extent it is still used today to validate credit card numbers in front end applications. If you think back to your high…
Python script to print blocking threads that are not blocked themselves
There are a lot of GUI tools to process the call stacks for a “thread dump” taken on a running JVM. This is just a command line tool to do it, which is normally where I start troubleshooting when there…
Python dig query
Nothing much, just a script to walk the tree for a given name. It starts at a CNAME and walks its way all the way down to the A record and IP address. In the context of larger script that…
Monty Hall simulation in python
The Monty Hall problem, or paradox as it is sometimes known, has always intrigued me, so much so that I wrote a python based simulator to prove it to be true or false. The crux of it, and as its…
Weblogic WLST – Accessing OS variables
As with all thing wlst, almost everything you can do in python you can do in wlst. Below is just a simple example of accessing host variables from inside of weblogic. [sa-weblogic@cmhldecomadm01 Middleware]$ export FOO=”BAR” [sa-weblogic@cmhldecomadm01 Middleware]$ ./Oracle_Home/oracle_common/common/bin/wlst.sh Initializing WebLogic…
Why isn’t my cursor being shared?
This is a decent way to determine why a cursor isn’t being shared, resulting in cache locking during parsing (134 minutes total yesterday, which is very high historically)… SQL> select count(*),sql_id from gv$active_session_history where event = ‘library cache lock’ group…
Getting count of sessions created by minute
In the wake of a flood of 24,000 application server sessions created per minute at the start of Black Friday week, we wanted to share how we calculated how many sessions were created per minute. This can be obtained from…
Additional cursor trace information in 11.2.0
Oracle has added a lot of additional trace output in the 10046 optimizer trace files. As I have posted previously, I find the output in these files to be useful not only for troubleshooting performance issues, but also understanding the…
Querying load balancing information from the Load Balancing Advisory
I use what is below to periodically gather what the load balancing advisory posts. The data reflects the percentage of connections to distribute to each instance for a given service in a RAC. #!/home/oracle/local/bin/python import cx_Oracle, string conn = cx_Oracle.connect(mode…