Sunday, January 16, 2011

Oracle 11g server rename issue

So we set up an Oracle server out of production (11g on Server 2008 x64) and our plan was to just rename the server's hostname to move it into production. Well, the database itself is functioning but every time we try to launch the management tool, it spawns up a bazillion and one processes (ever increasing) and at some point may end up causing the server to crash.

Is anyone familiar with Oracle issues pertaining to renaming of servers and the management tool failing?

  • Hi Tyler,

    My colleague is an Oracle OCM, i'm going to ask him and should have an update for you shortly.

    Best, Nick

  • Hi Tyler,

    From Shirish, comments below.

    "Hostname wont affect anything for database as long as its mapped correctly in /etc/hosts

    for tools (such as OEM or grid.. hostname is sometimes added in repository or the config files) ..unless you want to poke around for all those entries, best way will be to do a re-install (completely clean old install and then install again) of that tool . ( and usually its the fastest way too )"

    Please let us know if you need any specific instructions on how to do it.

    Nick O'Neil : You can re-install EM using OUI. Both EM and ORacle Software are installed in Separate Oracle Homes. When you launch OUI, you need to provide EM home (And not oracle home)
  • You can find the config files for the database specific DBCONSOLE in your ORACLE_HOME under a direcory named with the FQDN of the Host, an underscore, and the SID. eg

    myhost.mynetwork_mydatabase
    

    You could try stopping the dbconsole with

    set ORACLE_SID=mydatabase
    emctl stop dbconsole
    

    Then fiddling with the config files and dir names and then restarting the console.

    If that doesn't work then you can reinstall the dbconsole into a database with command line tools. I'd lookup the full set of help on EMCTL.

    Update: I had to recreate some DBCONSOLE repositories recently.

    The following steps worked well.

    Manual DBCONSOLE removal and recreation

    1. Remove the existing Windows Service
        Remove HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleDBConsole[SID]
    
    2. Remove the existing setup from the filesystem
        Delete %ORACLE_HOME%\DomainName_SID
        Delete %ORACLE_HOME%\oc4j\j2ee\OC4J_DBConsole_DomainName_SID
    
    3. Remove the SYSMAN schema from the database as SYS or SYSTEM
        drop user sysman cascade;
        drop role MGMT_USER;
        drop user MGMT_VIEW cascade;
        drop public synonym MGMT_TARGET_BLACKOUTS;
        drop public synonym SETEMVIEWUSERCONTEXT;
    
    4. Run the Database Configuration Assistant
        Select the database from the list
        Ensure that the DBCONSOLE option and the Enterprise Manager Repository options are ticked
    
    From Cephas
  • Yep - what cephas said. I was able to do this by renaming the .../product/11.1.0/db_1/oc4j/j2ee/OC4J_DBConsole_oldhostname_orcl to .../product/11.1.0/db1_oc4j/j2ee/OC4J_DBConsole_newhostname_orcl .

    after which i had it rebuild the em repository with: emca -config dbcontrol db -repos recreate

    From jskaggz

0 comments:

Post a Comment