Forum Stats

  • 3,733,349 Users
  • 2,246,746 Discussions
  • 7,856,664 Comments

Discussions

Connect without typing password

Jose Aróstegui
Jose Aróstegui Member Posts: 1,268 Silver Badge
edited December 2018 in SQLcl

Hi experts,

We're currently using Oracle Wallets as a "External Password Store", in order to connect to database without typing passwords:

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

For that it's required to modify tnsname.ora or sqlnet.ora.... so as SQLcl doesn't use Oracle Cliente, is there something similar?

The goal would be to create an encrypted keystore with the database user/password, so it's not necessary to type password when establishing database connections.

This is will be used by a custom deployment tool written as a shell script, that would run sqlplus commands (DML/DDL).

Thanks,
Jose.

Answers

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,776 Bronze Crown
    edited December 2018

    If you have set Oracle Wallet up correctly, sqlcl can use it just like sqlplus can.

    For example:

    F:\Oracle>sql /@xenixSQLcl: Release 18.1 Production on Mon Dec 10 19:38:31 2018Copyright (c) 1982, 2018, Oracle.  All rights reserved.Connected to:Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit ProductionSQL> show connectionCONNECTION: [email protected]:oracle:oci8:@xenixCONNECTION_IDENTIFIER: xenixCONNECTION_DB_VERSION: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit ProductionNOLOG: falsePRELIMAUTH: false

    Your PATH just needs to include a directory containing the OCI libraries so sqlcl can succesfullly connect using "jdbc:oracle:oci8".

    Probably easyest to get sqlplus connecting first, once that is succesful, switch to getting sqlcl to work.

    For above connection I used Oracle instantclient 12_2 inc sqlplus, with sqlcl 18.1... and F:\Oracle\instantclient12_2 set in PATH.

  • Jose Aróstegui
    Jose Aróstegui Member Posts: 1,268 Silver Badge
    edited December 2018

    Thanks for you help Gaz.

    Probably easyest to get sqlplus connecting first, once that is succesful, switch to getting sqlcl to work.

    That's exactly our problem... we cannot use sqlplus because of an old unsupported version or Oracle Client (10.1.0.5.0). According to MOS Note: "Supported Versions for Mkstore (Doc ID 549985.1)", in order to create the wallet "External Password Store" we need to use command "mkstore -createCredential" which is not supported in the current Oracle Client version.

    We've set wallets without issues in other server, but they have higher versions of Oracle Client.

    As we cannot install or upgrade another Oracle Client in that precise server, that's why I asking about an alternative based on SQLcl + keystore.


    Thanks,
    Jose.

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,776 Bronze Crown
    edited December 2018

    What is stopping you from installing an instant client that is supported, along side the outdated cilent?

    Is the current version of sqlplus you are using 10.1.0.5 and is it that that is incompatible with Oracle wallet?

    What database server version are you connecting to from the 10.1.0.5 client?

    Why are you trying to use sqlcl and not sqlplus?

    What version of sqlcl are you using?

    Have you set up wallet on this server and it doesn't work?

    Have you tried setting up a wallet store on another server and copying the wallet files to this server?

    It is not at all clear to me what your issue actually is, aside from using outdated software.

    Have you considered using ops$ database user accounts and external authentication?

  • Jose Aróstegui
    Jose Aróstegui Member Posts: 1,268 Silver Badge
    edited December 2018

    Hi Gaz,


    This is due to contractual stuff and I'm not fully aware of.


    I was thinking it may be as easy as just unzip SQLcl and use it instead of sqlplus, without any extra install.

    Regards,

    Jose.

Sign In or Register to comment.