說明
該文件不知道是什么,這么丑掷伙,cat命令還無法看,就把它刪除了
/u01/app/oracle/product/12.2.0/db_1/dbs/orapworcl
直到PLSQL Developer無法登錄sys 賬號才知道刪除錯文件了(肯定賬號密碼正確)
ORA-01017:invalid username/password;logon denied
任意密碼都可以登錄sys用戶
SQL> connect sys/1 as sysdba
Connected.
SQL> show user
USER is "SYS"
- 因為登錄方式默認是系統(tǒng)驗證
/u01/app/oracle/product/12.2.0/db_1/network/admin/sqlnet.ora/orapworcl
#SQLNET.AUTHENTICATION_SERVICES= (NTS)
恢復誤刪除的ORACLE密碼文件
- 設置sqlplus非系統(tǒng)驗證登錄oracle數(shù)據(jù)庫
orapwd.exe重新創(chuàng)建密碼文件又兵,密碼難度有要求
/u01/app/oracle/product/12.2.0/db_1/bin/orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=oracle entries=5 force=y
報錯密碼精度不夠
OPW-00029: Password complexity failed for SYS user : Password must contain at least 8 characters.
修改復雜密碼
/u01/app/oracle/product/12.2.0/db_1/bin/orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=ABCabc18312550321@ entries=5 force=y
完蛋了任柜,密碼有@符號
sqlplus sys/ABCabc18312550321@ as sysdba
無法識別特殊符號登錄刪除文件重新創(chuàng)建
/u01/app/oracle/product/12.2.0/db_1/bin/orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=ABCabc18312550321! entries=5 force=y
終于登錄成功
SQL> connect sys/ABCabc18312550321! as sysdba
SQL> alter user sys identified by oracle ;
- 查看$ORACLE_SID值
select * from global_name;--==$ORACLE_SID
[oracle@oracle dbs]$ echo $ORACLE_SID
orcl
- 重新生成orapworcl文件,PLSQL Developer可以登錄sys 賬號