Oracle Wallet for Passwordless Connection to Database with Scripts
Directory to Store Oracle Wallet File

Oracle Wallet files are by default stored under one of the two locations. If ORACLE BASE is not set, then, ORACLE HOME will be preferred.

where

db_unique_name
is the database unique name identified by db_unique_name parameter.
Create Wallet

To create Wallet, use the mkstore command. Provide the location where Wallet file will be stored. Here, it is wallet directory under ORACLE_BASE. Be ready to provide the password when prompted. This password will be used to encrypt the data. So, make sure that you remember the password.

$ORACLE_HOME/bin/mkstore \
  -wrl $ORACLE_BASE/admin/<db_unique_name>/wallet \
  -create
  <Password prompt appears here>
Edit sqlnet.ora for Wallet Configuration
vi $ORACLE_HOME/network/admin/sqlnet.ora

ENCRYPTION_WALLET_LOCATION =
   (SOURCE =
      (METHOD = FILE)
      (METHOD_DATA = (DIRECTORY = ORACLE_BASE/admin/db_unique_name/wallet))
   )   
Add Connection Descriptor in tnsnames.ora
voice = 
  (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 3333))
      (CONNECT_DATA = 
         (SERVER = DEDICATED)
         (SERVICE_NAME = voice)
      )
  )   
Add username and password to Wallet
$ORACLE_HOME/bin/mkstore \
   -wrl ORACLE_HOME/admin/voice/wallet \
   -createCredential connect_descriptor username password

where

connect_descriptor
is the descriptor used in tnsnames.ora.
username
is the database username (schema)
password
is the password for the schema
Usage
sqlplus /@connect_descriptor
Comments