Wednesday, March 27, 2013

How To Change the Password of the Database User Sysman

Database Release prior 10.2.0.4

The Oracle user SYSMAN is the schema of the standalone repository of the Enterprise Manager DB Control.

To ensure that you change the SYSMAN password in the right database, you must check that the environment variable ORACLE_SID is set.
You must also check that the environment variable ORACLE_HOME is set and that the path includes the correct $ORACLE_HOME/bin.

To change the password of the user sysman you must strictly follow the steps below, otherwise your DB Control used to manage your database will not function properly.
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

Check that the DB Control is stopped
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
Connect to the database as a user with DBA privilege with SQL*Plus and execute:
SQL> alter user sysman identified by ;
Example:
SQL> alter user sysman identified by rainbow ;
Check the new password
SQL> connect sysman/[@database_alias]
Example:
SQL> connect sysman/rainbow@DBRH
Go to $ORACLE_HOME/host_sid/sysman/config, Save the file emoms.properties to emoms.properties.orig Edit the file emoms.properties, Search for the line beginning with:
oracle.sysman.eml.mntr.emdRepPwd=Replace the encrypted value by the new password value
Example:
oracle.sysman.eml.mntr.emdRepPwd=rainbow
Search for the line:
oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE
Replace TRUE by FALSE
Restart the 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
Check that the password has been encrypted, Edit the file $ORACLE_HOME/host_sid/sysman/config/emoms.properties, Search for the line beginning with:
oracle.sysman.eml.mntr.emdRepPwd=Check that the password is encrypted
Search for the line beginning with:
oracle.sysman.eml.mntr.emdRepPwdEncrypted=Check that the value is TRUE
Database Release beginning 10.2.0.4
The Oracle user SYSMAN is the schema of the standalone repository of the Enterprise Manager DB Control.
To ensure that you change the SYSMAN password in the right database, you must check that the environment variable ORACLE_SID is set.

For the DB Control Release 11.2 and higher
you need to set the environment variable ORACLE_UNQNAME to the value of the DB_UNIQUE_NAME database parameter.

You must also check that the environment variable ORACLE_HOME is set and that the path includes the correct $ORACLE_HOME/bin.

To change the password of the user sysman you must strictly follow the steps below, otherwise your DB Control used to manage your database will not function properly.
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. Check that the DB Control is stopped
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
Connect to the database as a user with DBA privilege with SQL*Plus and execute:

SQL> alter user sysman identified by ;
Check the new password

SQL> connect sysman/[@database_alias]
From the database directory $ORACLE_HOME/bin, execute:
On Unix
$ emctl setpasswd dbconsole
Provide the new SYSMAN password
On Windows
C:> emctl setpasswd dbconsole
Provide the new SYSMAN password
3.Restart the 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


Reference to Oracle support: [ID 259379.1]

No comments: