Oracle--oem and common fault handling

Source: Internet
Author: User
Tags cpu usage sql using

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.

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.

OEM's use
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:

2) Close the OEM
Executes the emctl Stop Dbconsole command.

3) Start the OEM
Execute Emctl start Dbconsole

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

2) View the status of the OEM

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.

5) Enter the main interface

6) OEM Monitoring database running
Once the OEM is started, you can use the OEM to manage, monitor, and maintain the database. First visit the OEM. and log in using SYS or the SYSTEM account.
There are two types of roles for the OEM User: Administrator and non-administrator rights. Administrators have high privileges, such as monitoring, modifying settings, database auditing, upgrading, and backup recovery. Non-administrator permissions can only view information and cannot modify any settings. After logging in, you can see the OEM's main interface, divided into 7 functional tags for the user to choose, namely the home directory, performance, availability, server, scenario, data movement, software and support. The functions are described below.

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:

Click on the Listener, pop up the following interface

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.

A single-hit "Duplicate SQL" connection will show more SQL in the instance, and it is recommended that developers modify these sql using parameter bindings to improve CPU utilization.

9) Availability
The availability section is primarily for backup and recovery setup and management, and the following will be backed up using OEMs.

Click "Backup Settings" to go to the Backup Settings page

Fill in the host XXX, user name Oracle, password: XXX, the backup location of the disk by default, the degree of parallelism is 1, and finally click "Test Disk Backup". If successful, the setup is complete, otherwise fill in the prompts.

Then click on the "Backup Set" tab as shown in:

Fill in the size of the backup slice, compress the algorithm, click "OK" button to complete the setup. You can set the backup policy, retention policy, and other policies by clicking the Policies tab, which is the default setting.

Click OK when you are finished setting

Scheduled backup settings are required after the backup is set up ("scheduled backup" in single-click)

Fill in the correct xxx, click the "Schedule custom Backup" button

Set the schedule frequency, select once (immediate), and click Next.

After you review the previous settings and confirm the error, click Submit Job

After the scheduled backup succeeds, you can manage the backup by hitting the "Manage current backup" connection in one click

10) Server
The server section includes storage, database configuration, scheduling, statistics, resources, security, query optimization, and change data management capabilities, as shown in:

The following describes a common management feature: User management
Creating a user first creates a tablespace for the user, as shown in a list of key metrics for the tablespace, such as the allocated size, used space, whether it is auto-expanded, free allocated space, and a table space MDR in the following form.

Click OK in the lower-right corner, the table space is created, now create the user, first enter the user management interface, as shown in:

Click the Create button and enter the relevant information as shown in.

Then click on "Roles" to assign a role to the user, click "Edit List"

Then click OK to create the user.

11) Program
The program section mainly includes the management of database object, program, materialized view, word change management, user custom type, XML database, Workspace Manager and text manager, as shown in:

The most used is table management, which creates a new table for MDR users.

Single-hit "Create".

12) Data movement
The Data Movement section includes moving row data, mobile data files, stream management, and advanced replication capabilities.
Using the export function of moving row data, export the MDR scheme, click "Export to Export file"

However, I am not prompted to log in as SYSDBA, so I am replacing it here as a system user logon operation.

By default you can

After the confirmation is correct, submit the job.

The export file location is the location of the Data_pupm_dir directory, which can be queried by the SELECT * from Dba_directories.

13) software and support
The Software and Support section provides rich software management content, including software configuration management, patch management, real application testing, and deployment process Manager.

Configuration management: Host configuration, status information and resource usage information.
Patch Management: You can view current patch recommendations, prerequisites for installing patches, and application patches.
Real Application Testing: Includes database replay and SQL performance analysis program.
Deployment Process Manager: Manage the processes that are currently deployed, including editing, viewing, running, and monitoring the well-deployed process.

Oracle--oem and common fault handling

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.