查詢 SELECT * FROM v$pwfile_users 若有資料 → 密碼檔驗證;否則為 OS 驗證。
sqlplus /nolog CONNECT / AS SYSDBA ALTER USER SYS IDENTIFIED BY new_password; ALTER USER SYSTEM IDENTIFIED BY new_password;
# 1. 關閉資料庫 SHUTDOWN IMMEDIATE # 2. 重建密碼檔 orapwd file=$ORACLE_HOME/dbs/orapwpassword=new_password entries=10 # 3. 啟動資料庫 STARTUP
entries 參數預留最大使用者數,建議設略大於實際需求。
sqlplus sys/new_password@sid AS SYSDBA sqlplus system/new_password@sid