当前位置:Gxlcms > mysql > Oraclewallet使用与维护---Oracle无密码登录

Oraclewallet使用与维护---Oracle无密码登录

时间:2021-07-01 10:21:17 帮助过:23人阅读

从Oracle 10gR2开始, 通过使用Oracle Wallet达到任意用户不使用密码登录数据库(非操作系统认证方式),这对于用脚本登录数据库进行

Oracle wallet使用与维护

从Oracle 10gR2开始, 通过使用Oracle Wallet达到任意用户不使用密码登录数据库(非操作系统认证方式),这对于用脚本登录数据库进行操作来说是非常有用的;尤其对于企业安全要求很高,不希望用户名和密码明文存在配置文件中,而且对于密码的维护是极为方便的,比如我把wallet放在指定路径下,当修改密码时,只需统一覆盖wallet即可,对于有大量应用服务器尤为方便。

在客户端创建一个wallet

用法:
E:\app\Administrator\product\11.2.0\dbhome_1\BIN>mkstore --help
Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。

未指定 Wallet 的位置。
mkstore [-wrl wrl] [-create] [-createSSO] [-createLSSO] [-createALO] [-delete] [
-deleteSSO] [-list] [-createEntry alias secret] [-viewEntry alias] [-modifyEntry
alias secret] [-deleteEntry alias] [-createCredential connect_string username p
assword] [-listCredential] [-modifyCredential connect_string username password]
[-deleteCredential connect_string] [-help] [-nologo]

E:\app\Administrator\product\11.2.0\dbhome_1\BIN>

1. 创建wallet
语法: mkstore -wrl -create

eg:
E:\app\Administrator\product\11.2.0\dbhome_1\BIN>mkstore -wrl e:\temp\wallet -create
Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。

输入口令:(输入wallet的密码,要设置的复杂些,,否则失败

再次输入口令:(输入wallet的密码

E:\app\Administrator\product\11.2.0\dbhome_1\BIN>

查看创建wallet

e:\temp\wallet>dir
驱动器 E 中的卷是 data
卷的序列号是 DCEE-F1D9

e:\temp\wallet 的目录

2012/07/24 17:19

.
2012/07/24 17:19 ..
2012/07/24 17:19 3,589 cwallet.sso
2012/07/24 17:19 3,512 ewallet.p12
2 个文件 7,101 字节
2 个目录 212,962,336,768 可用字节

e:\temp\wallet>

2.创建客户端连接服务端的网络连接串,每个连接串对应一个数据库用户
skate_192.168.1.9 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.9)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = skate)
)
)


3.把登入数据库的用户认证信息添加到wallet中

E:\app\Administrator\product\11.2.0\dbhome_1\BIN>mkstore -wrl e:\temp\wallet -createCredential skate_192.168.1.9 skate skatepwd
Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。

输入 Wallet 口令:

Create credential oracle.security.client.connect_string1

linux

人气教程排行