Solved

sqlplus command line parameters

Posted on 2001-07-02
8
1,483 Views
Last Modified: 2012-06-21
How is it possible to start sqlplus from unix cron without showing userneme/password ? for example, if it's needed to start sql job, then it goes like: sqlplus userneme/password @some_sql_script, if somebody executes ps -ef , then he/she can see dbase username/and password and thats not good. any suggestions?
0
Comment
Question by:maads
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 1

Expert Comment

by:chdba
ID: 6245660
Create a user identified externally.

Then you start your Script like this:

sqlplus / @some_sql_script

Of course you should then use an unix-user, that is not available for everyone, because you'll be identified by this user.

Hope this will help you.

chdba
0
 
LVL 1

Accepted Solution

by:
chdba earned 29 total points
ID: 6245724
Some further remarks:

You'll be able to connect only by UNIX not by e.g. FORMS.

INIT.ORA:
os_authent_prefix = ""
# Default value is "OPS$" for "Identified by Operation System"

I always work with OPS$ (default value). So I can have for example a user OPS$ORACLE for the reason you mentioned and an user ORACLE for working with SQL*Plus/SQLNavigator ...

So, if your UNIX-user is called "example" you'll have to create an oracle user "OPS$example".

CREATE USER ops$... IDENTIFIED EXTERNALLY ...
0
 
LVL 1

Expert Comment

by:ashokskumar
ID: 6245868
Hi,

You can execute through a shell scipt in which you can specify the username and password.  This is not displayed in ps -ef.  You don't want to see the details by a user who is able to login in to the server. Externally identified user will be able to login without password.

Ashok.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Expert Comment

by:r_sudip
ID: 6246173
Hi,

 With sqlplus you have an option as "nolog" which starts
 a sqlplus session with no user connected.
 You can use this feature to achieve what u want
 for e.g

 sqlplus /nolog @some_sql_script

 Now in the sql script write
 connect username/password@db  as the first line

 So in effect it will connect to the database but
 a ps -ef will not show the username/password

Sudip
0
 

Expert Comment

by:r_sudip
ID: 6246194
Hi,

 With sqlplus you have an option as "nolog" which starts
 a sqlplus session with no user connected.
 You can use this feature to achieve what u want
 for e.g

 sqlplus /nolog @some_sql_script

 Now in the sql script write
 connect username/password@db  as the first line

 So in effect it will connect to the database but
 a ps -ef will not show the username/password

Sudip
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7038046
Please update and finalize this old, open question. Please:

1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.

EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.

Thanks,

** Mindphaser - Community Support Moderator **

P.S.  Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7052572
Recommended disposition:
    Split points between: chdba and ashokskumar and r_sudip

DanRollins -- EE database cleanup volunteer
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7052774
Force accepted

** Mindphaser - Community Support Moderator **

ashokskumar and r_sudip, there will be a separate question with points for your help.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

830 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