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.
-
If it does not already exist, make a directory for your wallet. This example uses
/walletsas the directory for the wallet.% mkdir /wallets -
Run the
ttUser -setPwdcommand to store the TimesTen cache administration user credentials. ThettUserutility requires that you provide a subdirectory name that identifies the wallet (since you cannot change the name of an Oracle Wallet). This example providescacheadminwalletas the subdirectory name for the wallet. Ifcacheadminwalletdirectory does not exist, then thettUserutility creates thecacheadminwalletsubdirectory and then creates the Oracle Wallet in the/wallets/cacheadminwalletdirectory. ThettUserutility prompts for the password for the TimesTen cache administration usercacheadmin, which is added to the wallet.% ttUser -setPwd -wallet /wallets/cacheadminwallet -uid cacheadmin Enter password: -
Run the
ttUser -setOraclePwdcommand to store the Oracle cache administration user credentials into the same wallet as the TimesTen cache administration user credentials. ThettUserutility prompts for the password for the Oracle cache administration usercacheadmin, 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:
-
See Providing 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.