ORA-01017:invalid username/password; logon denied
現象:
客戶應用的開發人員反映使用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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- sqlplus / as sysdba報錯ORA-01017: invalid username/password; logon deniedSQLGo
- 【YashanDB資料庫】YAS-02143 invalid username/password, login denied資料庫
- python urllib socks5 auth username password 設定Python
- mysql 1045, "Access denied for user 'root'@'localhost' (using password: NO)"MySqllocalhost
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:YES)Errorlocalhost
- 啟動報錯:Access denied for user 'root'@'localhost' (using password:YES)localhost
- 報錯”ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)”Errorlocalhost
- java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)JavaSQLExceptionlocalhost
- SourceTreet提交時顯示remote: Incorrect username or password ( access token )(4種解決辦法)REM
- Linux錯誤 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)LinuxErrorlocalhost
- vue專案中連線MySQL時,報錯ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password:YES)VueMySqlErrorlocalhost
- Caused by: java.sql.SQLException: Access denied for user 'dell-pc'@'xxxxx' (using password: YES)JavaSQLException
- 解決Mysql:ERROR 1045 (28000):Access denied for user ‘root‘@‘localhost‘ (using password: NO)的方法MySqlErrorlocalhost
- SpringBoot中yml配置java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: NOSpring BootJavaSQLExceptionlocalhost
- MySQL 8.0.13 密碼問題 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)MySql密碼Errorlocalhost
- Navicat遠端連線MySQL 提示1045 - Access denied for user 'root'@'223.74.158.192'(using password:YES)MySql
- MySQL系列:Docker安裝 MySQL提示錯誤:Access denied for user'root'@'localhost' (using password:yes)MySqlDockerlocalhost
- logon觸發器for dbaGo觸發器
- URL username 屬性
- mac os x 安裝mysql遇到 Access denied for user ‘root‘@‘localhost‘ (using password: YES)的解決方法MacMySqllocalhost
- 【Lintcode】1789. Distinguish UsernameNGUI
- SQLSTATE[HY000] [1045] Access denied for user ‘root‘@‘localhost‘ (using password: YES)”錯誤的隱藏解決辦法SQLlocalhost
- ubuntu ssh: connect to host ** port 22: Connection refused ssh登入遠端伺服器時提示Permission denied (publickey,password)Ubuntu伺服器
- Django中的函式make_password、set_password和check_passwordDjango函式
- secondary logon服務怎麼開啟?Win10系統secondary logon服務的開啟步驟GoWin10
- no-wwwtl622com17008768000-password never prompt for password
- [20211014]19C Failed Logon Delay.txtAIGo
- iOS Password AutoFilliOS
- Password Storage - UserDetailsAI
- sqlplus as sysdb登入報ora-01017SQL
- Hexo 部落格部署失敗 could not read UsernameHexo
- JavaScript invalid 事件JavaScript事件
- found an invalid color
- URL password 屬性
- scp without interative password
- 每天閱讀一個 npm 模組(1)- usernameNPM
- php password_hash password_verify 加密驗證不需要saltPHP加密
- StreamCorruptedException: invalid stream headerExceptionHeader
- Invalid time zone indicator ‘ ‘Indicator