Dave's Software and Hardware Projects

I make unpleasing sequences of 0s and 1s into pleasing sequences of 0s and 1s. 

Dave

Historical Row Counts via Stats History

Ever had a customer asking about the growth of a table? Or suspect an execution plan change might be because of an influx of data into a table? Well you are in luck (maybe!). Oracle 10g and 11g have a months worth of historical statistics…

Dave

TPC-DS

"The TPC-DS benchmark models the decision support system of a retail product supplier, including queries and data maintenance. Although the underlying business model of TPC-DS is a retail product supplier, the database schema, data population, queries, data maintenance model and implementation rules have been designed…

Dave

Moving on up... http://dba.stackexchange.com/

Was cruising StackOverflow today looking for interesting Oracle questions and noticed a DBA specific Stack has been started - it lives at http://dba.stackexchange.com/. It is database agnostic but I love the Stack setup and the helpful people it attracts. You can filter by Oracle and…

Dave

Using Proxy Connections with SQL Developer or SQLPLUS

When trying to debug for another user sometimes it is helpful to be able to log in as that user. In the past magic was done by admins by storing the encrypted passwords, setting to a new temporary password, logging in, and then resetting the…

Dave

Developer access to 10046 trace files...

Jeremy Schneider posted his code to check the udump directory for trace files and allow remote to access them. Great for developer access or if you are automating access with a tool. Released as GPL as well so you are free to modify the code…

Dave

Functions in the WHERE clause...

Business logic. Sometimes it lives in the application, sometimes it lives in the database. I'll save the application/db argument for each individual case that I encounter. But if you do have significant business logic in your database, there will probably come a time when someone…

Dave

Did you know... Writing to the Oracle RDBMS alert log?

Came upon this post during my travels. Jonathan Lewis reveals how to write a string to the Alert Log, Current Session Trace File, or Both. Also a few misc functions are included. dbms_system.ksdwrt(1,'test') writes to alert log dbms_system.ksdwrt(2,'test') writes to session's trace file dbms_system.ksdwrt(3,'test') writes…

Dave

Pesky .nfs files showing up in my directory - what are they?

> du .nfs* 0 .nfsFCE32 0 .nfsFDE93 0 .nfsFE2E 195048 .nfsDDE4 757032 .nfsE9BC11 .nfsxxxxx files are orphaned files that were deleted from an NFS mount but are still in use by a process. Once the final process using the file releases its file handle the…

Dave

WHERE column IS NULL and index usage...

I have a customer with a million row 125mb table. A query they are running returns very slowly: explain plan for SELECT * FROM BIGTABLE WHERE col1 IS NULL; SELECT * FROM TABLE(dbms_xplan.display); -------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes |…

Dave

Finding Query Block names for a SQL that you can't modify...

I recently had an issue where a query being submitted to the database had a large change in performance. I could attribute the change to a recent change in object statistics, but the query wasn't behaving because of a combination of a view, subquery, UNION,…