Configure Oracle Database control with EMCA installation under the command line interface ____oracle

Source: Internet
Author: User

http://blog.csdn.net/smstong/article/details/37659397



As a command line loyal user, the server-side software's operation dimension tends to use the command or the script completes, very hates the resource to occupy the very large GUI. Oracle database as an important server-side software, its installation and Operation dimension also fully support the pure command-line approach, although it also provides the Oui GUI installer. As for the pure command line under the silent installation oracle11g, I have written a detailed blog, there is a need to refer to, Bowen address http://blog.csdn.net/smstong/article/details/7352036. The database installed by this blog post is fully available. This article is a supplement to the previous post, which is to install the Oracle Enterprise Manager on the basis of the completion of the database installation, so that administrators can use the browser to manage Oracle databases when they are tired of pure sqlplus. 1 Oracle Enterprise Manager and Oracle Database control

OEMs are collectively referred to as the graphical enterprise-class management tools provided by Oracle. Specifically, there are three tools available:

(1) Database control

It is used to manage a database (can be a RAC cluster database), with real-time management and monitoring functions, running the scheduling function, Alarm function.

(2) Application Server control

Used to manage one or more application server instances.

(3) Grid control

Grid control can manage multiple databases and application servers , manage computer nodes, and support Third-party products through Third-party plug-ins.


In Oracle9i and before, OEM is based on C/s architecture, starting from 10g, using B/s architecture, so that administrators do not need to install clients directly through the browser to manage. This article focuses on the database control tool, the database control does not need to be installed separately, it is installed automatically when Oracle is installed, but must be carefully configured to use. 2 Oracle Database Control directory structure and working principle analysis Any software needs to start from the static and dynamic two aspects, static corresponding to the software after the installation of the physical directory and file layout Dynamic corresponds to the interaction process and memory layout between the parts of the software runtime. 2.1 directory Structure

The directory structure of the Database control in 10g and 11g is slightly different, as described in 11g.


After ORACLE 11g is installed, there will be a directory specifically serviced for database control $ORACLE The _home directory, as shown in the figure above. Where oc4j is the Oracle container for Java EE abbreviation, is oracle-specific Java EE container similar to tomcat. 2.2 Working principle in essence, the database control itself is a Java EE application, but the function of this application is very single, is to manage Oracle database. It runs in Oracle's Custom Java container, uses its managed Oracle database to store its own data, and uses agent processes to collect system information outside the database.
Purely from a procedural point of view, database control itself is not associated with an Oracle database that it manages (called the target database), and it is entirely possible to use a separate database (such as a separate Oracle database or MySQL database) to store its own data. It can also be run in a container that complies with the Java standard for a separate machine (such as Tomcat). But Oracle takes into account efficiency and configuration, customizes its own containers, and uses the target database to store management data and runs on the same machine as the target database instance.
The working principle of Database control is shown in the following illustration.


The management data used by database control itself is stored in the Sysman mode.

Understanding how the work works, its configuration is easy to understand. As with the deployment of other Java EE programs, it needs to be done from two aspects of data and program files. In essence, all of these operations can be done by hand to one by one, but whether the establishment of a large number of configuration files or create a large number of data tables, pure manual method will be very inefficient and error prone. So Oracle provides specialized tool software for deploying database control.


If you use Oui to install Oracle, you can configure database control during Setup, and you can configure it through DBCA after installation, which is a handy GUI tool, but the purpose of this article is to configure it under a pure command line, so this is not available.


To cope with the configuration under command-line mode, Oracle has specifically provided configuration Assistant EMCA (Enterprise Manager Configuration Assistant) for database control. 3 using EMCA to configure Database control 3.1 Configuration Data

The command used is: Emca-repos create

Its role is to create the necessary user (schema) (Sysman, DBSNMP, etc.) and schema objects (stored procedures, tables, indexes, and so on) for the database control in databases. The EMCA itself is a script file that ultimately invokes the Java program to do the actual work. Because you need to invoke some functions or procedures provided by an Oracle database as a Sysman user during the creation of an object, you must ensure that Sysman has the relevant permissions. This is where the configuration usually goes wrong.


It should be noted that EMCA first created the Sysman account as SYS and then created the subsequent objects in Sysman account. Then the two are contiguous and do not give us the opportunity to modify the Sysman privilege. So we're going to give the public account the permissions Sysman need before running EMCA, so that when the Sysman account is created, it will automatically have the appropriate permissions.


So what do you need to give sysman those privileges? The answer is a lot. My approach is to run EMCA first, if the permissions are problematic EMCA will explode, and then according to the error log to find the missing permissions, then assign this permission to public, and then Emca-repos recreate.

Here is an example of an error:

[Plain]  View Plain copy [oracle@db001 ~]$ emca -repos recreate;      started  EMCA at Jul 10, 2014 4:18:24 PM   em configuration  assistant, version 11.2.0.0.2 production   copyright  (c)  2003, 2005,  Oracle.  All rights reserved.      enter the following  information:   database sid: xgdb   listener port number:  1521   password for sys user:   Password for sysman user:    password for sysman user:   do you wish to continue?  [yes (Y)/no (N)]: y   jul 10, 2014 4:18:37 pm  oracle.sysman.emcp.emconfig perform   info: this operation is being  Logged at /oracle/cfgtoollogs/emca/xgdb/emca_2014_07_10_16_18_24.log.   jul 10, 2014 4:18:37 pm  oracle.sysman.emcp.emreposconfig invoke   info: dropping the em repository   (this may take a while)  ...   jul 10, 2014 4:19:44  PM oracle.sysman.emcp.EMReposConfig invoke   info: repository successfully  dropped   Jul 10, 2014 4:19:44 pm oracle.sysman.emcp.emreposconfig  createRepository   info: creating the em repository  (This may  take a while)  ...   jul 10, 2014 4:21:53 pm  oracle.sysman.emcp.emreposconfig invoke   severe: error creating the  repository   jul 10, 2014 4:21:53 pm oracle.sysman.emcp.emreposconfig  invoke   info: refer tO the log file at /oracle/cfgtoollogs/emca/xgdb/emca_repos_create_<date>.log  for more details.   jul 10, 2014 4:21:53 pm  oracle.sysman.emcp.emconfig perform   severe: error creating the repository    refer to the log file at /oracle/cfgtoollogs/emca/xgdb/emca_2014_07_ 10_16_18_24.log for more details.   could not complete the  Configuration. refer to the log file at /oracle/cfgtoollogs/emca/xgdb/emca_ 2014_07_10_16_18_24.log for more details.  
The above is an example of an error, seen from the red section, which failed to create the data, viewing the log file according to the information provided:

[Plain]View Plain Copy 313 June, 2014 4:19:44 PM oracle.sysman.emcp.EMReposConfig createrepository config:spooling Racle/cfgtoollogs/emca/xgdb/emca_repos_create_2014_07_10_16_19_44.log 315 June, 2014 4:19:44 PM   Oracle.sysman.emcp.EMReposConfig createrepository 316 info:creating the EM repository (this may take a while) ... 317 June, 2014 4:21:53 PM oracle.sysman.emcp.EMReposConfig createrepository 318 config:ora-04063:package Body "Sysma N.mgmt_login_assistant "has errors 319 ora-06508:pl/sql:could not found program unit being called: Here you can see that the probable error is Sysma N.mgmt_login_assistant This package has a problem with compiling, and to get detailed errors, continue to view the log file for the prompt.

[Plain]

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.