Oracle Enterprise Manager to 10g Grid Migration Process

Posted by Sagar Patil

Migrating from previous Oracle Enterprise Manager releases to Grid Control is a two-step process:

1. Deploy the OMA (Agent) to all managed servers.
2. Migrate existing Oracle Enterprise Manager administrator accounts to Grid Control.

1. Deploy the OMA (Agent) to all managed servers.

To simplify and automate Management Agent deployment, a Tcl script is provided that is submitted as a job from an Enterprise Manager Release 2.2, Release 9.0.1, or Release 9.2 Job system. The deployment script (agentIntallJob.tcl) can be found in the Oracle Enterprise Manager 10g home directory at the following location:

%ORACLE_HOME/sysman/agent_download/agentInstallJob.tcl

2. Migrate existing Oracle Enterprise Manager administrator accounts to Grid Control.

Once the Oracle Enterprise Manager 10g Management Agents have been deployed and configured, the next step is to migrate information about users, privileges, groups, and preferred credentials from the original Management Repository to the Oracle Enterprise Manager 10g Management Repository.

Both Enterprise Manager 9i and Oracle Enterprise Manager 10g save and encrypt all administrator accounts and preferred credentials in the repository. In order to migrate all of these accounts over to Enterprise Manager 10g, you must run the Migration Utility from the Enterprise Manager 10g home.

This command line utility can be found in the following directory: %EM_HOME%/bin/repo_mig

The Migration Utility requires the repository user and password for both the original Management Repository database and for the new Oracle Enterprise Manager 10g Management Repository database.

You execute the utility and specify operational parameters using the following format:

$ repo_mig   –migrate  EM_user/password@old_repository_host:port:sid  sysman/password@OMR_host:port:sid

where:
-preview: Generates a preliminary migration report without carrying out the migration.
-migrate: Performs migration of groups, administrators, target privileges, and preferred credentials of hosts, databases, and listeners.
source_user: Source OEM repository user name
source_pwd: Source OEM repository password
source_service: Source OEM repository service. For example, Host:Port:SID
dest_user: Destination OEM repository user name
dest_pwd: Destination OEM repository password
dest_service: Destination OEM repository service. (Host:Port:SID)

Once the migration is complete, the account information is then saved and encrypted. The passwords on all of the accounts will remain the same.

Modifying the Default Login Timeout Value for Grid Control 10g/11g

Posted by Sagar Patil

To prevent unauthorized access to the Grid Control console, Enterprise Manager will automatically log you out of the Grid Control console when there is no activity for a predefined period of time. For example, if you leave your browser open and leave your office, this default behavior prevents unauthorized users from using your Enterprise Manager administrator account.
By default, if the system is inactive for 45 minutes or more, and then you attempt to perform an Enterprise Manager action, you will be asked to log in to the Grid Control console again.

11g :

1. [oracle@EM_BOX config]$ $OMS_HOME/bin/emctl set property -name oracle.sysman.eml.maxInactiveTime -value -1 -sysman_pwd grid_pwd
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Property oracle.sysman.eml.maxInactiveTime for oms EM_BOX:4889_Management_Service has been set to value -1

#oracle.sysman.eml.maxInactiveTime=time_in_minutes
-1 : Unlimited Duration

2. Restart services to apply changed value

[oracle@EM_BOX config]$ $OMS_HOME/bin/emctl stop oms
[oracle@EM_BOX config]$ $OMS_HOME/bin/emctl start oms

10G :

1. Navigate to the <OMS_HOME>/sysman/config directory
2. Make a backup copy of the emoms.properties file. Go to the bottom of the file and add the line
#oracle.sysman.eml.maxInactiveTime=time_in_minutes
oracle.sysman.eml.maxInactiveTime=60

3. Restart services to apply changed value

[oracle@EM_BOX config]$ $OMS_HOME/bin/emctl stop oms
[oracle@EM_BOX config]$ $OMS_HOME/bin/emctl start oms

Using the Job System : schedule/list Jobs

Posted by Sagar Patil

Advantages of using grid control to schedule jobs

  • Could be run against multiple targets at any given time
  • Run a job immediately or repeatedly on a schedule
  • Could be submitted against number of targets
  • Could be shared using job library

1. View Jobs at Grid Control:

Login at Grid and click on Top tab –> Jobs –> Click on “Job Library” option to view number of jobs.

To see activity of job click on “Job Activity”

2. Create a new Job : I often see massive trace files consuming disk space. I will “create a dbms job to delete bdump trace files” (*.trc) older than 7 days i.e “find /opt/oracle/admin/repAAA/bdump -type f -mtime +7 -exec rm -f {} \;”

Select “Create Library Job”  -> “OS command” and hit <Go>

Add Description of a Job like “Delete udump trace files”

