System management for Oracle DBAs  

home
Up
apps scripts
sql scripts
unix scripts

 

Oracle SQL Scripts

lockmon.sql - An oldie but a goodie. This is still my favorite script and it duplicates the output of Enterprise Manager. Excellent for showing the objects and rollback segments involved.  Its recently been improved to handle blockers/waiters more accurately and has been sped up.
lockmon10g.sql - 10g version of lockmon. This adds the blocking session column added to v$session in Release 10g.
dispactive.sql - Query to display details of active sessions.  Very useful for finding the SID, Serial# and SPID of an Oracle session.
dispusr.sql - Query to display details of all sessions. Very useful for quickly finding the SID, Serial# and SPID of an Oracle session.
topsessions.sql - List top database sessions based on their "rates".
waits.sql - Show session waits (current and cumulative).
libcache_lock.sql - Nice script to display library cache lock/pin blockers and waiters.
objcache_dep.sql - A query that will map library cache objects back to user sessions.  Very useful if you've ever tried to compile a package and been hung on a "library cache lock".
libcache_pin.sql - A query to help determine which objects should be pinned based on the objects currently loaded in the library cache.
tsmap.sql - Tablespace space map, dynamic SQL to handle autoextending tablespaces.  This has been fixed to handle datafiles that are manually resized larger than the MAXSIZE setting.  Tablespace totals have been recently added.
tsmap9i.sql - Tablespace map using just SQL. For Oracle 9i and higher.
ts_storage8i.sql - Display tablespace storage info for an 8i database.  Includes support for locally managed tablespaces.
asm_info.sql - Query to display ASM information.
sess_info.sql - Maps Oracle user session information.
xpln.sql - Insert your SQL and run to get an explain plan.
xpln92.sql - Same as xpln.sql, but uses the new 9.2 dbms_xplan package.
xpln_cursor.sql - Display an explain plan for an active SQL statement.
trace_db_logon.sql - Enable event 10046 tracing at logon by creating a database logon trigger. Useful for tracing all sessions.
trace_logon.sql - Enable event 10046 tracing at logon by creating a logon trigger. Useful for tracing a single user.
trace_session.sql - Enable event 10046 tracing at the session level.
trace_user_on.sql - Enable event 10046 tracing for another database session. Use dispusr.sql script to determine the SID and SERIAL#.
trace_user_off.sql - Disable event 10046 tracing for another database session. Use dispusr.sql script to determine the SID and SERIAL#.
cpu_test - Script to generate a theoretical maximum number of logical I/Os on a single CPU.
session_time.sql - Script to format v$sess_time_info.
recovery_file_dest.sql - Display v$recovery_file_dest space usage.
unloader.sql - A modified version of Tom Kyte's PL/SQL unloader script. It is also available on Tom's site here.
   

Copyright © 1998-2008 AppsDBA Consulting. All Rights Reserved.