Subscribe to Posts by Email

Subscriber Count

    701

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

Grid Control: Exporting and importing monitoring templates

We may need sometimes to export or import the monitoring templates in Oracle grid control from one environment to new environment, for example when you upgrade or a new OMS infrastructure has been built, in this case the emcli export/import will help you to copy the monitoring templates between environments, lets see how to do it.

1) Log into emcli (sysman)

2) exporting from UAT environment

emcli export_template -name="TEST skeleton listener" -target_type=oracle_listener > TEST_listener.xml
emcli export_template -name="TEST skeleton db instance" -target_type=oracle_database > TEST_db.xml
emcli export_template -name="TEST skeleton rac" -target_type=rac_database > TEST_rac.xml
emcli export_template -name="TEST skeleton host" -target_type=host > TEST_host.xml
emcli export_template -name="TEST skeleton cluster" -target_type=cluster > TEST_cluster.xml
emcli export_template -name="TEST skeleton ASM" -target_type=osm_instance > TEST_asm.xml
emcli export_template -name="TEST skeleton agent" -target_type=oracle_emd > TEST_agent.xml

3) importing into Production environment after logging into emcli in OMS

emcli import_template -files="TEST_listener.xml;TEST_db.xml;
TEST_rac.xml;TEST_host.xml;TEST_cluster.xml;TEST_asm.xml;TEST_agent.xml"

4) Assign the new templates to them from OEMGC Console GUI, in a controlled manner.
In OEM, navigate to Setup -> Monitoring Templates
Choose the radio button against the standard template of your target type, and Click --> Apply.
Under --> Destination Targets--> , click --> Add.
Check the databases that you want this template to be applied to, and Click ->Select .
Click OK.

Reference:-
How To Export , Import Templates via emcli Utility. (Doc ID 740806.1)
1) Find templates in source Repository database. Connect to the repository Database as
SYSMAN and execute the following SQL statement.

SQL> select TARGET_TYPE,TEMPLATE_NAME from MGMT_TEMPLATES where TEMPLATE_NAME like '%TEMPLATE NAME%';

2) Export template from source environment.

$ emcli export_template -name=Host -target_type=host -output_file=Host.XML
$ emcli export_template -name=Listener -target_type=listener -output_file=Listener.XML
$ emcli export_template -name=Database -target_type=oracle_database -output_file=Database.XML

3) Copy file to another server, with emcli configured for target environment.

4) Import exported template at target environment.

$ emcli import_template -files=Host.XML
$ emcli import_template -files=Listener.XML
$ emcli import_template -files=Database.XML

Hope this helps
-Thanks
Geek DBA

Comments are closed.