遠端登入sys使用者報錯:ORA-01017: invalid username/password; logon denied

datapeng發表於2014-05-07
遠端登入sys使用者報錯:ORA-01017: invalid username/password; logon denied


今天有個客戶反應資料庫不能用sys使用者遠端登陸
情況如下:
SQL> conn sys/system123@xxxx as sysdba
ERROR:
ORA-01017: invalid username/password; logon denied
SQL> conn sys/system@xxx as sysdba
Connected.
 
1.重建密碼檔案
orapwd file=/oracle/app/11.2.0/db_1/dbs/orapwxxx1 password=system123 entries=5
orapwd file=/oracle/app/11.2.0/db_1/dbs/orapwxxx2 password=system123 entries=5


重建密碼檔案需要重啟資料庫
保險起見在資料庫中修改下sys密碼
SQL> alter user sys identified by system123
SQL> conn sys/system123@xxxx as sysdba
ERROR:
ORA-01017: invalid username/password; logon denied
遠端登陸依然不行


2.檢查remote_login_passwordfile引數
檢視資料庫,該引數值預設為none,如果要使sys遠端登入,必須要改為exclusive才可以。
修改該引數:
$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Wed May 7 20:11:59 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> show prameter REMOTE_LOGIN_PASSWORDFILE
NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
remote_login_passwordfile            string
NONE

SQL>alter system set remote_login_passwordfile=exclusive scope=spfile;
RAC 環境兩邊都要重啟後生效。  

$ sqlplus sys/"system123"@xxxxx as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed May 7 20:22:05 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved. 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> -------遠端方式成功登陸sys使用者 







來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29371470/viewspace-1156279/,如需轉載,請註明出處,否則將追究法律責任。

相關文章