Skip to content

SQL Scripts Related to Oracle, Please see README below for more details

Notifications You must be signed in to change notification settings

as10128/Oracle_SQL_Scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oracle_SQL_Scripts

SQL Scripts Related to Oracle. Most of them work on 10g+ and some on 12c. There are some scripts that get information from Recovery Catalog as well, so you have to be connected to catalog.

Please note some script have been taken from others who have opened sourced it (for example the more popular ones like snapper from Tanel and xplan_ash from Randolf, etc..) and some are my own. This is just a curated list that I have put together that I use from day to day.

Due to the sheer number of scripts, it was hard for me to remember name of every single script so I created another script(help.sql) to keep track of all the other script.

Once logged into a database(10g+), you can run @help.sql as shown below. Here I am looking for anything(like statement) that has "sess" in the script name.

alt text

Quick description of what each column mean above.

MY SCRIPT NAME = obviously the script name itself

DESCRIPTION = short description of what the script is suppose to do

INPUT = any input required when running the script. In the above screen shot, if we were to run "perf_session_wait", we would need to pass in the session ID(SID)

Next example shows running help file and searching for anything that has "users" in the script name.

alt text

Next example shows running help file and searching for anything that has "trend" in the script name.

alt text

Next example shows running help file but we hit enter(no input) and that will spit out all the script names (300+)

alt text

Please note that the help.sql file is not being updated automatically, if we were to add a new script to this repo we will have to manually go in and update the help.sql file to put in the script name, description and if any input is required or not. I am sure that part can be automated as well.

About

SQL Scripts Related to Oracle, Please see README below for more details

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PLSQL 96.9%
  • SQLPL 2.1%
  • Python 0.6%
  • Shell 0.2%
  • HTML 0.2%
  • DTrace 0.0%