y to save the wallet [oracle@station3 orcl]$ ls cwallet.sso ewallet.p12 [oracle@station3 orcl]$ pwd /u01/app/oracle/connectwallet/orcl [oracle@station3 u01]$ ll /u01 total 20 drwxr-xr-x 3 oracle oinstall 4096 Sep 10 00:33 app #####the directory'own must be the user oracle. 2)generate the hruser connection [oracle@station3 orcl]$ cat /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora HRUSER = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.3)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE = DEDICATED) (SERVICE_NAME = orcl.oracle.com) ) [oracle@station3 orcl]$ tnsping hruser #####it must be a successful link. 3)edit the sqlnet.ora [oracle@station3 orcl]$ cd $TNS_ADMIN [oracle@station3 admin]$ pwd /u01/app/oracle/product/10.2.0/db_1/network/admin [oracle@station3 admin]$ cat sqlnet.ora sqlnet.wallet_override=true wallet_location=(source=(method=file)(method_data=(directory=/u01/app/oracle/connectwallet/orcl/))) #####that file control user to login. 4)create the wallet key and make the scurity connection [oracle@station3 admin]$ mkstore -create -wrl /u01/app/oracle/connectwallet/orcl Enter password: Enter password again: [oracle@station3 admin]$ mkstore -wrl /u01/app/oracle/connectwallet/orcl -createCredential HRUSER hr hr; Enter password: Create credential oracle.security.client.connect_string1 [oracle@station3 admin]$ sqlplus /nolog SQL> conn /@hruser Connected. SQL> show user USER is "HR" SQL> select salary from employees where employee_id=100; SALARY ---------- 24000 作者“redhat6_push_experience”
|