Scripto - rbogusze/oracleinfrastructure GitHub Wiki

Depot for frequently used scripts.

The need is pretty obvious. It is usefull to have a location where all the favourite scripts are stored, that can be centrally synchronized and used by varius bash and SQL scripts.

I call this one ‘scripto’ and place it always in HOME directory. It is called ‘scripto’ to diferenciate it from ‘scripts’ name which is sometimes found.

$ cd
$ svn checkout https://github.com/rbogusze/oracleinfrastructure/trunk/scripto
$ cd 

If going through proxy provide the proxy address in svn configuration for the whole system:

# vi /etc/subversion/servers
[Global]
http-proxy-host=proxy.example.com
http-proxy-port=3128

Or just locally for the current user

$ vi ~/.subversion/servers
http-proxy-host=proxy.example.com
http-proxy-port=3128

Following projects use extensively from this depot, but I also use it for frequently used SQL scripts.

Together with variable SQLPATH I can run the SQL scripts in SQL\*Plus.

$ vi .bash_profile
SQLPATH=$HOME/scripto/oracle/sqlbin
export SQLPATH

NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
export NLS_DATE_FORMAT

EDITOR=vim
export EDITOR

SQL> @tbs
Show size of tablespaces

Tablespace Name 	       TBS_FULL   total_space(MB) Free_space(MB)
------------------------------ ---------- --------------- --------------
UNDO2			       1.68		      465	     457
SYSAUX			       90.99		      612	      55
SYSTEM			       98.97		      790	       8
USERS			       99.03		      186	       2

Some of the scripts explained

tbs.sql Show size of tablespaces
users.sql User session details
active.sql Active session with sql text
⚠️ **GitHub.com Fallback** ⚠️