Latest Story

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

Using awk with group by functionality

Thursday, August 12, 2010
By Steve

You can use the following example if you need to total numbers over a group in a given file. We first show our sample file… 14:30:57 oracle@emgrid01 ~ >cat list.txt steve:61 steve:14 becky:57 steve:19 jenna:69 stephen:57 maddie:54 jenna:53 abby:41 jenna:21 jenna:66 jenna:64 stephen:53 stephen:26 jenna:77 steve:46 maddie:39 steve:32 abby:77 jenna:97 …and then show the totals using awk… 14:30:59 oracle@emgrid01 ~ >awk -F ":" '{a+=$2} END {for (i in... »

Python script to print out table data in name/value pairs

Friday, August 6, 2010
By Steve

Simple today. I just wanted to ensure I had this in case I need to cut and paste it later #!/home/oracle/local/bin/python import cx_Oracle, string connection = cx_Oracle.connect(mode = cx_Oracle.SYSDBA) cursor = connection.cursor() cnt=cursor.execute("select * from v$database") colcount=len(cnt.description) for row in cursor.fetchall(): print "-----------------------------------------------" for col in... »


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

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

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##*.})) »

Switch to our mobile site