First, OEM knowledge points
1. OEM Introduction
OEMs are a toolset that uses an intuitive and easy-to-use graphical interface to control and manage Oracle databases, and it contains a number of tools that are useful to DBAs. In Oracle, database management and operations can be done using OEMs, such as creating users and roles, assigning permissions, creating schema objects, storage management, and so on.
2. OEM Architecture
OEMs can manage not only local DB instances, but also database instances in the network and RAC environments. Whether you are managing a database on-premises or on a network, OEMs access the database through HTTP/HTTPS and its architecture
1) Management repository: Stores the management data and status information of the database to be monitored.
2) OMS Management Services: monitor and manage the database where the management agent is installed and store the obtained management information in management repository.
3) Oracle HTTP Server: Built-in Apache server.
4) OC4J/J2EE: Application server that complies with the Java EE standard.
5) Oracle Web cache: For quick access to the Web.
6) Management Agent: Installed on the managed data server, used to monitor the operation status of the database, resource usage, information changes, etc., to transfer the information to Oms,oms to the repository.
3, two versions of the OEM
OEMs have two different versions: Database control and Grid control. Database control is typically used to monitor and manage a local single database or RAC database. Grid control is used to manage large-scale, complex system environments that can manage the entire infrastructure, including hosts, databases, Web servers, listeners, services, and so on.
For database control, you usually do not have to configure anything, and when you have created the databases by using DBCA or Oracle Universal installer, it is ready to use. Of course, if you are creating a database manually from the CREATE DATABASE statement, you need to configure it with EMCA (Enterprise Manager configuration Assistant). The Grid control needs to be installed separately from the database, and the installation process and configuration are more complex.
Second, the use of OEM
1, OEM installation and configuration
When you install an Oracle database through the Oracle Universal installation, if you choose to create a database (or create a database directly from DBCA), the OEM control is installed by default. When the database is created, information about the OEM is displayed, and the Data Control URL is the OEM's access address.
1) Configure the OEM with DBCA
DBCA provides a graphical way to create OEMs, starting with DBCA first.
In this way, the configuration is done by using the OEM database control, which is simple and complete through DBCA visualization.
2) manual configuration with EMCA
If you create the database manually through the Create databases statement, you need to configure the OEM through EMCA. EMCA can set up various aspects of the OEM, such as rebuilding and deleting the repository store, creating and deleting configuration files, and so on. Here are the EMCA common commands.
Emca-config Dbcontrol DB: Configure the OEM database control.
Emca-deconfig Dbcontrol db: Remove the OEM Database control configuration file.
Emca-repos drop: Deletes the repository storage area.
Emca-repos Create: Creates a new repository store.
Emca-repos recreate: Rebuilds the repository storage area.
Use EMCA to reconfigure the OEM below. Executes the emca-config dbcontrol db-repos recreate command, which configures the OEM database control and rebuilds the repository store.
Note: If OEMs are not configured, use the Emca-config dbcontrol db-repos create command configuration.
2, using Emctl control OEM
Before using an OEM, you must ensure that the dbconsole process has started, and Oracle provides the Emctl tool to start and close the Dbconsole process and view its status.
1) View OEM status
Execute the EMCTL status dbconsole command to get the OEM running, the OEM's access address, and the log storage location. The results of the implementation are as follows:
3. Using OEMs to monitor and manage databases
OEMs provide very powerful monitoring and management capabilities, and several common operations are described below.
1) Use the OEM to start and close the database
First make sure the listener is running
3) to access the OEM URL, click the "Start" button
4) Go to the main interface, click "Start", go to the following interface, fill out and click "OK" in the upper right corner.
7) Home Directory
The Home Directory section presents the overall state of the DB instance, which is rendered graphically, while more specific metrics and content can be obtained by clicking on the appropriate content. For example, to get the CPU specifics, you can click the underlined data below the CPU graph. Other cases are similar, as shown in:
8) Performance
The performance section mainly provides host monitoring, user connection monitoring and I/O performance, as well as other relevant connectivity options to assist in judgment.
Host monitoring: monitor for the presence of CPU bottlenecks. It presents a graph of CPU usage, clearly showing the high and low CPU usage at different times. If you find that CPU usage is extremely high during a certain period of time, and you have a performance problem, such as an end user reflecting an application slowing down, then you need to analyze the user session to see those SQL consuming CPU resources.
Average Active session monitoring: This is a critical part of analyzing performance issues, which represent the events that the session is waiting for during a time period in the instance, and which sessions are waiting for those events, and the events are represented in different colors.
9) Availability
The availability section is primarily for backup and recovery setup and management, and the following will be backed up using OEMs.
Oracle (OEM and Common troubleshooting)