Connect Using an Oracle Wallet with Credentials

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.

Use the ttUser -setPwd command to store the TimesTen cache administration user and password in a wallet. Use the ttUser -setOraclePwd command to store the Oracle cache administration user and password in a 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 users /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. 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: 

After the credentials are stored within an Oracle Wallet, provide the user name and location of the wallet on the connection string. The PwdWallet connection attribute identifies the wallet. The UID connection attribute identifies which credentials to locate within the wallet.

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

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

See Providing the Cache Administration User Names and Passwords in an Oracle Wallet in the Oracle TimesTen In-Memory Database Security Guide for full details on how to store credentials in an Oracle Wallet. See PwdWallet and ttUser in the Oracle TimesTen In-Memory Database Reference.