Archive for the ‘Wallet’ Category

Set-up Oracle Wallet Connection

Posted: April 18, 2012 in Wallet

Set-up the wallet location

Create a directory where the wallet is going to be stored in my configuration its /u01/wallet/oracle

mkdir /u01/wallet/oracle

Create sqlnet.ora

vi sqlnet.ora – add the following

WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/wallet/oracle)
)
)

SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0

Create tnsnames.ora

vi tnsnames.ora – add your database connect

TESTDB1 =
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.126.31)(PORT=7777))
)
(CONNECT_DATA =
(SERVICE_NAME = testdb1.co.uk)
(SRVR = DEDICATED)
)
)

Create the Wallet 

mkstore -wrl /u01/wallet/oracle -create –You will need to supply a new wallet password & confirm.

Add the entries

mkstore -wrl /u01/wallet/oracle –createCredential <SID> <USERMNAME> <PASSWORD> –You will need to supply the previously entered wallet password.

e.g – mkstore -wrl /u01/wallet/oracle –createCredential TEST TESTDB1 PASSWORD –You will need to supply the previously entered wallet password.

Test the connection

export TNS_ADMIN=/u01/wallet/oracle

sqlplus /@TESTDB1 – this will connect you to testdb1 as the user TEST

How to change the wallet credentials 

mkstore -wrl /u01/wallet/oracle -modifyCredential <Instance> <username> <password>

An example for the test user on testdb1

mkstore -wrl /u01/wallet/oracle -modifyCredential TESTDB1 TEST PASSWORD

List current entries in the wallet

mkstore -wrl /u01/wallet/oracle -listCredential