The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 04-28-2008
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 500
Like ...

su - user -c "myscript.sh"

And in myscript.sh you'd have something like (perhaps) ...

...
sqlplus /as sysdba @myscript.sql
...

And lastly, in myscript.sql you'd have (or similar) ...

select name from v$database ;

Anyways, hope that helps some

Cheers,
Cameron