Pages

Sunday, May 16, 2010

Changing Passwords to the Oracle Enterprise Manager Administrators Users

 

Sometimes we need or want to change the password to SYSMAN or DBSNMP. It could be a nightmare if you don’t know some special rules that must be applied  to. First lets see what users we are talking about.

SYSMAN    The SYSMAN user represents the Enterprise Manager super admin account. This EM admin can create and modify other EM admin accounts as well as admin the database instance itself.

DBSNMP   The DBSNMP user is used by EM to monitor the database. EM uses this account to access performance stats about the database. The DBSNMP credentials sometimes referred to as the monitoring credentials.

Well cut to the chase

Resetting password to user SYSMAN

1. Verify you have set the environment variables ORACLE_HOME, ORACLE_SID.

The best option is perform this action with the OS user owner of the database. Usually people calls it as the user oracle. If you have not that user & password at this moment please set the variables.


set ORACLE_HOME=yourOracleHome
set ORACLE_SID=yourSID
set PATH=$ORACLE_HOME/bin:$PATH (assuming unix OS)

In windows

PATH=C:\>%ORACLE_HOME%\bin; (others paths included in the PATH)

2. Shutdown EM and ensure your console is completely shutdown.
Unix

$ORACLE_HOME/bin/emctl stop dbconsole

$ORACLE_HOME/bin/emctl status dbconsole

Windows

C:\>%ORACLE_HOME%\bin\emctl stop dbconsole

C:\>%ORACLE_HOME%\bin\emctl status dbconsole

3. From a SQL plus prompt modify sysman's password, Connected as SYS or SYSTEM
SQL> alter user SYSMAN identified by <New_Password>;

4. Verify you can open a sqlplus session with the sysman user using the new password.
sqlplus sysman/yourNewPassword
SQL>

5. Reconfigure password
a. Change directory to $ORACLE_HOME/<HOSTNAME>_<SID>/sysman/config
b. Backup file emoms.properties
c. Edit the file emoms.properties
d. Look for the line beginning with:
oracle.sysman.eml.mntr.emdRepPwd=
Replace the encrypted value by the new password value
e. Look for the line:
oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE
Replace TRUE by FALSE
6. Start the EM service
emctl start dbconsole
7. Verify the above written password has been changed to an encrypted version in the emoms.properties file.

The password should look now encrypted in the variable

oracle.sysman.eml.mntr.emdRepPwd=

And “oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE”  should look equal to TRUE again
8. EM DB Control should be up and running by now.

Resetting password to user DBSNMP

Repeat Steps 1 and 2 given for “Resetting password for SYSMAN user”  

3. From a SQL plus prompt modify sysman's password, Connected as SYS or SYSTEM
SQL> alter user DBSNMP identified by <New_Password>;

4. Open a sqlplus session with the sysman user using the new password.
sqlplus DBSNMP/yourNewPassword
SQL>

5. Reconfigure password
a. Change directory to $ORACLE_HOME/<HOSTNAME>_<SID>/sysman/emd
b. Backup file targets.xml
c. Edit the file targets.xml
d. Look for the line with:
<Property NAME=”password” VALUE=”313213123123”  encrypted=”TRUE”/>
Replace the encrypted value by the new password value and replace the word TRUE for FALSE

6. Steps 6, exactly as above for “Resetting password for SYSMAN user”

7. Password in the file target.xml must look encrypted and the word TRUE have replaced the FALSE 

8. Step 8, exactly as above for “Resetting password for SYSMAN user”

No comments:

Post a Comment