近期安裝完oracle 10g后,竟發現將安裝時設置的系統密碼忘記。在同事的幫助下通過一下方法解決,遇到同樣問題的朋友可以參考
如何重置oracle 10g SYS 的密碼
安裝完oracle 10g后,竟然將安裝時設置的系統密碼忘記。在同事的幫助下通過一下方法解決。
1.oracle的密碼文件存在于:oracle_home/database/pwd
2.使用orapwd 重置SYS密碼
C:oracleproduct10.2.0db_1database>orapwd
Usage: orapwd file=
C:oracleproduct10.2.0db_1database>orapwd file=PWDorcl.ora password=20120020
entries=5 force=y
where
file – name of password file (mand),
password – password for SYS (mand),
entries – maximum number of distinct DBA and force – whether to overwrit
e existing file (opt),
OPERs (opt),
There are no spaces around the equal-to (=) character.
重置oracle的sys用戶密碼
1.在oracle安裝目錄下搜索名為PWD數據庫實例名.ora文件
2.備份一份密碼文件(一定要哦,避免發生意外哦)
3.生成新的密碼文件,在dos控制臺下輸入命令
orapwd file=PWD數據庫實例名.ora文件路徑PWD數據庫實例名.ora password=新密碼 entires=數值
說明:file表示密碼文件全路徑(要和剛剛搜索到的一致)
password表示新密碼
entires表示登錄sys最多的用戶
如果希望新的密碼生效,則需要重新啟動數據庫實例
特別說明,在dos下輸入orapwd其有詳細提示.