Oracle OCM preparation
Home
OCM Topics
OCM preparation
Work
Usefull scripts
Other
...
Here you can find some sql script I use for everyday work as DBA.
Active users and their SQL
Audit the DDL on schema or database level
Get the segment name from the corrupted block number
Buffer cache usage
Create new user like copy of existent user
Database space usage script nad job
Info about all datafiles
Info about datafiles in tablespace
Locked objects and lock types
Downsize of the datafiles
Email with attachement
Everything about the table
Execute unix command from sql
Execution plan of currently running SQL
Explain plan for SQL statement
Info about connected users
Invalid objects and why they are invalid
10 largest objects in the database
Locked objects
Few SQL's about locking
Log errors in database
Logminer
Long running transactions
Remaining time of long running transactions
Get the metadata of the object
Users with most sorts
Online reorganization of table
Recover database with lost redologs
Recreate index
Recreate table
Redologs history
Get the HWM of datafiles
Info about jobs from dba_jobs
Segment advisor
Segments that cannot extend 2 times
Show hidden parameters
Startup history
Free space in the tablespaces
Temp space usage
Temp space used by users
Write alert to alert log
Zip trace files
Create scott schema