Add OS command at COMMAND box  “find /opt/oracle/admin/repAAA/bdump -type f -mtime +7 -exec rm -f {} \;”.  I selected “Single Operation” as it is a single UNIX command to delete files. If you have a UNIX script then please make sure you select Script at a dropdown box.

Enter OS credentials for a Target System

Add a schedule on what times you want to run “command/script”.

Now select “Save to Library” from right hand top menu.

Upload failed with ret=-10 / Agent is Running but Not Ready

Posted by Sagar Patil

Background : I have installed OMS/OMR and OMA successfully. In theory I should see OMA client successfully configured at OMS grid console but

$ ./emctl status agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
—————————————————————
Agent Version     : 10.2.0.3.0
OMS Version       : 10.2.0.2.0
Protocol Version  : 10.2.0.2.0
Agent Home        : /opt/oracle/product/oracle10gAgent/agent10g
Agent binaries    : /opt/oracle/product/oracle10gAgent/agent10g
Agent Process ID  : 23314
Parent Process ID : 23295
—————————————————————
Agent is Running but Not Ready

To locate an exact error look at OMS files $OMS_HOME\sysman\log\emoms.log and $OMS_HOME\sysman\log\emoms.trc

My  $OMS_HOME\sysman\log\emoms.trc show error at  Trigger ‘SYSMAN.EM_VIOLATION_CHECKS’

2008-12-02 15:00:37,180 [SeverityLoad https://bmhp01:3872/emd/main/] ERROR XMLLoader.Handler processInsertException.462 – java.sql.SQLException: ORA-20612: Internal error processing severity. Closing availability record with negative duration for :  (target_guid = 1C2A2131D1A40C621929D7CE63032001) (collection_ts = 2008-12-02 14:47:07) (current_status = AGENT DOWN)
ORA-06512: at “SYSMAN.EM_SEVERITY”, line 2110
ORA-06512: at “SYSMAN.EM_SEVERITY”, line 3287
ORA-06512: at “SYSMAN.EM_VIOLATION_CHECKS”, line 791
ORA-04088: error during execution of trigger ‘SYSMAN.EM_VIOLATION_CHECKS’

Check at Google or metalink for further details on it.

– Sometimes you may have to delete records from OMR tables to fix this issue see Note:603011.1

– For ORA-04088: during execution of trigger SYSMAN.TARGETS_INSERT_TRIGGER , locate TARGET_GUID/AGENT_GUID at emoms.log  for example CE6B5C2E232766E01D3803EB03D70128 and run “delete from MGMT_TARGET_ASSOC_INSTANCE where target_guid = HEXTORAW(‘TARGET_GUID’);”

How to fix it? For clustered install (RAC/OS cluster) please see details here

$ ./emctl stop agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
Stopping agent … stopped.

Delete all files in $AGENT_HOME/sysman/emd/upload and $AGENT_HOME/sysman/emd/state

$ ./emctl clearstate agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
EMD clearstate completed successfully

$ ./emctl unsecure agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
Checking Agent for HTTP…   Done.
Agent is already stopped…   Done.
Unsecuring agent…   Started.
OMS Upload URL – http://ASST105157:4889/em/upload/ is locked or unavailable.

$ ./emctl upload agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
—————————————————————
EMD upload completed successfully

$ ./emctl status agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
—————————————————————
Agent Version     : 10.2.0.3.0
OMS Version       : 10.2.0.2.0
Protocol Version  : 10.2.0.2.0
Agent Home        : /opt/oracle/product/oracle10gAgent/agent10g
Agent binaries    : /opt/oracle/product/oracle10gAgent/agent10g
Agent Process ID  : 23314
Parent Process ID : 23295
Agent URL         : https://bmhp01:3872/emd/main/
Repository URL    : https://ASST105157:1159/em/upload
Started at        : 2008-12-02 14:52:07
Started by user   : oracle
Last Reload       : 2008-12-02 14:52:07
Last successful upload                       : 2008-12-02 15:05:03
Total Megabytes of XML files uploaded so far :     5.25
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    32.43%
Last successful heartbeat to OMS             : 2008-12-02 15:04:50
—————————————————————
Agent is Running and Ready

$ ./emctl secure agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
Enter Agent Registration password :
Agent successfully stopped…   Done.
Securing agent…   Started.
Requesting an HTTPS Upload URL from the OMS…   Done.
Requesting an Oracle Wallet and Agent Key from the OMS…   Done.
Check if HTTPS Upload URL is accessible from the agent…   Done.
Configuring Agent for HTTPS in CENTRAL_AGENT mode…   Done.
EMD_URL set in /opt/oracle/product/oracle10gAgent/agent10g/sysman/config/emd.properties
Securing agent…   Successful.

I can see new new target at grid console

Top of Page

Top menu