Oracle Scripts
Database Administrators and consultants usually posses a set of scripts that they accumulate over a number of years, these become the tools of their trade. At TRU (UK) we would like to share some of the scripts that we find useful and use repeatedly.
User Creation and Privileges
User Creation and assignment of Roles Creation of a typical schema role
Script to show all privileges for all users Scripts to show Roles Granted to Users
Script to show Roles granted to other Roles Database trigger to set default session for User
Tablespaces, Datafiles, Rollback Segments
Tablespace Details Database Datafiles
Tablespace Freespace Database files needed for an Oracle Instance
Rollback Segments Redo Logs location and utilisation
Tablespace Quota and Usage Datafiles, Free Space and Status
Memory Structures
Show SGA Stataistics Show Memory Usage for Sessions
Database Schemas And Objects
Display All Details about Table Packages in Shared Pool / Pinning Candidates
Tables,Iindexes, Tablespaces and Extents Row Count of all the Tables in a Schema
Schema Statistics Generation History Identify Poorly Performing SQL
Analyzed tables with un-analyzed indexes Invalid Objects in the Database
Database Performance Tuning Scripts
Database Uptime Oracle Process Details for Given Unix PID
Check Instances initialization parameters Show Unix Process details for a SID
Shows active (in progress) Transactions Database Sessions using Rollback Segments
 

 

Banner 10000051banner