#!/usr/bin/ksh SQL=smenu_large_object_in_mem OWNER= ROWS= ORDER=" order by 5 desc" LEN=50 minvalue=0 # ------------------------------------------------------------------------------------ function help { cat < # display caracters for cursors text lom -s # limit display objects larger than bytes lom -i [-u OWNER] # List objects in memory that are either pinned or lock lom -u [-e|-l|-n] # restrict display to rows of Options: -e sort by executions -l sort by loads -n sort by name] -r to limit display to rows EOF exit 0 } # ------------------------------------------------------------------------------------ if [ -z "$1" ];then help fi while getopts u:s:ielnt:r: ARG do case $ARG in e ) ORDER=" ORDER by executions desc" ;; l ) ORDER=" ORDER by loads desc" ;; n ) ORDER=" ORDER by name" ;; i ) PINNED=" and pins > 0 or locks > 0 " ;; u ) OWNER=" and OWNER = upper('$OPTARG') " ;; r ) ROWS=" where rownum < $OPTARG " ;; t ) LEN=$OPTARG ;; s ) minvalue=$OPTARG ;; *) help ;; esac done cd $SBIN/tmp . $SBIN/scripts/passwd.env . ${GET_PASSWD} $S_USER $ORACLE_SID if [ "x-$CONNECT_STRING" = "x-" ];then echo "could no get a the password of $S_USER" exit 0 fi HOST=`hostname` HOST=`echo $HOST | awk '{ printf ("%-+15.15s",$1) }'` sqlplus -s "$CONNECT_STRING" < $minvalue $PINNED $OWNER $ORDER ) $ROWS / prompt prompt exit EOF