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: How to start a Stored Procedure directly from Unix shell skript ?

Re: How to start a Stored Procedure directly from Unix shell skript ?

From: Pete Sharman <peter.sharman_at_oracle.com>
Date: 11 Mar 2003 19:49:54 -0800
Message-ID: <b4map201q21@drn.newsguy.com>


In article <73e20c6c.0303111611.6062b548_at_posting.google.com>, wizofoz2k_at_yahoo.com.au says...
>
>norwoodthree_at_my-deja.com (NorwoodThree) wrote in message
>news:<ba03e2c.0303111125.46599b00_at_posting.google.com>...
>
>> The best practice approach is to create a dbms_job.
>
>With the demise of command line SQL+ in a near future version,
>this might actually be the only option left!!!
>How the heck are people gonna be able to include Unix scripts
>into their DB work remains to be seen... Oh well, I'm sure
>someone will "re-invent" SQL+ as a J2EE EJB, or some other crap!

Nuno

You must know more than I do. I haven't seen any reference to command line going away, other than in Howard's dreams. :)

Commnad line has got to be there. How else are we ever going to handle automated scripts, including backups and so on?

Pete
>
>
>>
>> However, if you absolutely must use a UNIX script, here is an example:
>>
>> $ORACLE_HOME/bin/sqlplus -s /nolog << EOF
>> connect / as sysdba
>> SELECT count(*)
>> FROM dba_tablespaces;
>> exit;
>> EOF
>>
>> Substitute the connect / as sysdba for username and password. It is
>> not good practice to hardcode usernames and passwords in your Oracle
>> scripts, so use your method of choice to obscure them.
>
>
>This is actually my preferred solution, by far. And the one I always
>use. It is not a good idea to put a uid/pwd in a Unix command line.
>It shows to anyone who can do a "ps -ef" command. Not the best way
>to hide a pwd! And hiding "ps" itself like I've seen done in many places
>is totally unnecessary.
>
>
>This is a much better way. The uid/pwd can be inside the script
>itself, which in turn can be "chown"'ed and "chmod"'ed so no one
>can read it. Beter yet: put all these scrips into a directory with
>only "x" access right granted to others. This way, no one can
>even "ls" the name of the script let alone read it!
>And no pwd anywhere in command line: just about as perfect as can get.
>Very well done.
>
>Cheers
>Nuno Souto
>wizofoz2k_at_yahoo.com.au.nospam

HTH. Additions and corrections welcome.

Pete

SELECT standard_disclaimer, witty_remark FROM company_requirements; Received on Tue Mar 11 2003 - 21:49:54 CST

Original text of this message

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