#!/bin/ksh
#
#  This script turns on/off tracing a selected uset shadow process.
#  You must have oradbx installed before this script will run.
#
#  usage: trace.sh pid <off>
#
if [ "$2" != "off" ]; then

oradbx <<EOD
debug $1
event 10046 trace name context forever, level 12
exit
EOD

else
oradbx <<EOD
debug $1
event 10046 trace name context off
exit
EOD

fi