IBM Support

Oracle populate osagents command fails with ORA-06512: at line 2

Technical Blog Post


Abstract

Oracle populate osagents command fails with ORA-06512: at line 2

Body

image
 

 

 

 

 

 

 

 

 

 

 

 

Oracle populate osagents command fails with  ORA-06512: at line 2

If your site runs the Tivoli Data Warehouse, each time you install one or more monitoring agents, you must update the warehouse's ManagedSystem table;

the populate_agents.sql script is provided for this purpose.

The details are in the manual here:

https://www.ibm.com/support/knowledgecenter/SSTFXA_6.3.0/com.ibm.itm.doc_6.3/install/tdwmngdsys.htm

 

However after the initial run of this script, if you need to run this again later when more agents are added,
on an Oracle database the errors below are sometimes seen:


POPULATE_OSAGENTS('ITMUSER');

  ERROR at line 1:
    ORA-00001: unique constraint (ITMUSER.IXMANAGEDSYSTEM) violated
    ORA-06512: at "ITMUSER.POPULATE_OSAGENTS", line 124
    ORA-06512: at "ITMUSER.POPULATE_OSAGENTS", line 143
    ORA-06512: at line 2

and the new agents are not added to the MANAGEDSYSTEM table.

 

This can be because the name of the tablespace is not correct.

When you run the setup_populate_agents.sql you will asked about the tablespace name,
when this is not the correct tablespace name you will get the above described behaviour.

 

 

To fix this;

 
Drop the  MANAGEDSYSTEM table

Then re-run the setup_populate_agents.sql with the current tablespace, this will then populate the table with all the agents.

 

  Start a SQL *Plus session if it is not already running.

        Create the ITMUSER.ManagedSystem table.

The script must be called by the Tivoli Data Warehouse user, which is ITMUSER by default.

If you used a different user name, modify the script for the correct name.


        @MY_PATH\create_table.sql

Create the procedure to populate the table:

        @MY_PATH\create_procedure.sql

 Start the procedure to populate the ManagedSystem table:

 begin

POPULATE_OSAGENTS('ITMUSER');

end;

 

To find out the current tablespace name
go into the Oracle Enterprise Management Console and see with tablespace name the ITMIUser is using:

 

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Tutorials Point

 

Subscribe and follow us for all the latest information directly on your social feeds:

 

 

image

 

image

 

image

 

 

  

Check out all our other posts and updates:

Academy Blogs:https://goo.gl/U7cYYY
Academy Videos:https://goo.gl/TLfMoF
Academy Google+:https://goo.gl/HnTs0w
Academy Twitter :https://goo.gl/HnTs0w


image

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSVJUL","label":"IBM Application Performance Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

UID

ibm11278178