The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 03-06-2006
tmarikle tmarikle is offline
Registered User
 

Join Date: Jan 2005
Posts: 682
An alternative is:
Code:
echo $PSWD | sqlplus "sys@$AUXILIARY_SID as sysdba" @shutdown.sql
or you can use a named pipe:
Code:
mknod p sysdba_logon.sql
echo "connect sys/$PSWD@$AUXILIARY_SID as sysdba" > connect.sql &
sqlplus <<-EOF
@connect.sql
@shutdown.sql
EOF
rm connect.sql
Reply With Quote