[Oracle] manual configuration of Oracle 10g enterprise manager [reprinted]

Source: Internet
Author: User

Manual configuration of Oracle 10g Enterprise Manager
The following error is reported when oracle is installed several times;

Enterprise Manager Configuration failed due to the following error
An error occurred while starting Database Control.
For more information, see log files in E: \ oracle \ product \ 10.2.0 \ db_1 \ export toollogs \ dbca \ oradb \ emconfig. log.
You can manually run the E: \ oracle \ product \ 10.2.0 \ db_1 \ bin \ emca script to re-use Enterprise Manager to configure the database ."

Recently, when I learned how to install a database, I used a variety of methods to create it, such as dbca, manual creation, and template creation. When I used dbca to create data
The "Use Enterprise Manager to configure the Database" option is not selected during the database, so that you will not be able to use EM later. You must manually configure em
The following describes how to use EM in two single-instance environments.

The first method is to use dbca to configure em.
Enter dbca at the command prompt. The "Welcome to database configuration assistant" page appears. Click Next and select configure database,
Click Next, select the database for which you want to prepare the EM, and click Next to hook up the "Configure database with Enterprise Manager" option, because
To configure a single instance, select "Use Database Control to manage data". The following two options enable email notification and enable daily backup
Click here to select the "Enterprise Manager archives". Otherwise, you cannot use em. click Next,
Then, you are prompted to set the password for both Dbsnmp and sysman. You can set whether the password is set to the same or separate settings based on your own situation.
Click the next step. After the preparation is completed, the prompt information box appears. After the preparation is complete, exit dbca and complete the EM configuration of the database.

Advantage: This method is simple, convenient, and not easy to configure. You do not need to note complex commands, and the preparation is successful.
Disadvantage: dbca cannot be used in environments where you cannot use dbca. in Linux, you cannot use dbca to create a database by a worker, and dbca cannot delete em.
Save and cancel Database Control Configuration.

Method 2: Use emca to configure em
Emca is a command prompt. Enter emca in the command prompt using the format and method. The emca help is displayed on the screen.

Command help:
Emca [operation] [mode] [database type] [tag] [parameter]

The following two commands are commonly used:
Emca-config dbcontrol DB-repos create Create create em database and configure Database Control at the same time
Emca-deconfig dbcontrol DB-repos drop Delete Database Control and delete em database at the same time

My understanding is as follows:
[Operation] corresponds to-config and-deconfig, which indicate the meaning of preparation. Note: "-" cannot be less
The [mode] corresponds to dbcontrol, which means Database Control.
[Database type] corresponds to the database, which means to perform configuration operations on the database (including databases using ASM ).
[Mark] No.
[Parameter] corresponds to-repos create and-repos drop, meaning to create and delete the current em Database

If we have not prepared a database control or an EM database, run the following command:
Emca-config dbcontrol DB-repos create

Database Sid: orcl
Listener port: 1521
Sys user password:
Dbsnmp user password:
Password of the sysman User:
Password of the sysman User: email address of the notification (optional ):
Notification sending (SMTP) server (optional ):
Continue? [Yes (y)/NO (n)]: Y

If dbcontrol is started successfully, the following startup information is displayed:
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996,200 5 Oracle Corporation. All rights reserved.
Http: // zjhmobile: 1158/EM/console/aboutapplication
Starting Oracle Enterprise Manager 10g Database Control... oracledbconsoleorcl
The service is starting ........................
The oracledbconsoleorcl service has been started successfully.

Enter http: // zjhmobile: 1158/EM/in the web browser to view the startup information.
Note! Zjhmobile is your machine name and IP address.

If the original em database has been created, you can configure the Database Control
Emca-config dbcontrol DB

If you need to delete the Database Control Configuration, but do not delete the EM Database
Emca-deconfig dbcontrol DB

If you need to delete all of them, enter the following command: (Note! Dbca does not delete the EM database or cancel Database Control Configuration)
Emca-deconfig dbcontrol DB-repos drop

Delete An EM database. However, if the Database Control is configured, it cannot be used and the dbconsole service must be stopped before it can be used.
Emca-repos drop

Create an EM database. If the Database Control is configured but the EM database does not exist, run the following command to create the database.
Emca-repos create

Rebuilding an EM Database
Emca-repos recreate

If our database has not prepared any information, use a statement to prepare it.
Emca-config dbcontrol DB-repos create
You need to delete all the EM databases.
Emca-deconfig dbcontrol DB-repos drop
But we can also configure it step by step, or we need to use separate commands to solve the problem in em.

Command summary:
Emca-config dbcontrol DB-repos create Create create em database and configure Database Control
Emca-deconfig dbcontrol DB-repos drop cancel Database Control Configuration and delete the EM Database
Emca-repos create creates an EM Database
Emca-repos recreate re-creates an EM Database
Emca-repos drop delete an EM Database
Emca-config dbcontrol dB configure Database Control of the database
Emca-deconfig dbcontrol dB deletes the Database Control Configuration of a Database
Emctl start dbconsole first sets the oracle_sid environment variable and then starts the EM console service
Emctl stop dbconsole first sets the oracle_sid environment variable and then stops the EM console service
Emctl status dbconsole first sets the oracle_sid environment variable to view the EM console service status

Advantage: you can complete the preparation or delete the em when dbca cannot complete the EM preparation.
Disadvantage: complicated, incorrect command parameters, and frequent errors.
Errors often occur under the command. You must analyze the error cause based on the error prompt and log, and then solve the error based on the error cause.
To solve the problem.

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: info-contact@alibabacloud.com 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.