Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sqlplus command line parameters

Posted on 2001-07-02
8
Medium Priority
?
1,492 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 116 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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

719 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