Showing posts from 2015Show All

Find Out Invalid Database Objects

Find Out Invalid Database Objects The following finds out invalid database objects: #####################################################################          ## invalid_object_alert.sh ## #####################################################################  … Read more

Check Tablespace Usage

Check Tablespace Usage This scripts checks for tablespace usage. If tablespace is 10 percent free,  it will send an alert e-mail. ##################################################################### ## ck_tbsp.sh ## ###############################################… Read more

Clean Up Old Archived Logs

Clean Up Old Archived Logs The following script cleans up old archive logs if the log file system  reaches 90-percent capacity: $ df -k | grep arch Filesystem                kbytes   used     avail    capacity  Mounted on /dev/vx/dsk/proddg/archive 71123968 302102… Read more

Check Alert Logs (ORA-XXXXX)

Check Alert Logs (ORA-XXXXX) Some of the environment variables used by each script can be put into one  profile: ####################################################################### ## oracle.profile ## ##########################################################… Read more

Check Oracle Listener's Availability

Check Oracle Listener's Availability   A similar script checks for the Oracle listener. If the listener is down, the  script will restart the listener: ####################################################################### ## cklsnr.sh                      … Read more

Check Oracle Instance Availability

Check Oracle Instance Availability The oratab file lists all the databases on a server: $ cat /var/opt/oracle/oratab ################################################################### ## /var/opt/oracle/oratab                                        ## ##########… Read more

UNIX Basics for the DBA

UNIX Basics for the DBA   UNIX Basics for the DBA Basic UNIX Command The following is a list of commonly used Unix command: ps - Show process grep - Search files for text patterns mailx - Read or send mail cat - Join files or display them cut - Select col… Read more

How to run SQL in shell script

How to run SQL in shell script   #!/bin/ksh variable1 = $ ( echo "set feed off set pages 0 select count(*) from table; exit " | sqlplus - s username / password@oracle_instance ) echo "found count = $variable1"   -----------------------… Read more