测试环境:
数据库版本:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
操作系统:Microsoft Windows XP [版本 5.1.2600]
一直想用DBA用户使用下ISQLPLUS,今天测试了下
方法:
1.进入本机JAZN环境
cd D:\oracle\product\10.2.0\db_1\oc4j\j2ee\isqlplus\application-deployments\isqlplu
s>java -Djava.security.properties=D:\oracle\product\10.2.0\db_1/oc4j/j2ee/home/c
onfig/jazn.security.props -jar D:\oracle\product\10.2.0\db_1/oc4j/j2ee/home/jazn
.jar -user "admin" -password welcome -shell
2.增加用户并授权
JAZN:> adduser "iSQL*Plus DBA" xxx xxx
JAZN:> grantrole webDba "iSQL*Plus DBA" xxx
JAZN:> exit
JAZN:>
3.重新启动isqlplus服务
D:\oracle\product\10.2.0\db_1\oc4j\j2ee\isqlplus\application-deployments\isqlplu
s>isqlplusctl start
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Starting iSQL*Plus ...
iSQL*Plus started.
备注:
要以DBA身份登陆isqlplus,必须先配置好oc4j用户。oc4j可以使用两种身份认证方式:基于xml配置文件(jazn-data.xml) 或者基于LDAP(Oracle Internet Directory) 。通常采用xml配置文件认证的方式较多,这种方式使用的该配置文件位于$ORACLE_HOME/oc4j/j2ee/isqlplus/application-deployments/isqlplus/config,但是该配置文件中的密码是加密过的,所以无法手动修改该文件,配置用户密码需要通过JAZN(Java AuthoriZatioN)来配置,JAZN是oracle提供的一个JASS(Java Authentication and Authorization Service)工具。
通过JAZN,可以完成以下任务:Create user / List user / Grant the webDba role / Remove users / Revoke the webDba role / Change user passwords
参考:http://ora-600.itpub.net/post/203/464380
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15720542/viewspace-608301/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15720542/viewspace-608301/