4.3.2 Script Output

Running Example 4-5 with various options provides the following outputs:

Example 4-6 Output from promote_discovered_dbs.py with -all option

$ emcli @promote_discovered_dbs.py -url https://host.us.example.com:7799/em -username sysman -password welcome1 -monitor_pw welcome1 -all
Adding target sid7458.us.example.com... host.us.example.com
Succeeded
Logout successful

Example 4-7 Output from promote_discovered_dbs.py with -targets option

$ emcli @promote_discovered_dbs.py -url https://host.us.example.com:7799/em -username sysman -password welcome1 -monitor_pw welcome1 -targets sid7458.us.example.com
Adding target sid7458.us.example.com... host.us.example.com
Succeeded
Adding target db1... host.us.example.com
Succeeded
Adding target db2... host.us.example.com
Succeeded
Adding target db3... host.us.example.com
Succeeded
Logout successful

Example 4-8 Output from promote_discovered_dbs.py with -targets option

$ emcli @promote_discovered_dbs.py -url https://host.us.example.com:7799/em -username sysman -password welcome1 -monitor_pw welcome1 -targets db1:db2:db3
Adding target db1... host.us.example.com
Succeeded
Adding target db2... host.us.example.com
Succeeded
Adding target db3... host.us.example.com
Succeeded
Logout successful

Example 4-9 Output from promote_discovered_dbs.py where the specified targets do not exist

$ emcli @promote_discovered_dbs.py -url https://host.us.example.com:7799/em -username sysman -password welcome1 -monitor_pw welcome1 -targets abc
INFO: There are no targets to be promoted. Please verify the targets in Enterprise Manager webpages.
Logout successful

Example 4-10 Output from promote_discovered_dbs.py where no targets are available for promotion

$ emcli @promote_discovered_dbs.py -url https://host.us.example.com:7799/em -username sysman -password welcome1 -monitor_pw welcome1 -all
INFO: There are no targets to be promoted. Please verify the targets in Enterprise Manager webpages.
Logout successful

Example 4-11 Output from promote_discovered_dbs.py where the -all or -targets option is missing

$ emcli @promote_discovered_dbs.py -url https://host.us.example.com:7799/em -username sysman -password welcome1 -monitor_pw welcome1
Missing required arguments (-targets or -all)
Usage: promote_discovered_dbs.py [-help]
[-all] Add all discovered Single Instance DBs
[-targets <target1:target2:...] Add only targets listed
Logout successful