一、查看entry 1.#这里看到我们增加一个数据进来就会增加3个entries。
2.#分别是一个连接符,一个用户名,一个密码。
3.#当我们增加了很多数据库与用户进来后,数据库与用户还有密码他们是怎么关联的呢?其实他们就是通过后面的这个数字来关键的。
4.[oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -list
5.Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
6.Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
7.
8.Enter wallet password:
9.
10.Oracle Secret Store entries:
11.oracle.security.client.connect_string1
12.oracle.security.client.password1
13.oracle.security.client.username1
二、增加数据库到wallet中去,并测试是否成功 1.3.1#增加net service为htz scott为用户 oracle为用户的密码。
2.#建议密码用''引起来,因为在生产环境中的密码基本上都是特殊字符的。
3.[oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -createCredential htz scott 'oracle'
4.Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
5.Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
6.
7.Enter wallet password:
8.
9.Create credential oracle.security.client.connect_string1
10.3.2 #查看是否增加成功。
11.[oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -listCredential
12.Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
13.Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
14.
15.Enter wallet password:
16.
17.List credential (index: connect_string username)
18.1: htz scott
19.3.3 测试是否可以实现无需要输入用户与密码登陆
20.[oracle@test db_1]$ sqlplus /@htz
21.
22.SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 8 09:19:15 2012
23.
24.Copyright (c) 1982, 2010, Oracle. All rights reserved.
25.
26.
27.Connected to:
28.Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
29.With the Partitioning, OLAP, Data Mining and Real Application Testing options
30.#显示的是scott,成功了。
31.SQL> show user;
32.USER is "SCOTT"
33.SQL> exit
34.Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
35.With the Partitioning, OLAP, Data Mining and Real Application Testing options
三、创建默认用户与密码 这样可以实现,登陆所以的数据库都可以使用默认的用户与密码
1.6.1 #创建默认的用户。
2.[oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -createEntry oracle.security.client.default_username scott
3.Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
4.Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
5.
6.Enter wallet password:
7.6.2 #创建默认用户的密码。
8.[oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -createEntry oracle.security.client.default_password oracle
9.Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
10.Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
11.
12.Enter wallet password:
13.6.3 #查看是否创建成功
14.[oracle@test db_1]$ mkstore -wrl /u01/app/oracle/product/11.2.0/db_1/wallet -list
15.Oracle Secret Store Tool : Version 11.2.0.2.0 - Production
16.Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
17.
18.Enter wallet password:
19.
20.Oracle Secret Store entries:
21.oracle.security.client.connect_string1
22.oracle.security.client.default_password
23.oracle.security.client.default_username
24.oracle.security.client.password1
25.oracle.security.client.username1