Home » Infrastructure » Unix » oracle script run in unix shell (9.2.0.8)
oracle script run in unix shell [message #340202] Mon, 11 August 2008 23:09 Go to next message
udara
Messages: 9
Registered: July 2008
Location: COLOMBO
Junior Member
dear all,
i need to automate a script to run in oracle and output is to be mail in given period of time..

ex. need to execute in unix script xxxx.sh. but in script must exist first login to oracle and run scrit and return the outpout.

How to get it with colum header

pls replay any one who know about it
thanks
UDA
Re: oracle script run in unix shell [message #340203 is a reply to message #340202] Mon, 11 August 2008 23:10 Go to previous messageGo to next message
udara
Messages: 9
Registered: July 2008
Location: COLOMBO
Junior Member
this os SOLARIS 5.9.OS
Re: oracle script run in unix shell [message #340207 is a reply to message #340202] Mon, 11 August 2008 23:26 Go to previous messageGo to next message
BlackSwan
Messages: 23059
Registered: January 2009
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & FOLLOW the Posting Guidelines as stated in URL above
Re: oracle script run in unix shell [message #343224 is a reply to message #340202] Tue, 26 August 2008 12:28 Go to previous message
prtz
Messages: 11
Registered: January 2008
Junior Member
Maybe something like this.
$
$ cat orascript.sh
sqlplus -s /nolog <<EOF >test.log
connect test/test
select sysdate from dual;
EOF
$
$ . orascript.sh
$ 
$ cat test.log
SYSDATE
---------
26-AUG-08
$


Add the shebang at the top, specifying your shell.

prtz

Previous Topic: Log messages in custom shell script from custom printer
Next Topic: Oracle CIS Hardening Standards for UNIX
Goto Forum:
  


Current Time: Thu Nov 27 02:34:38 CST 2014

Total time taken to generate the page: 0.12828 seconds