ORA-01017:invalid username/password; logon denied

10.png   

现象:

客户应用的开发人员反映使用plsql developer登录test用户的时候报错:ORA-01017:invalid username/password; logon denied,使用system和sys在pl/sql developer登录就没问题。


在服务器本机测试:

sqlplus /nolog


SQL*Plus: Release 10.2.0.4.0 - Production on Thu Apr 24 10:30:50 2014


Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


SQL> conn test/test
ERROR:
ORA-01017: invalid username/password; logon denied




SQL> show parameter remote_login_passwordfile


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      EXCLUSIVE   ------------------此处为Oracle默认的值,没问题。



尝试:




export ORACLE_SID=test
sqlplus / as sysdba


SQL*Plus: Release 10.2.0.4.0 - Production on Thu Apr 24 11:28:23 2014


Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.




Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> select open_mode from v$database;


OPEN_MODE
----------
READ WRITE


其中还怀疑是因为开发人员未给用户赋权限:

SQL> GRANT CREATE SESSION TO test;


Grant succeeded.


SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
sqlplus /nolog


SQL*Plus: Release 10.2.0.4.0 - Production on Thu Apr 24 11:28:48 2014


Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


SQL> conn test/test
ERROR:
ORA-01017: invalid username/password; logon denied   ------------看来不是权限问题。




SQL> conn / as sysdba
Connected.
SQL> show parameter service;


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
service_names                        string      test


SQL> alter user test identified by test;


User altered.

该方案成功!


SQL> conn test/test
Connected.


最后找开发人员获取建用户的脚本,发现确实是创建用户时设定密码有问题:



CREATE USER test
  IDENTIFIED BY VALUES 'test' -----------------------此行导致的,一般使用 identified by 直接加密码即可!!,
  DEFAULT TABLESPACE  TEST_DATA                      identied by values适用于加密方式指定密码的,一般为
  TEMPORARY TABLESPACE TEMP                          一串16禁止无可读性的字符,如果明文指定密码的话,使用
  PROFILE DEFAULT                                    identied by password即可。
  ACCOUNT UNLOCK; 
  -- 3 Roles for test 
  GRANT CONNECT TO test;
  GRANT DBA TO test;
  GRANT RESOURCE TO test;
  ALTER USER test DEFAULT ROLE ALL;
  -- 2 System Privileges for test
  GRANT CREATE ANY TABLE TO test;
  GRANT UNLIMITED TABLESPACE TO test;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20802110/viewspace-1153323/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/20802110/viewspace-1153323/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值