Solved

sqlplus command line parameters

Posted on 2001-07-02
8
1,486 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
migration MS SQL database to Oracle 30 78
Error querying database link from Oracle 10g to Postgresql 7 130
SQL2016 to ORACLE11G linked-server 6 74
error doing substr 3 49
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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 information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

742 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