Solved

Userid Passwd from a plsql code to shell script

Posted on 2011-03-17
4
511 Views
Last Modified: 2012-05-11
I submit a job using dbms_scheduler which invokes a shell script that connects to database.
I pass the userid and password to shell script as arguments via the job.
But when I do ps - ef ... I can see the username and password being displayed on screen...

I have two questions:
1. What should I do to avoid the display of password by executing ps -ef .
2. As I am already connected to the database, can I directly send the user id and password to shell without specifying it manually.. i.e. Currently I send the user id and password hardcoded in my job arguments... If the password changes in future, I need to change my code too.. Is there a way where I do not have to send the hard coded user id and password from plsql.
0
Comment
Question by:sanpradeep
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:MrNed
ID: 35163021
I usually have a config file stored somewhere securely on the server with username/password/database combinations to be used for scripts. I can have a common function to extract it in your profile script and every other script can retrieve them as needed - nothing shows up on the command lines.

Of course if you dont/cant secure the file properly, there's not much point.
0
 

Author Comment

by:sanpradeep
ID: 35163814
You mean to say that there is no way we can find out the password of the current connected session by querying any dictionary view..
0
 
LVL 7

Accepted Solution

by:
MrNed earned 500 total points
ID: 35163937
No, definitely not. You can get a hashed version of it (http://www.lifeaftercoffee.com/2005/08/23/oracle-password-hacks/), but that is not enough to re-connect with.
0
 

Author Comment

by:sanpradeep
ID: 35173906
Thanks for clarifying...
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and theā€¦
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now