FAQ
A number of ways - If you're connecting as the DBA, you can just
sqlplus /nolog
connect / as sysdba

Another way would be to create an externally identified user.

A few more methods involve having your shell script look up the passwords
from a secured file, or storing the passwords as environment variables. I
don't think the environment-variable route will work under cron, however.
On Tue, Dec 1, 2009 at 2:40 PM, Sven Aluoor wrote:

Hi folks

I have here a Solaris box where i need to setup cronjob (with session
to remote DB). On the remote DB i have no access, expect limited user
via sqlplus.

How to avoid putting passwords in shell scripts?

cheers
Sven
--
http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l

Search Discussions

  • Jared Still at Dec 1, 2009 at 10:55 pm
    see http://www.freelists.org/post/oracle-l/hide-sqlplus-pwd
    <http://www.freelists.org/post/oracle-l/hide-sqlplus-pwd>
    Jared Still
    Certifiable Oracle DBA and Part Time Perl Evangelist
    Oracle Blog: http://jkstill.blogspot.com
    Home Page: http://jaredstill.com
    On Tue, Dec 1, 2009 at 1:40 PM, Sven Aluoor wrote:

    Hi folks

    I have here a Solaris box where i need to setup cronjob (with session
    to remote DB). On the remote DB i have no access, expect limited user
    via sqlplus.

    How to avoid putting passwords in shell scripts?

    cheers
    Sven
    --
    http://www.freelists.org/webpage/oracle-l

    --
    http://www.freelists.org/webpage/oracle-l
  • Robertson Lee - lerobe at Dec 2, 2009 at 11:36 am
    I like the look of this Martin, we use Nagios here. I think I will have
    a closer look.

    Thanks

    Lee

    -----Original Message-----
    From: oracle-l-bounce_at_freelists.org
    On Behalf Of Martin Bach
    Sent: 02 December 2009 11:07
    To: jkstill_at_gmail.com
    Cc: aluoor_at_gmail.com; oracle-l_at_freelists.org
    Subject: Re: "sqlplus orauser/orapasswd_at_SID" avoid writing passwords in
    shell scripts

    Sven, you could alternatively make use the password store. I have
    described this in a bit of detail here:

    http://martincarstenbach.wordpress.com/2009/11/23/oracles-secure-externa
    l-password-store/

    Very easy to do and no password required, but depends on your version.

    Regards,

    Martin

    --
    Martin Bach
    OCM 10g
    http://martincarstenbach.wordpress.com/

    Jared Still wrote:
    --
    http://www.freelists.org/webpage/oracle-l

    ***************************************************************************
    The information contained in this communication is confidential, is
    intended only for the use of the recipient named above, and may be legally
    privileged.

    If the reader of this message is not the intended recipient, you are
    hereby notified that any dissemination, distribution or copying of this
    communication is strictly prohibited.

    If you have received this communication in error, please resend this
    communication to the sender and delete the original message or any copy
    of it from your computer system.

    Thank You.
    ****************************************************************************

    --
    http://www.freelists.org/webpage/oracle-l
  • Sharon.Kovac_at_Rotometrics.com at Dec 2, 2009 at 2:10 pm
    We have a file on the server that is locked down. Then, from a shell
    script run though the cron, we launch sqlplus.

    APPSPWD=`cat /path/to/file`
    sqlplus -s apps/$APPSPWD <
    Sent by: oracle-l-bounce_at_freelists.org
    12/01/2009 03:41 PM
    Please respond to
    aluoor_at_gmail.com

    To
    oracle-l@freelists.org
    cc

    Subject
    "sqlplus orauser/orapasswd_at_SID" avoid writing passwords in shell scripts

    Hi folks

    I have here a Solaris box where i need to setup cronjob (with session
    to remote DB). On the remote DB i have no access, expect limited user
    via sqlplus.

    How to avoid putting passwords in shell scripts?

    cheers
    Sven
    --
    http://www.freelists.org/webpage/oracle-l

    Sharon Kovac | RotoMetrics
    Phone: +1 636 587 3600 | Fax: +1 636 587 3701800 Howerton Lane | Eureka, MO 63025 | USA
    www.rotometrics.com

    This e-mail message is intended only for the personal use of the recipient(s)
    named above. This message is confidential. If you are not an intended
    recipient, you may not review, copy or distribute this message. If you have
    received this communication in error, please notify the sender immediately by
    e-mail and delete the original message.

    .

    --
    http://www.freelists.org/webpage/oracle-l
  • Amit DBA at Dec 3, 2009 at 2:56 pm
    Hi Sven,

    As martin had mentioned you can use Oracle Secure password store, where in
    you can create a wallet. I have implemented this at a client side and it
    worked without any issues. You can check out post detailing setup steps

    http://askdba.org/weblog/2009/09/using-oracle-wallet-to-execute-shell-scriptcron-without-hard-coded-oracle-database-password/

    Cheers
    Amit
    http://askdba.org/weblog/
    On Wed, Dec 2, 2009 at 5:40 AM, Sven Aluoor wrote:

    Hi folks

    I have here a Solaris box where i need to setup cronjob (with session
    to remote DB). On the remote DB i have no access, expect limited user
    via sqlplus.

    How to avoid putting passwords in shell scripts?

    cheers
    Sven
    --
    http://www.freelists.org/webpage/oracle-l

    --
    http://www.freelists.org/webpage/oracle-l

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedDec 1, '09 at 10:14p
activeDec 3, '09 at 2:56p
posts5
users5
websiteoracle.com

People

Translate

site design / logo © 2022 Grokbase