This discussion is archived
4 Replies Latest reply: Feb 8, 2013 1:14 PM by 832104 RSS

Getting OEM working after moving the DB to new box.

832104 Newbie
Currently Being Moderated
Greetings All,

I am testing moving a database to a new box.

I installed Oracle 11gR2 Enterprise Edition on the new box and created a new DB called DEV01. The same name as the DB I am moving. When I was building the new DB I also increased the memory allocations (there is more RAM on the new box).

I then backed up to trace the spfile and control file on both the new (target) box and source box.

I modified the pfile and create control file (for the new box) accordingly for the multiple datafiles and maintained the new increased memory allocations.

I shutdown the new DB (target) and deleted all of the datafiles, spfiles, control files, redo, temp files. I retained the file structure.

I shutdown the source DB and copied the datafiles to the new box.

I then started nomount the new DB (target).

I created a new spfile from the pfile I modified above for the new box.

I created new control files from the modified file (mentioned above) on the new box.

I then shutdown and restarted the new DB so the new SPFILE and new controlfile would be used.

The relocated DB is fine, all schemas and data is there.

Basically I restored a DB on a new box using a cold backup without the SPFILE and CONTROL files, I recreated the SPFILE and CONTROL files.

Now my question:

Is there a better way to get the OEM functioning without going thru the process of using the emca with the –repos recreate parameter? I believe this will drop and recreate the SYSMAN account/schema. I’d like to avoid this because I have many jobs scheduled. If I were to recreate the SYSMAN I will lose all of the jobs.

Am I correct?

How do I get the OEM functioning on the new box?

Thanks for your time,
Bob

Edited by: Snyds on Feb 1, 2013 1:53 PM
  • 1. Re: Getting OEM working after moving the DB to new box.
    dba05 Journeyer
    Currently Being Moderated
    Basically,you need to re-point your OMS to the new location of your repository.

    check the current settings....

    emctl config oms -list_repos_details

    change values using....

    emctl config oms -store_repos_details -repos_port <portno> -repos_sid <sid> -repos_host <hostname> -repos_user SYSMAN -repos_pwd <passwd>

    Let us know if it worked...
  • 2. Re: Getting OEM working after moving the DB to new box.
    832104 Newbie
    Currently Being Moderated
    Thanks for your response.

    When I enter the emctl command as you suggested to check current settings the response is as if I requested help.
    I also submitted the same emctl commad on my production system and got the same result.

    So I then tried “emctl status dbconsole” and got the response below

    C:\Users\Administrator>emctl status dbconsole
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
    https://WIN-O2T4J174RNT:1158/em/console/aboutApplication
    Oracle Enterprise Manager 11g is not running.

    So I then submitted emctl start dbconsole and got the response below:

    C:\Users\Administrator>emctl start dbconsole
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
    https://WIN-O2T4J174RNT:1158/em/console/aboutApplication
    Starting Oracle Enterprise Manager 11g Database Control ...The service name is invalid.

    At one point in time (last week, 2 days ago) I tried using emctl with the recreate option, It seemed to hang so I canceled it. The SYSMAN schema was still there afterwards, although the account was locked.

    At this point it seems that I really messed things up. Fortunately this was a test.

    Any suggestions regarding how to set things right at this point?

    Thanks again,
    Bob
  • 3. Re: Getting OEM working after moving the DB to new box.
    832104 Newbie
    Currently Being Moderated
    Greetings All,
    After starting over with a restore on a test server from cold backup. I tried to start the OEM GUI again and got an error message saying to run “emctl status emkey”.
    This generated a message saying to copy the emkey.ora file from the source or backup and then run:
    emctl config emkey -emkeyfile <Loacation of the file>\emkey.ora –force
    The OEM now works fine.
    Thanks again for your time,
    Bob
  • 4. Re: Getting OEM working after moving the DB to new box.
    832104 Newbie
    Currently Being Moderated
    Greetings All,

    After starting over with a restore on a test server from cold backup.

    I tried to start the OEM GUI again and got an error message saying to run “emctl status emkey”.

    This generated a message saying to copy the emkey.ora file from the source or backup and then run:

    emctl config emkey -emkeyfile <Loacation of the file>\emkey.ora –force

    The OEM now works fine.

    Thanks again for your time,

    Bob

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points