Wednesday, February 2, 2011

Create userdefined reports in Grid Control

You can define your own reports in Grid Control.

Login as sys on the Grid Repository and execute the following:

SQL> insert into sysman.mgmt_ip_report_elem_def values('target_user_table_from_sql','database_target_type','target_user_table_from_sql',
'oracle.sysman.db.util.reports.TableTargetRenderController',0,NULL,'EM',NULL,
'10.2.0.1.0');


SQL> insert into SYSMAN.MGMT_IP_ELEM_PARAM_CLASSES
(ELEMENT_NAME_NLSID, ELEMENT_TYPE_NLSID, ELEMENT_PARAM_CLASS, DISPLAY_ORDER)
values ('target_user_table_from_sql','database_target_type'

,'oracle.sysman.eml.ip.render.elem.HeaderParamController',1);

SQL> insert into SYSMAN.MGMT_IP_ELEM_PARAM_CLASSES
(ELEMENT_NAME_NLSID, ELEMENT_TYPE_NLSID, ELEMENT_PARAM_CLASS, DISPLAY_ORDER)
values ('target_user_table_from_sql', 'database_target_type', 'oracle.sysman.eml.ip.render.elem.SQLStatementParamController', 2);

sql> Commit;

Once completed, you will get a new report element called "target_user_table_from _sql" on the report page and you will be able to create reports that query target databases.

No comments:

Post a Comment