Oracle Enterprise Manager (OEM) is used to manage the database easily. The following options are available:
Database Grid Control
This option is available only if an Oracle Management Agent is installed on the system. When the Installer detects an Oracle Management Agent on the system, it allows you to choose this option and specify the Oracle Management Service that you want to use to manage the database.
If an Oracle Management Agent is not installed, you must choose to use Database Control to manage the database. However, if you install Oracle Management Agent after you install Oracle Database, you can then use Grid Control to manage this database.
Database Control
This option is selected by default if an Oracle Management Agent is not installed on the system. However, even if a Management Agent is installed, you can still choose to configure Database Control to manage the database.
In this article, I will provide detailed instructions on how to create the repository and configuration files for the DB Control application used to manage a single 10g Database.
It will include steps for both 10.1 and 10.2 EMCA because the commands changed between the two releases.
Database Control Configuration (dbconsole)
Option 1. Create the DB Control Configuration Files
To create only the DB Control configuration files, skipping the repository creation (this would be done for instance if you dropped only the files and left the repository in place):
Option 2. Create the DB Control Repository Objects and Configuration Files
举个例子:
EM console creation:
[oracle@JPSIT01 ORACLE_SID=gisdbu2]:/u01/app/oracle/product/10.1.4/bin
$ emca
STARTED EMCA at Fri Dec 28 12:14:11 SGT 2007
Enter the following information about the database to be configured
Listener port number: 1530
Database SID: gisdbu2
Service name: gisdbu2.oracle.com.sg
Email address for notification: anna@oracle.com.sg
Email gateway for notification: SPAV1
Password for dbsnmp:
Password for sysman:
Password for sys:
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u01/app/oracle/product/10.1.4
Enterprise Manager ORACLE_HOME ................ /u01/app/oracle/product/10.1.4
Database host name ................ JPSIT01
Listener port number ................ 1530
Database SID ................ gisdbu2
Service name ................ gisdbu2.oracle.com.sg
Email address for notification ............... anna@oracle.com.sg
Email gateway for notification ............... SPAV1
-----------------------------------------------------------------
Do you wish to continue? [yes/no]: yes
Dec 28, 2007 12:15:19 PM oracle.sysman.emcp.EMConfig updateReposVars
INFO: Updating file /u01/app/oracle/product/10.1.4/sysman/emdrep/config/repository.variables ...
Dec 28, 2007 12:20:01 PM oracle.sysman.emcp.EMConfig createRepository
INFO: Creating repository ...
Dec 28, 2007 12:20:01 PM oracle.sysman.emcp.EMConfig perform
INFO: Repository was created successfully
Dec 28, 2007 12:20:05 PM oracle.sysman.emcp.EMConfig addPortEntries
INFO: Updating file /u01/app/oracle/product/10.1.4/install/portlist.ini ...
Dec 28, 2007 12:20:05 PM oracle.sysman.emcp.EMConfig updateEmdProps
INFO: Updating file /u01/app/oracle/product/10.1.4/sysman/config/emd.properties ...
Dec 28, 2007 12:20:07 PM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: targets.xml file is updated successfully
Dec 28, 2007 12:20:07 PM oracle.sysman.emcp.EMConfig updateEmomsProps
INFO: Updating file /u01/app/oracle/product/10.1.4/sysman/config/emoms.properties ...
Dec 28, 2007 12:20:07 PM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: emoms.properties file is updated successfully
Dec 28, 2007 12:20:08 PM oracle.sysman.emcp.EMConfig startOMS
INFO: Starting the DBConsole ...
Dec 28, 2007 12:21:46 PM oracle.sysman.emcp.EMConfig perform
INFO: DBConsole is started successfully
Dec 28, 2007 12:21:46 PM oracle.sysman.emcp.EMConfig perform
INFO: >>>>>>>>>>> The Enterprise Manager URL is http://JPSIT01:3322/em <<<<<<<<<<<
Enterprise Manager configuration is completed successfully
FINISHED EMCA at Fri Dec 28 12:21:46 SGT 2007
EM console deletion:
[oracle@JPSIT01 ORACLE_SID=gisdbu2]:/u01/app/oracle/product/10.1.4/bin
$ ./RepManager -connect gisdbu2 -action drop
Enter SYS user's password :
Enter repository user name : SYSMAN
Enter repository user password :
Getting temporary tablespace from database...
Found temporary tablespace: TEMP
Checking SYS Credentials ... OK.
Dropping the repository..
Quiescing DB ... Failed.
Checking for Repos User ... Exists.
Repos User exists..
Clearing EM Contexts ... OK.
Dropping EM users ...
Done.
Dropping Repos User ... Done.
Dropping Roles/Synonymns/Tablespaces ... Done.
Unquiescing DB ... Done.
Dropped Repository Successfully.
[oracle@JPSIT01 ORACLE_SID=gisdbu2]:/u01/app/oracle/product/10.1.4/bin
$ emca -x gisdbu2
STARTED EMCA at Wed Jan 09 10:14:50 SGT 2008
Enterprise Manager configuration is completed successfully
FINISHED EMCA at Wed Jan 09 10:14:51 SGT 2008
附:
$ emctl status agent
$ emctl stop agent
$ emctl start agent
$ emctl status dbconsole
$ emctl stop dbconsole
$ emctl start dbconsole
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22473175/viewspace-614479/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22473175/viewspace-614479/