Enterprise Manager Generic (MOSC)

MOSC Banner

How to promote an auto-discovered Oracle Home using SQL+ and EM CLI

edited Jul 29, 2016 4:07AM in Enterprise Manager Generic (MOSC) 12 commentsAnswered ✓

I need to script an EM CLI promotion of Oracle Homes as they are picked up by auto-discovery.

The CLI created by the SQL query below fails for lack of a reference to the O/H's directory location:

SELECT DISTINCT

    'emcli add_target -name="'

    || entity_name

    || '" -type="'

    || entity_type

    || '" -host="'

    || host_name

    || '";'

FROM sysman.mgmt$manageable_entities

WHERE manage_status = '1'

AND promote_status = '1'

AND entity_type = 'oracle_home';

I need to pass the Oracle Home directory as part of the CLI command but I can't find it in the SYSMAN schema. 

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center