Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Hiding passwords

RE: Hiding passwords

From: Reardon, Bruce (CALBBAY) <>
Date: Tue, 23 Sep 2003 17:14:47 -0800
Message-ID: <>

Not saying this is elegant or does the same thing yet but couldn't you do something like this: "
C:\Temp>copy con: pwd.txt
orcl tiger !my Orcl instance

        1 file(s) copied.

C:\Temp>type pwd.txt
orcl tiger !my Orcl instance

Instance is [orcl]
pwd is [tiger]

C:\Temp>type get_pwd.bat
FOR /F "tokens=1-2 delims= eol=!" %%i IN (pwd.txt) DO call :get_pwd %%i %%j

GOTO :end


   (SET theinst=%1)
   (SET thepwd=%2)

   ECHO Instance is [%theinst%]
   ECHO pwd is [%thepwd%]


   (SET theinst=)
   (SET thepwd=)


Enhance the batch to take some parameters and enhance get_pwd subroutine to search for that which matches the parameters.

Anyway hope this is of use to some.
Bruce Reardon

-----Original Message-----
Sent: Wednesday, 24 September 2003 9:45 AM

there is no equivalent for this: MY_PASSWORD=$( -instance dv01 -username scott)

Simple in ksh, impossible in un-enhanced Windohs.

That previous bit is something I use in several cron jobs for retrieving passwords, as well as command line logins to several databases as many different users.

To do this in Windohs, you must embed the entire job in Perl.

HTH Jared

Wolfgang Breitling <> Sent by:
 09/23/2003 03:29 PM

I don't quite get that. Why can't you set a local environment variable from a script? If you could, where do you propose to get the value that you want to put into an environment variable?

At 01:59 PM 9/23/2003 -0800, you wrote:

>Any chance these scripts could be run from Cygwin, Uwin, MKS Toolkit,
>or anything that will let you use a korn shell?
>That would simplify things tremendously.
>One of the problems with Windohs is that you cannot execute a script
>or program so that it can return a value to a local environment variable.
>That ability would make this task simple from
>Another possibility is to put your passwords in the registry, restrict that
>portion of the registry, ( or the whole thing ), and use a Perl script to
>the passwords and kick off the other jobs.
>What I do in linux is use a password server ( as seen in "Perl for Oracle
>and retrieve the password across the network, encrypted of course.
>This works on windows as well, though you're there restricted to doing this
>strictly from within the Perl script.

Wolfgang Breitling
Oracle7, 8, 8i, 9i OCP DBA
Centrex Consulting Corporation

Please see the official ORACLE-L FAQ:
Author: Reardon, Bruce (CALBBAY)

Fat City Network Services    -- 858-538-5051
San Diego, California        -- Mailing list and web hosting services
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Sep 23 2003 - 20:14:47 CDT

Original text of this message