5 Connect Using an Oracle Wallet with Credentials

For cache operations, you will connect as the cache administration user. You can provide credentials for cache administration users by saving them in an Oracle Wallet, which then can be used for connecting to both the TimesTen and Oracle databases.

The ttUser -setPwd command stores any user and password in an Oracle Wallet.

This section describes the process to add cache administration user passwords to an Oracle Wallet.

The following example shows how to use the ttUser utility to add both cache administration users to an Oracle Wallet in the /wallets/cacheadminwallet directory.

  1. If it does not already exist, make a directory for your wallet. This example uses /wallets as the directory for the wallet.

    % mkdir /wallets
  2. Run the ttUser -setPwd command to store the TimesTen cache administration user credentials. The ttUser utility requires that you provide a subdirectory name that identifies the wallet (since you cannot change the name of an Oracle Wallet). This example provides cacheadminwallet as the subdirectory name for the wallet. If cacheadminwallet directory does not exist, then the ttUser utility creates the cacheadminwallet subdirectory and then creates the Oracle Wallet in the /wallets/cacheadminwallet directory. The ttUser utility prompts for the password for the TimesTen cache administration user cacheadmin, which is added to the wallet.

    % ttUser -setPwd -wallet /wallets/cacheadminwallet -uid cacheadmin
    Enter password: 
  3. Run the ttUser -setOraclePwd command to store the Oracle cache administration user credentials into the same wallet as the TimesTen cache administration user credentials. The ttUser utility prompts for the password for the Oracle cache administration user cacheadmin, which is added to the wallet in /wallets/cacheadminwallet.

    % ttUser -setOraclePwd -wallet /wallets/cacheadminwallet -uid cacheadmin
    Enter password: 

Provide the location of the wallet on the connection string with the PwdWallet connection attribute. The UID connection attribute identifies which credentials to locate within the wallet. The following example provides the cache administration user credentials in an Oracle Wallet when connecting to the database defined in the cache1 DSN.

connect “dsn=cache1;uid=cacheadmin;PwdWallet=/wallets/cacheadminwallet”;

For client/server connections, the wallet must exist on the client.

For more details: