oracle script run in unix shell [message #340202] |
Mon, 11 August 2008 23:09 |
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 #343224 is a reply to message #340202] |
Tue, 26 August 2008 12:28 |
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
|
|
|