Home » SQL & PL/SQL » SQL & PL/SQL » Start DB session using sh script with out the password (10g Release 2)
Start DB session using sh script with out the password [message #596643] Wed, 25 September 2013 07:02 Go to next message
arunprakash647
Messages: 5
Registered: August 2013
Junior Member
Hi,

I am trying to write a shell script to start a DB session without using the DB Password.

Could any one help me in doing this script?

Thanks in advance.
Re: Start DB session using sh script with out the password [message #596646 is a reply to message #596643] Wed, 25 September 2013 07:21 Go to previous messageGo to next message
dariyoosh
Messages: 536
Registered: March 2009
Location: Iran / France
Senior Member
Hi,

- Why do you need this? What do you want to do exactly?
- What is the OS?
- What is the context of the authentication (connecting as an administrator or an ordinary user)?
- Have you looked at Secure External Password Store?

Regards,
Dariyoosh
icon14.gif  Re: Start DB session using sh script with out the password [message #596649 is a reply to message #596643] Wed, 25 September 2013 07:37 Go to previous messageGo to next message
Michel Cadot
Messages: 63808
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

The solution depends on where your shell script is executed.
If it is not on the database server then the best solution is Oracle External Secure Password Store (aka Oracle wallet).
If it is on the database server, you can still use this authentication (which is in my opinion the best solution) or you can use OS (aka External) authentication.
You can read an introduction of all possible authentications in Security Guide, Chapter 4 Authentication Methods
Re: Start DB session using sh script with out the password [message #646317 is a reply to message #596649] Thu, 24 December 2015 15:44 Go to previous messageGo to next message
rohit_shinez
Messages: 138
Registered: January 2015
Senior Member
Actually i am not getting how i can hide the password so that no one can't see the actual password basically in encrypt format
Re: Start DB session using sh script with out the password [message #646322 is a reply to message #646317] Thu, 24 December 2015 16:40 Go to previous messageGo to next message
Solomon Yakobson
Messages: 2457
Registered: January 2010
Location: Connecticut, USA
Senior Member
To start database make OS user member of OS group - for Unix/Linux OS groups for Oracle adminstrative access are set in $ORACLE_HOME/rdbms/lib/config.c. For Windows it is ORA_DBA, ORA_OPER, ... Then you can connect without password.

For non SYSDBA activities use Oracle wallet.

SY.
Re: Start DB session using sh script with out the password [message #646323 is a reply to message #646322] Thu, 24 December 2015 16:45 Go to previous messageGo to next message
Solomon Yakobson
Messages: 2457
Registered: January 2010
Location: Connecticut, USA
Senior Member
Also, for activities on local databases you could create OS authenticated Oracle user. I wouldn't recommend OS authentication for remote connections (setting remote_os_authent to true presents security risk).

SY.
Re: Start DB session using sh script with out the password [message #646324 is a reply to message #646317] Thu, 24 December 2015 17:24 Go to previous messageGo to next message
BlackSwan
Messages: 24912
Registered: January 2009
Senior Member
rohit_shinez wrote on Thu, 24 December 2015 13:44
Actually i am not getting how i can hide the password so that no one can't see the actual password basically in encrypt format


like below
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Dec 24 15:19:31 2015

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  456146944 bytes
Fixed Size                  1344840 bytes
Variable Size             348129976 bytes
Database Buffers          100663296 bytes
Redo Buffers                6008832 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost ~]$ id
uid=500(oracle) gid=500(oracle) groups=500(oracle),54323(davfs2)
[oracle@localhost ~]$ 

Re: Start DB session using sh script with out the password [message #646326 is a reply to message #646317] Fri, 25 December 2015 06:18 Go to previous message
Michel Cadot
Messages: 63808
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
rohit_shinez wrote on Thu, 24 December 2015 22:44
Actually i am not getting how i can hide the password so that no one can't see the actual password basically in encrypt format


Read again the links and try them,, it is clear.

Previous Topic: how to fetch deleted row
Next Topic: Materialized View
Goto Forum:
  


Current Time: Thu Sep 29 00:24:17 CDT 2016

Total time taken to generate the page: 0.09509 seconds