wallet的使用

今天在espace里面看到有人问官员wallet的使用,于是就自己下来研究了一下,并进行了验证可以正常使用,学习记忆录一下,以后用的时候可以马来拿来看。
wallet的作用哪就是无密码登陆oracle,相当于一个密钥,并且对于脚本登陆数据库来操作是特别有用的,并且存放起来也更加的完全,便于修改!
下来在客户端创建一个wallet:
用法:
D:\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:
    D:\app\Administrator\product\11.2.0\dbhome_1\BIN>mkstore -wrl d:\app\wallet -create
    Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
    版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
    输入口令:(输入wallet的密码,要设置的复杂些,否则失败)
    再次输入口令:(输入wallet的密码)
    D:\app\Administrator\product\11.2.0\dbhome_1\BIN>

查看创建wallet
d:\app\wallet>dir
2017/01/09 19:19

.
2017/01/09 19:19 ..
2017/01/09 19:19 3,589 cwallet.sso
2017/01/09 19:19 3,512 ewallet.p12
2 个文件 7,101 字节
2 个目录 212,962,336,768 可用字节
d:\app\wallet>

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

3.把登入数据库的用户认证信息添加到wallet中
D:\app\Administrator\product\11.2.0\dbhome_1\BIN>mkstore -wrl d:\temp\wallet -createCredential kf_153 csctest cc08CC08
Oracle Secret Store Tool: 版本 11.2.0.1.0 - Production
版权所有 (c) 2004, 2009, Oracle 和/或其子公司。保留所有权利。
输入 Wallet 口令:
Create credential oracle.security.client.connect_string1

4.在客户端的sqlnet.ora文件里,编辑参数“WALLET_LOCATION ”
WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=d:\app\wallet)))
SQLNET.WALLET_OVERRIDE = TRUE

5.测试在客户端无需密码连接数据库测试

D:\app\Administrator\product\11.2.0\dbhome_1\BIN>sqlplus /@kf_153
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 1月 9 19:59:21 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show user;
USER 为 “csctest”
SQL>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值