Or you can set the password in a Unix variable, then do this:
echo $PASSWORD | sqlplus [Email Address Removed] Message-----
From: Danut
[mailto:oracledba-ezmlmshield-x4878979.[Email address protected]
Sent: Thursday, September 30, 2004 9:28 AM
To: LazyDBA Discussion
Subject: RE: Crypt/Decrypt or hiding password
Hi,
Also you can user crypt utility on Sun to encrypt a password in a file.
For the exp/imp utility use a parameter file and inside the parameter file
store the username/password.
For the sqlplus you can do the same thing, start the sqlplus with nolog
option and inside the script use the connect command. See bellow
sqlplus /nolog @t.sql
and inside t.sql
connect username/[Email Address Removed] Pilkington "
<oracledba-ezmlmshield-x28385751.[Email address protected]
09/30/04 01:03 AM
To: "LazyDBA Discussion" <[Email address protected]
cc:
Subject: RE: Crypt/Decrypt or hiding password
why don't you create a user which is externally identified
ie
SQL> CREATE USER OPS$SCOTT IDENTIFIED EXTERNALLY;
You must set the database initilization parameter os_authent_prefix =
"ops$"
With this user created and this parameter set you can connect to the
database with a "/"
in this example, you have logged into unix as the user scott
to connect into SQL*Plus type
$ sqlplus /
or for export
$ exp / file=expdat.dmp
this will connect to the database as the users ops$scott
Does this make sense?
Darren Pilkington
Database Administrator
Tattersall's Database Administration
-----Original Message-----
From: edwinuy
[mailto:oracledba-ezmlmshield-x33593404.[Email address protected]
Sent: Thursday, 30 September 2004 1:14pm
To: LazyDBA Discussion
Subject: Crypt/Decrypt or hiding password
Hi all,
AM pretty sure there's heaps of UNIX fans in this forum ... does anyone
have any script, preferably Korn Shell, that implements the use of
passwords to run exp and sqlplus?
Basically, I want to convert my export scripts so that the passwords and
users are going to be obtained from some kind of password file instead of
how they are now, where I run exp and sqlplus using username/password and
when users do a ps -ef, they will see what usernames and passwords are
used.
Cheers,
EDWIN ONG UY
UNIT 4,64 GRANGE ROAD
MT EDEN 1003
AUCKLAND, NEW ZEALAND
Email: [Email address protected]
Mobile: 64-021-622092
-------------------------------------
This email is intended solely for the named recipient/s and as such is
confidential and may contain information that is privileged. If you have
received it by mistake, please notify the sender. You must not use, copy,
distribute or disclose its contents to anyone other than the addressee.
This email and any attachments might not be free from computer viruses or
other defects.
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
**********************************************************************
CONFIDENTIALITY NOTE:
This e-mail is intended only for the use of the individual or entity
named above and may contain information that is confidential and
privileged. If you are not the intended recipient, you are hereby
notified that any distribution, copying or dissemination of this
e-mail is strictly prohibited. If you have received this e-mail in
error or are not the named recipient, please notify us immediately
by return e-mail or telephone +61 3 8517 7777 and destroy
the original message. Thank you
**********************************************************************
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any
attachments is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete the material from any
computer.
Oracle LazyDBA home page