【翻譯自mos文章】改變資料庫使用者sysman(該使用者是DB Control Repository 的schema)密碼的方法,mossysman

來源:互聯網
上載者:User

【翻譯自mos文章】改變資料庫使用者sysman(該使用者是DB Control Repository 的schema)密碼的方法,mossysman

改變資料庫使用者sysman(該使用者是DB Control Repository 的schema)密碼的方法

參考原文:
How To Change the Password of the Database User Sysman (DB Control Repository Schema) (Doc ID 259379.1)

適用於:
Enterprise Manager for Oracle Database - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2]
Enterprise Manager for Oracle Database - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
Information in this document applies to any platform.


目的:
sysman的口令被加密存放在多個地方,因此,the Database Control (OMS and Agent)可以在不需要sysman密碼的情況下可以訪問database。
所以,當修改sysman口令的時候,新口令必須提供給the Database Control OMS and Agent.

如果新口令沒有更新給the Database Control OMS and Agent, oms將不能訪問資料庫,並且在trace file中,你會注意到下面的錯誤:
2012-05-31 13:50:13,513 [PAFStartupThread] ERROR conn.ConnectionService verifyRepositoryEx.891 - Invalid Connection Pool. ERROR = ORA-01017: invalid username/password;
logon denied2012-05-31 13:50:20,717 [HTTPThreadGroup-4] ERROR conn.ConnectionService verifyRepositoryEx.891 - Invalid Connection Pool. ERROR = ORA-28000: the account is locked
2012-05-31 13:50:20,764 [HTTPThreadGroup-2] ERROR eml.OMSHandshake processFailure.806 - OMSHandshake failed.
(AGENT URL = https://uk-sno1-m018.uk-paper.group.wan:3938/emd/main)(ERROR = INTERNAL_ERROR)(CAUSE =java.sql.SQLException: ORA-01017: invalid username/password; logon denied

本文解釋了在不斷開Database 與 Database Control的情況下,修改資料庫使用者sysman密碼的方法。

注意:Enterprise Manager 10g 已經進入擴充支援。oracle強烈建議升級你的環境到Enterprise Manager 11g or 12c。
Enterprise Manager 11g or 12c 現在是處於premier Support(翻譯成:首先支援?)

範圍:
所有使用Enterprise Manager DB Control 10g or 11g的資料庫管理員。

細節:
注意:安裝在 Windows 2008 / Vista上的 DB Control Release 10.2.0.3 及其更高版本,emctl 命令可能會失敗,錯誤是"Permission Denied".該錯誤的解決方案,請見下面的文章:
Document 1164293.1 - Executing Any EMCTL Command on Windows 2008 / Vista Returns "Permission denied" Error


第一種情況:Database Release prior 10.2.0.4

 sysman 這個使用者是 the standalone repository of the Enterprise Manager DB Control 的  schema
 
 為了確保你是在正確的資料庫中修改了sysman口令,請檢查環境變數ORACLE_SID是否被設定,環境變數 ORACLE_HOME 是否被設定,PATH是否包括 正確的  $ORACLE_HOME/bin
 
 請修改sysman口令時嚴格遵守如下的步驟,否則,你的DB Control 將會運行異常。
 1.停止 DB Control
  On Unix
  $ emctl stop dbconsole
 
  On Windows 
  Stop the Windows Service OracleDBConsole
  Or
  Open a Command Window and type
  C> emctl stop dbconsole
 
  2.確認DB Control 已經被停止:
  On Unix
  $ emctl status dbconsole
 
  On Windows
  Check the status of the Windows Service OracleDBConsole
  Or
  Open a DOS Command Window and type
  C> emctl status dbconsole
 
3. 使用dba 許可權登陸sqlplus,執行如下的語句:
SQL> alter user sysman identified by <password> ;
例子:
SQL> alter user sysman identified by rainbow ;

4.檢查新密碼能否登陸到db中
SQL> connect sysman/[@database_alias]
Example:
SQL> connect sysman/rainbow@DBRH

5.到$ORACLE_HOME/host_sid/sysman/config中
   5.1 將emoms.properties 檔案做一個備份emoms.properties.orig
   5.2 編輯emoms.properties檔案:
      5.2.1 尋找以下面內容開頭的行:
            oracle.sysman.eml.mntr.emdRepPwd=
            以新密碼(額外註:明文不帶;號)替換掉加密後的值。
            例子:oracle.sysman.eml.mntr.emdRepPwd=rainbow
      5.2.2 找下面的行:
            oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE
            用FALSE替換TRUE
6.重啟 DB Control
On Unix
$ emctl start dbconsole

On Windows
Start the Windows Service OracleDBConsole
Or
Open a DOS Command Window and type
C> emctl start dbconsole

7.檢查密碼已經被加密:
  查看$ORACLE_HOME/host_sid/sysman/config/emoms.properties檔案
    7.1 搜尋以下面開頭的行:
      oracle.sysman.eml.mntr.emdRepPwd=
      確認密碼已經被加密
    7.2 搜尋以下面開頭的行:
      oracle.sysman.eml.mntr.emdRepPwdEncrypted=
      確認該值是 TRUE


第二種情況: Database Release beginning 10.2.0.4
 sysman 這個使用者是 the standalone repository of the Enterprise Manager DB Control 的  schema
 
 為了確保你是在正確的資料庫中修改了sysman口令,請檢查環境變數ORACLE_SID是否被設定,
 
 對於 DB Control Release 11.2 以及更高版本來說,你需要將環境變數ORACLE_UNQNAME設定為資料庫參數DB_UNIQUE_NAME 的值
 你必須檢查環境變數 ORACLE_HOME 是否被設定,PATH是否包括 正確的  $ORACLE_HOME/bin
 
 請修改sysman口令時嚴格遵守如下的步驟,否則,你的DB Control 將會運行異常。
 
 1.1.Stop the DB Control
    On Unix
    $ emctl stop dbconsole
   
    On Windows
    Stop the Windows Service OracleDBConsole
    Or
    Open a Command Window and type
    C> emctl stop dbconsole

2. 確認 DB Control 已經被停止
   On Unix  
   $ emctl status dbconsole
  
   On Windows
   Check the status of the Windows Service OracleDBConsole
   Or
   Open a DOS Command Window and type
   C> emctl status dbconsole

3. 使用dba 許可權登陸sqlplus,執行如下的語句:
   SQL> alter user sysman identified by <password> ;
4. 確認新密碼:
   SQL> connect sysman/[@database_alias]
5. 在database directory $ORACLE_HOME/bin目錄中,執行:
   On Unix
   $ emctl setpasswd dbconsole  
   Provide the new SYSMAN password
     
   On Windows  
   C>: emctl setpasswd dbconsole
   Provide the new SYSMAN password

6.重啟DB Control
  On Unix
  $ emctl start dbconsole
 
  On Windows
  Start the Windows Service OracleDBConsole
  Or
  Open a DOS Command Window and type
  C>: emctl start dbconsole

 




相關文章

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.