ITPub博客

首页 > Linux操作系统 > Linux操作系统 > EM的创建及重建

EM的创建及重建

原创 Linux操作系统 作者:wailon 时间:2013-11-12 15:49:57 0 删除 编辑

[root@dg ~]# su - oracle
[oracle@dg ~]$ echo $ORACLE_UNQNAME
dg

-- 开始创建

[oracle@dg ~]$ emca -repos create

STARTED EMCA at Sep 25, 2013 12:26:50 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: dg
Listener port number: 1521
Password for SYS user: 
Password for SYSMAN user: 

Do you wish to continue? [yes(Y)/no(N)]: y
Sep 25, 2013 12:27:02 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/dg/emca_2013_09_25_00_26_50.log.
Sep 25, 2013 12:27:02 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
WARNING: ORA-12541: TNS:no listener


-- 由于监听没启动,创建失败
[oracle@dg ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 25-SEP-2013 00:27:14

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/dg/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dg.localdomain)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dg)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                25-SEP-2013 00:27:16
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/dg/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dg.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "dg" has 1 instance(s).
  Instance "dg", status UNKNOWN, has 1 handler(s) for this service...

-- 启动监听后再次创建
[oracle@dg ~]$ emca -repos create

STARTED EMCA at Sep 25, 2013 12:27:19 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: dg
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
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/dg/emca_2013_09_25_00_27_19.log.
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Sep 25, 2013 12:35:13 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Sep 25, 2013 12:35:14 AM

[oracle@dg ~]$ emctl status dbconsole
 Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://dg.localdomain:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.

-- 查看EM创建日志
[oracle@dg ~]$ more /u01/app/oracle/cfgtoollogs/emca/dg/emca_2013_09_25_00_27_19.log
-- 省略部分
CONFIG: Setting param: ORACLE_HOME value: /u01/app/oracle/product/11.2.0/dbhome_1
  CONFIG: No value was set for the parameter DB_UNIQUE_NAME.
Sep 25, 2013 12:27:19 AM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter SID.
Sep 25, 2013 12:27:21 AM oracle.sysman.emcp.ParamsManager setParam
CONFIG: Setting param: SID value: dg
Sep 25, 2013 12:27:22 AM oracle.sysman.emcp.ParamsManager setParam
CONFIG: Setting param: PORT value: 1521
 Sep 25, 2013 12:27:25 AM oracle.sysman.emcp.ParamsManager getRepDbPort
CONFIG: Listener Port: 1521
Sep 25, 2013 12:27:25 AM oracle.sysman.emcp.util.GeneralUtil isLocalConnectionRequired
CONFIG: isLocalConnectionRequired: true
Sep 25, 2013 12:27:25 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
CONFIG: isLocalConnectionRequired: true. Connecting to database instance locally.
Sep 25, 2013 12:27:25 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: SQLEngine connecting with SID: dg, oracleHome: /u01/app/oracle/product/11.2.0/dbhome_1, and user: SYS
Sep 25, 2013 12:27:26 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: SQLEngine created successfully and connected
CONFIG: ORACLE_BASE :/u01/app/oracle
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.ParamsManager setParam
CONFIG: Setting param: DB_UNIQUE_NAME value: dg
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.ParamsManager setParam
CONFIG: Setting param: SERVICE_NAME value: dg
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
CONFIG: HOST: dg.localdomain
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
CONFIG:  connectDesc : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dg.localdomain)(PORT=1521)))(CONNECT_DATA=
(SERVICE_NAME=dg)))
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.util.GeneralUtil isLocalConnectionRequired
CONFIG: isLocalConnectionRequired: true
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
CONFIG: isLocalConnectionRequired: true. Connecting to database instance locally.
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: SQLEngine connecting with SID: dg, oracleHome: /u01/app/oracle/product/11.2.0/dbhome_1, and user: SYS
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
CONFIG: SQLEngine created successfully and connected
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.EMReposConfig createRepository
CONFIG: Spooling to /u01/app/oracle/cfgtoollogs/emca/dg/emca_repos_create_2013_09_25_00_27_30.log
Sep 25, 2013 12:27:30 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Sep 25, 2013 12:35:13 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Sep 25, 2013 12:35:14 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0/dbhome_1/oui


-- 以下为重建EM
[oracle@dg ~]$ emca -config dbcontrol db -repos recreate

STARTED EMCA at Sep 25, 2013 12:37:37 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: dg
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user: 
Password for DBSNMP user: 
Sep 25, 2013 12:37:56 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
WARNING: ORA-28000: the account is locked

Password for SYSMAN user: 
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1

Local hostname ................ dg.localdomain
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ dg
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Sep 25, 2013 12:38:17 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/dg/emca_2013_09_25_00_37_36.log.
Sep 25, 2013 12:38:19 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Sep 25, 2013 12:41:37 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Sep 25, 2013 12:41:38 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Sep 25, 2013 12:49:52 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Sep 25, 2013 12:50:03 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Sep 25, 2013 12:51:12 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Sep 25, 2013 12:51:16 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Sep 25, 2013 12:51:36 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Sep 25, 2013 12:51:36 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Sep 25, 2013 12:54:05 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Sep 25, 2013 12:54:06 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://dg.localdomain:1158/em <<<<<<<<<<<
Sep 25, 2013 12:54:27 AM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0/dbhome_1/dg.localdomain_dg/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Sep 25, 2013 12:54:27 AM

[oracle@dg ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://dg.localdomain:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/429786/viewspace-776407/,如需转载,请注明出处,否则将追究法律责任。

下一篇: LogMiner使用
请登录后发表评论 登录
全部评论

注册时间:2013-11-08

  • 博文量
    51
  • 访问量
    290556