Using the Always-On Monitoring Configuration Assistant (EMSCA)
The Always-On Monitoring configuration assistant, emsca, is a script located under the Always-On Monitoring installation scripts directory. Running emsca requires the bash shell to be installed.
If you have database administrator credentials, you can pass them to the emsca script and it will create the Always-On Monitoring user for you.
If you do not have database administrator credentials, you need to:
-
Ask the database administrator to run the script. See Creating the Always-On Monitoring Repository User.
-
Run
emsca -createEmsDbUser=false
The following example usage scenarios assume Always-On Monitoring is installed in a location referred to using the environment variable AOM_HOME. Run the configuration assistant located in $AOM_HOME/scripts. The EMSCA may be invoked with no parameters and will prompt for the necessary information. Once the configuration has completed, record the Always-On Monitoring Upload URL as it will be used later to configure Enterprise Manager.
Example EMSCA Installation Scenarios
The user installing Always-On Monitoring has SYSDBA credentials.
Copyright (c) 2017, 2020 Oracle Corporation. All rights reserved. --------------------------------------------------------------- Always-On Monitoring Repository Connection String : myserver.myco.com:25059:s307480 Always-On Monitoring Repository Username [ems] : Always-On Monitoring Repository Password [ems] : User "ems" cannot be found in the database. In order to create this user, SYSDBA credentials are required. If you do not want to continue, answer "n" to the question below. Create the Always-On Monitoring Repository user [y] : Always-On Monitoring Repository SYSDBA Username : sys Always-On Monitoring Repository SYSDBA Password : Enterprise Manager Repository Connection String : myserver.myco.com:25059:s307480 Enterprise Manager Repository Username : sysman Enterprise Manager Repository Password : Creating Always-On Monitoring repository user ems Agent Registration Password : Keystore for host myserver.myco.com created successfully. Connecting to Always-On Monitoring Repository. Creating Always-On Monitoring Repository schema Creating repository storage for Targets data. Creating repository storage for Alerts and Availability data. Creating repository storage for Notification Metadata data. Creating repository storage for Target Metric Metadata data. Registering Always-On Monitoring instance Always-On Monitoring Upload URL: https://myserver.myco.com:8081/upload
The user installing Always-On Monitoring does not have SYSDBA credentials.
Example 1: SYSDBA creates an Always-On Monitoring user and grants user privileges shown in the following example.
aomuser is the name of the Always-On Monitoring user in the database.
SYSDBA privileges are required to run the following script
create user aomuser identified by <password>; grant CREATE JOB, CREATE SESSION, ALTER SESSION, CREATE DATABASE LINK, CREATE MATERIALIZED VIEW, CREATE PROCEDURE, CREATE PUBLIC SYNONYM, CREATE ROLE, CREATE SEQUENCE, CREATE SYNONYM, CREATE TABLE, CREATE TRIGGER, CREATE TYPE, CREATE VIEW, UNLIMITED TABLESPACE, SELECT ANY DICTIONARY to aomuser; grant EXECUTE ON SYS.DBMS_CRYPTO to aomuser; grant EXECUTE ON SYS.DBMS_AQADM to aomuser; grant EXECUTE ON SYS.DBMS_AQ to aomuser; grant EXECUTE ON SYS.DBMS_AQIN to aomuser; grant EXECUTE ON SYS.DBMS_SCHEDULER to aomuser; grant EXECUTE ON SYS.DBMS_LOCK to aomuser;
Example 2: The Always-On Monitoring user invokes the EMSCA script..
Oracle Enterprise Manager Cloud Control 13c Release 4 Copyright (c) 2017, 2020 Oracle Corporation. All rights reserved. --------------------------------------------------------------- Always-On Monitoring Repository Connection String : myserver.myco.com:25059:s307480 Always-On Monitoring Repository Username [ems] : aomuser Always-On Monitoring Repository Password [ems] : Always-On Monitoring Repository user "aomuser" has already been created Enterprise Manager Repository Connection String : myserver.myco.com:25059:s307480 Enterprise Manager Repository Username : sysman Enterprise Manager Repository Password : Agent Registration Password : Keystore for host myserver.myco.com created successfully. Connecting to Always-On Monitoring Repository. Creating Always-On Monitoring Repository schema Creating repository storage for Targets data. Creating repository storage for Alerts and Availability data. Creating repository storage for Notification Metadata data. Creating repository storage for Target Metric Metadata data. Registering Always-On Monitoring instance Always-On Monitoring Upload URL: https://myserver.myco.com:8081/upload
SYSDBA creates a role and assigns it to Always-On Monitoring user then emsca is executed.
Some sites prefer to create a role and assign that role to the Always-On Monitoring user. In this situation, you must run the scripts shown in the following examples.
create user <aom_user> identified by <aom_password>; create role ems_role; grant CREATE SESSION, ALTER SESSION, CREATE DATABASE LINK, CREATE MATERIALIZED VIEW, CREATE PROCEDURE, CREATE PUBLIC SYNONYM, CREATE ROLE, CREATE SEQUENCE, CREATE SYNONYM, CREATE TABLE, CREATE TRIGGER, CREATE TYPE, CREATE VIEW, SELECT ANY DICTIONARY to ems_role; grant ems_role to <aom_user>;
grant CREATE JOB, UNLIMITED TABLESPACE to <aom_user>; grant EXECUTE ON SYS.DBMS_CRYPTO to <aom_user>; grant EXECUTE ON SYS.DBMS_AQADM to <aom_user>; grant EXECUTE ON SYS.DBMS_AQ to <aom_user>; grant EXECUTE ON SYS.DBMS_AQIN to <aom_user>; grant EXECUTE ON SYS.DBMS_SCHEDULER to <aom_user>; grant EXECUTE ON SYS.DBMS_LOCK to <aom_user>;
Oracle Enterprise Manager Cloud Control 13c Release 4 Copyright (c) 2017, 2020 Oracle Corporation. All rights reserved. --------------------------------------------------------------- Always-On Monitoring Repository Connection String : myserver.myco.com:25059:s307480 Always-On Monitoring Repository Username [ems] : Always-On Monitoring Repository Password [ems] : Always-On Monitoring Repository user "ems" has already been created Enterprise Manager Repository Connection String : myserver.myco.com:25059:s307480 Enterprise Manager Repository Username : sysman Enterprise Manager Repository Password : Agent Registration Password : Keystore for host myserver.myco.com created successfully. Connecting to Always-On Monitoring Repository. Creating Always-On Monitoring Repository schema Creating repository storage for Targets data. Creating repository storage for Alerts and Availability data. Creating repository storage for Notification Metadata data. Creating repository storage for Target Metric Metadata data. Registering Always-On Monitoring instance Always-On Monitoring Upload URL: https://myserver.myco.com:8081/upload
Running EMSCA with a Response File
$ emsca -responseFile=<response_filename>
emsRepConnectString=localhost:1521:xe emsRepUsername=ems emsRepPassword=ems emRepConnectString=mymachine.mycompany.com:15044:semgc3 emRepUsername=sysman emRepPassword=sysman # emsPort=8081 http.protocol=http #
The following table lists available EMSCA parameters.
Table 17-3 EMSCA Parameters
EMSCA Prompt | Description |
---|---|
Always-On Monitoring Repository Connection String |
The connect string used to locate the Always-On Monitoring repository. This may be any valid service descriptor or may be a |
Always-On Monitoring Repository Username |
The username associated with the Always-On Monitoring repository. See Creating the Always-On Monitoring Repository Userfor more details. |
Always-On Monitoring Repository Password |
The password associated with the Always-On Monitoring repository user. See Creating the Always-On Monitoring Repository User for more details. |
Enterprise Manager Repository Connection String |
The connect string used to locate the Enterprise Manager repository. This may be any valid service descriptor or may be a host:port:sid. |
Enterprise Manager Repository Username |
The username of the Enterprise Manager SYSMAN user. |
Enterprise Manager Repository Password |
The password of the Enterprise Manager SYSMAN user. |