Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Calling sqlplus or plsql code from ksh

Re: Calling sqlplus or plsql code from ksh

From: Snid <snid_at_snider.sno>
Date: Mon, 23 Feb 2004 11:57:22 +1000
Message-ID: <c1bmm4$qk9$1@bunyip.cc.uq.edu.au>


You are correct. I never specify passwords on the command line, instead I log on with OS authentication as sysdba.

Like this

sqlplus '/ as sysdba' <<ANYTHING
spool $logfile
shutdown $mode;
spool off
exit
ANYTHING However, I just found the link to the unix script and posted that instead of our custom scripts.

"Burt Peltier" <burttemp1ReMoVeThIs_at_bellsouth.net> wrote in message news:NThZb.11213$c14.8705_at_bignews6.bellsouth.net...
| The code below is good, but I am fairly certain there is the potential
| security risk that someone on the same Unix machine could do a ps command
| and see the process and it's commands, such as the username/password .
|
| To hide this, you can pass it as the first line with no connect command
...
| doing this from memory but I am fairly certain this revised code would
hide
| this info:
|
| sqlplus -s >/dev/null 2>&1 <<EOF
| monitor/oramon
| whenever sqlerror exit 1
| select * from dual;
| -- If we can not connect or select, we will not return 0!!!
| exit 0
| EOF
|
| --
|
| "Snid" <snid_at_snider.sno> wrote in message
| news:c144ao$6a5$1_at_bunyip.cc.uq.edu.au...
| > Check out the sqlplus line
| >
| > sqlplus -s >/dev/null 2>&1 "monitor/oramon" <<EOF
| > whenever sqlerror exit 1
| > select * from dual;
| > -- If we can not connect or select, we will not return 0!!!
| > exit 0
| > EOF
| >
| >
| > http://www.orafaq.com/scripts/unix/wait4ora.txt
| >
| > More scripts here
| > http://www.orafaq.com/scripts/index.htm#UNIX
| >
| >
| >
| > <capitaldog_at_hotmail.com> wrote in message
| > news:cc72d8ab.0402191948.49c839c8_at_posting.google.com...
| > | Can you guys show me some of the ways to run sql code from ksh
scripts.
| > |
| > | Thanks,
| > | dog
| >
| >
|
|
Received on Sun Feb 22 2004 - 19:57:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US