Re: emcli

From: Robert Hanuschke <robert.hanuschke_at_gmail.com>
Date: Fri, 3 Aug 2012 10:56:29 +0200
Message-ID: <CAL6WDh0+LuSxip9NyZQ+0u1FUtwCPxnqzRg_SLT+MiShfvLiDA_at_mail.gmail.com>



Hi Gerry,
we have to separate here between emcli and emctl.

emcli
... is a standalone command line interface that you can install e.g. on your desktop pc without having any other kind of oracle software there. you can control your whole environment using it. lots of things (by far not all but a very useful subset of functionalities) that can be done in the web console can also be done via the emcli, affecting lots of targets.

emtcl
... is part of the enterprise manager agent, so will typically reside on your database server.
you can only control targets that reside on the same machine as the agent. limited functionality compared to the emcli, but it comes with every agent and you don't have to configure it specifically.

the emcli "talks" to the oms and commands it to execute whatever you told it to.
emctl "talks" to the oms via uploading xml and dat files. the oms loader processes read those files and execute whatever you told emctl to do. you can test that by going to $AGENT_HOME/sysman/emd/upload and issuing "watch -n 1 'ls -ltrh | tail' (assuming you do have a linux environment somewhere) in one window and creating a blackout for a target in another one. you'll see the the files being created for that task for a very brief time, they get uploaded instantly after creation.

about the other question:
may I see the script or the relevant parts of it? never had an issue like that.

Best regards,
Robert
http://robertvsoracle.blogspot.com

On Fri, Aug 3, 2012 at 1:19 AM, Gerry Miller <gerry_at_millerandbowman.com>wrote:

> **
> Hi Robert
>
> Thanks for that. Good point. I was assuming that because tables such as
> EM_BLACKOUT were updated that it was happening from the emcli command, but
> now realise that it is the agent that performs these database
> transactions. Or I am I assuming erroneously again?
>
> Another question along the same lines: I am trying to execute two emctl
> commands sequentially within a windows batch script, namely to create an
> immediate blackout and then stop the agent, but find that the script exits
> after the first command. The emcli command has a parameter, 'argfile',
> that overcomes this but I can't find an equivalent in emctl. Is there any
> way of doing this?
>
> Thanks and Regards
>
> Gerry
>
>
>
> Robert Hanuschke wrote:
>
> Hi Gerry,
> a note on the redundancy part:
>
> It is not redundant. The emcli does in no way use any of the rdbms
> binaries, let alone anything inside the database itself.
> You can install an emcli on any computer in your network and use it to
> create a blackout on a database that runs on another computer/server.
> So have no worries doing it as OS process - in fact, that would be LESS
> redundant.
>
> A hint from my experience in using emcli in scripts:
> Be sure to to set the JAVA_HOME variable (to the correct java version
> directory) and put that one into the PATH as well before actually calling
> the emcli. Most of the errors I've seen and fixed had to do with those two
> environment variables.
>
> Best regards,
> Roberthttp://robertvsoracle.blogspot.com
>
> On Tue, Jul 24, 2012 at 1:50 AM, Gerry Miller <gerry_at_millerandbowman.com> <gerry_at_millerandbowman.com>wrote:
>
>
>
> Hi,
>
> I am looking for way to create a blackout in EM 12c Cloud Control from
> within the database. I am currently doing it using a perl script but am
> having problems running it as a scheduled task on windows. I am
> thinking of using Java or external procedures but would much prefer to
> run the whole thing from within. It seems redundant to have a database
> procedure that calls an OS script that calls the database.
>
> Any suggestions welcome.
>
> Regards
>
> Gerry Miller
> --http://www.freelists.org/webpage/oracle-l
>
>
>
> --http://www.freelists.org/webpage/oracle-l
>
>
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Aug 03 2012 - 03:56:29 CDT

Original text of this message