Solved

sqlplus command line parameters

Posted on 2001-07-02
8
1,487 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

734 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