Home / Tag Archives: Oracle

Tag Archives: Oracle

Script to check tablespace usage.

This script checks for tablespace usage. If tablespace is 10 percent free,  it will send an alert e-mail. ##################################################################### ## ck_tbsp.sh ## ##################################################################### #!/bin/ksh sqlplus -s <<! oracle/$1@$2 set feed off set linesize 100 set pagesize 200 spool tablespace.alert SELECT F.TABLESPACE_NAME, TO_CHAR ((T.TOTAL_SPACE – F.FREE_SPACE),’999,999′) “USED (MB)”, TO_CHAR (F.FREE_SPACE, ‘999,999’) “FREE (MB)”, TO_CHAR (T.TOTAL_SPACE, ‘999,999’) “TOTAL (MB)”, TO_CHAR ((ROUND ((F.FREE_SPACE/T.TOTAL_SPACE)*100)),’999′)||’ …

Read More »