Oracle資料庫system使用者忘記了密碼怎麼辦?

來源:互聯網
上載者:User
Oracle資料庫system使用者忘記了密碼怎麼辦。 
D:\oracle\ora92\bin>sqlplus /nolog 


SQL*Plus: Release 9.2.0.1.0 - Production on 星期四 8月 16 11:32:22 2007 


Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. 


SQL> conn /as sysdba 
已串連。 
SQL> alter user system identified by password; 


使用者已更改。 


SQL> alter user sys identified by password; 


使用者已更改。 


SQL> alter user system identified by manger; 


使用者已更改。 


SQL> exit 
從Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production 
With the Partitioning, OLAP and Oracle Data Mining options 
JServer Release 9.2.0.1.0 - Production中斷開 


D:\oracle\ora92\bin>sqlplus 


SQL*Plus: Release 9.2.0.1.0 - Production on 星期四 8月 16 11:40:37 2007 


Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. 


請輸入使用者名稱: system 
請輸入口令: 


串連到: 
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production 
With the Partitioning, OLAP and Oracle Data Mining options 
JServer Release 9.2.0.1.0 - Production 


SQL> select instance_name from v$instance; 


INSTANCE_NAME 
---------------- 


Oracle密碼忘記了怎麼辦。有時候我們可能忘記了一個使用者的密碼,但是又需要以這個使用者做一些操作,又不能去修改掉這個使用者的密碼,這個時候,就可以利用一些小竅門,來完成操作。採用如下方法可以修改密碼:


1.開啟cmd,輸入sqlplus /nolog,斷行符號;輸入“conn / as sysdba”;輸入“alter user sys identified by 新密碼”,注意:新密碼最好以字母開頭,否則可能出現錯誤Ora-00988。有了這個方法後,只要自己對oracle伺服器有管理員權限,Oracle密碼忘記了也不用著急,可以隨意修改密碼。


2.在命令列執行如下命令:sqlplus "/@服務名 as sysdba",然後在sqlplus中
alter user sys identified by 新密碼;
alter user system identified by 新密碼;


3.運行到C盤根目錄 
1)輸入:SET ORACLE_SID = 你的SID名稱 
2)輸入:sqlplus/nolog 
3)輸入:connect/as sysdba 
4)輸入:alert user sys identified by sys 
5)輸入:alert user system identified by system 
6)更改完成,密碼是Oracle資料庫的初始密碼。這樣Oracle密碼忘記了,也可以修改。


4.首先,在CMD下輸入SQLPLUS/NOLOG然後再在出來的介面中打入CONN/AS SYSDBA,這樣就會以本地系統登入的使用者為信任使用者進入資料庫的操作.解決這個問題的方式有兩種,一個是:ALTER USER (USERNAME) IDENTIFIED BY “密碼”;這個是 可以改變USERNAME的密碼.當然這個USERNAME必須已經存在的。
另一種是:CREATE USER (USERNAME) IDENTIFIED BY "密碼";改變使用者權限的命令是:GRANT ROLES TO(USERNAME);以上2種方法都是針對ORACLE 9I的版本 。


5.用orapwd.exe命令,可以修改命令。即使Oracle密碼忘記了,也可以改動很多次。
orapwd file='/oracle/pwdsid.ora' password=123456這個命令是修改sys使用者的密碼。你把產生的檔案覆蓋原來的密碼檔案。除sys和system其他使用者的密碼不會改變。


6.su - oracle 
sqlplus /nolog
conn / as sysdba
startup (如果資料庫不是處於啟動狀態則啟動)
alter user sys identified by 123456
然後就可以使用sys使用者密碼登陸了

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.