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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQLPlus scripts in Unix

Re: SQLPlus scripts in Unix

From: hazledid <david.hazledine_at_roche.com>
Date: Thu, 03 Jun 1999 17:15:30 GMT
Message-ID: <SKy53.1902$Xr4.16447@c01read02-admin.service.talkway.com>


Another approach is to store the username/password in a file to which only privileged o/s users have read access. Ensure that CRON schedules a shell script to run
under one of these users, and write the script so that SQL*Plus reads the username/password as a here-document. Something like this:

sqlplus @report.sql <<!
$(cat usrpwd.txt)
!

DO NOT write the script so you read the username/password into an environment variable and then substitute that variable on the SQL*Plus command line,
because anyone who issues a "ps" command while SQL*Plus is executing will see your password in plain text!

David J. Hazledine
Roche Products Limited
40 Broadwater Road
Welwyn Garden City
AL7 3AY
United Kingdom
Registration Number 100674

E-mail: david.hazledine_at_roche.com
Fax: +44 (0)1707 325666
Tel: +44 (0)1707 366166
--
Posted via Talkway - http://www.talkway.com Exchange ideas on practically anything (tm). Received on Thu Jun 03 1999 - 12:15:30 CDT

Original text of this message

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