Wednesday, March 27, 2013

How to Change DBSNMP Password in Database 10g and 11g Monitored by DB Control

To change the password of the user DBSNMP you must strictly follow the steps below, otherwise the 10g or 11g DB Control used to manage your database will not function properly.

1. Stop the standalone dbconsole
On Unix - DB Control Release up to 11.1.x
$ export ORACLE_SID=
$ emctl stop dbconsole

On Unix - DB Control Release 11.2.x and higher
$ export ORACLE_SID=
$ export ORACLE_UNQNAME=

$ emctl stop dbconsole
On Windows - DB Control Release up to 11.1.x
Stop the Windows Service OracleDBConsole orOpen a DOS Command Window and type
C:> set ORACLE_SID=
C:> set ORACLE_HOME=

C:> cd %ORACLE_HOME%/bin
C:> emctl stop dbconsole
On Windows - DB Control Release 11.2.x and higher
Stop the Windows Service OracleDBConsole or Open a DOS Command Window and type
C:> set ORACLE_SID=
C:> set ORACLE_UNQNAME=

C:> set ORACLE_HOME=

C:> cd %ORACLE_HOME%/bin
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, cd to the database $ORACLE_HOME\bin and type
emctl status dbconsole 

Connect to the database as a user with DBA privilege with SQL*Plus and execute
alter user dbsnmp identified by ;
Check the new password
SQL> connect dbsnmp/[@database_alias]
Go to $ORACLE_HOME/host_sid/sysman/emd, Save the file targets.xml to targets.xml.orig, Edit the file targets.xml with your favorite text editor
Search for the line: encrypted_string
>" encrypted="TRUE">
       Replace the encrypted value by the new password value
       Replace TRUE by FALSE

Restart the standalone dbconsole
On Unix - DB Control Release up to 11.1.x
$ export ORACLE_SID=
$ emctl start dbconsole
On Unix - DB Control Release 11.2.x and higher
$ export ORACLE_SID=
$ export ORACLE_UNQNAME=
$ emctl start dbconsole

On Windows - DB Control Release up to 11.1.x
Start the Windows Service OracleDBConsole
Or
Open a DOS Command Window and type
set ORACLE_SID=
set ORACLE_HOME=
cd %ORACLE_HOME%/bin
emctl start dbconsole 

On Windows - DB Control Release 11.2.x and higher
Start the Windows Service OracleDBConsole
Or
Open a DOS Command Window and type
set ORACLE_SID=
set ORACLE_UNQNAME=
set ORACLE_HOME=
cd %ORACLE_HOME%/bin
emctl start dbconsole 

Check that the password has been encrypted
Edit the file targets.xml
Search for the line: 
Check that the password VALUE is encrypted
Check that the value of ENCRYPTED is TRUE

Note: In case of RAC DB, the dbsnmp password should be changed in targets.xml not only for instances(oracle_database), but also for rac_database target. The file targets.xml needs to be updated on all the RAC Cluster nodes.
References

How to query multiple LDAP authentication sources in JBoss EPP 5.2?



Issue

· Is it possible to query multiple LDAP authentication sources in EPP 5.2?

· Are there any known limitations to this feature?

Environment

· JBoss Enterprise Portal Platform (EPP) 5.2

Resolution

Yes it is possible to query multiple LDAP servers in JBoss EPP 5.2. Follow the steps below to configure multiple LDAP resources for users:

Step 1: Configure multiple identityStore with different providerURL pointing to different LDAP servers. An example configuration given below:


        PortalLDAPStore1
        org.picketlink.idm.impl.store.ldap.LDAPIdentityStoreImpl
        
        
          JBOSS_IDENTITY_MEMBERSHIP
        
        
          
            USER
            ...
          
          
            otherobject
            ...
          
        
        
          
          ...
         
      
      
        PortalLDAPStore2
        ...
         
          
          ...
         
      


Step 2: Map the identity store in repository configuration. An example provided below:


    PortalRepository
    org.picketlink.idm.impl.repository.FallbackIdentityStoreRepository
    
    
    HibernateStore
    HibernateStore
    
        
            PortalLDAPStore1
            
                USER
                otherobject
            
            
        
        
            PortalLDAPStore2
            
                USER
                ...
            
            
        
    
    
        
    


Please note there is one limitation with this feature. The same user cannot be in multiple LDAP servers. In other words, if there is a UID uniqueness among the LDAP servers, then it should be fine to query users from multiple LDAP resources.

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]