Wednesday, January 29, 2020

Configure SQLPLUS with Wallet/keystore

1. Create a wallet/keystore location.

# mkdir -p /u01/wallet/
 

2. update the wallet/keystore location in sqlnet.ora

$ vi  $ORACLE_HOME/network/admin/sqlnet.ora
# sqlnet.ora Network Configuration File: /home/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, EZCONNECT, ONAMES, HOSTNAME)
WALLET_LOCATION =
  (SOURCE =(METHOD = FILE)(METHOD_DATA =
    (DIRECTORY = /u01/wallet)))
SQLNET.WALLET_OVERRIDE=TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0


3. Configure TNS

DBTESTWL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = WALLET)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DBTEST)
    )
  )


4. Create a wallet for external identification:

$ cd /u01/wallet/
$ mkstore -wrl /u01/wallet -create
Enter password: walletpass#123
Enter password again: walletpass#123


$ mkstore -wrl /u01/wallet -createCredential DBTESTWL EUSER EUSER
 

5. Try with sqlplus

$ sqlplus /@DBTESTWL

No comments:

Post a Comment