Oracle: Useful scripts


Standard disclaimer: Use the information that follows at your own risk. If you screw up a system, don't blame it on me...
mailto: dkoleary@olearycomputers.com

Name Purpose Origin
id_rbs.sql IDs who is using rollback segments Oracle 8i DBA Handbook, pg 292
id_change.sql IDs database objects that have changed in the last day Oracle DBA 101 page 149
ts_map Creates html tablespace map. Useful for ID'ing fragmented free space, tablespaces, and inappropriate use of tablespaces. Modified version of script in Oracle 8i DBA Handbook; perl script courtesy of yours truly
rotate_alert Moves alert logs to ${log}.${date} & emails it to me. Ya
redo_stats.sql Checks on the status of redo logs Oracle DBA 101, page 111.
rbs_optsize.sql Checks on the optsize, # of shrinks, extends, and avg shrink size for redo logs Oracle DBA 101, page 125/127.
ts_size1.sql Shows space for each tablespace, allocated, used, free and % available and sums the applicable columns. Very clean display, although you might consider converting to K or megs for larger databases. Greg Vitetzakis posted this on comp.databases.oracle.misc 03/01/01.
ts_size2.sql Shows free, allocated, and remaining space by tablespace. I've already converted the bytes to K. Slightly modified version of the script on page 174 of the Oracle DBA 101
show_locks.sql Shows oracle user, os user, session ID, PID and locked object. Useful for tracking down miscreants who won't release their locks Concept came from Oracle DBA 101; however, logic and coding is all mine.
id_fk_refs.sql Shows what table, constraint, and column name a foreign key references. My response to a comp.databases.oracle.misc newsgroup query on/about 06/14/01
ts_util.sql Displays utilization stats for tablespaces; shows allocated, used, and free space in megabytes and the number of extents and free block_ids in order to get an idea of fragmentation. I did the work; although I had to get the concept of the inline view from Sybrand Bakker from a posting in comp.databases.oracle.misc on/about 07/19/01
Tablespace utilization scripts A set of scripts that uses ts_util.sql, a perl script, and location of the Oracle alert log to display database maintenance information in html format. The script then emails the result to a specified user(s) Mine; although check the credit on ts_util script above.

Document:
URL:
Last updated: