Month: August 2010

Using awk with group by functionality

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…

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

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…

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…