免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2600 | 回复: 9
打印 上一主题 下一主题

[数据库] ORACLE EM 不能重建,试了好几天,请高手帮忙! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-10-30 12:41 |只看该作者 |倒序浏览
大家好,

[oracle@localhost ~]$ emca -config dbcontrol db -repos recreate

STARTED EMCA at Oct 30, 2013 12:37:44 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: orcl
Listener port number: 1521
Listener ORACLE_HOME [ /home/oracle/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user:  
Password for DBSNMP user:  
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 ................ /home/oracle/app/oracle/product/11.2.0/dbhome_1

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

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Oct 30, 2013 12:38:11 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /home/oracle/app/cfgtoollogs/emca/first_time_oracle/emca_2013_10_30_12_37_44.log.
Oct 30, 2013 12:38:11 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
Refer to the log file at /home/oracle/app/cfgtoollogs/emca/first_time_oracle/emca_2013_10_30_12_37_44.log for more details.
Could not complete the configuration. Refer to the log file at /home/oracle/app/cfgtoollogs/emca/first_time_oracle/emca_2013_10_30_12_37_44.log for more details.

检查日志:

Oct 30, 2013 12:38:11 PM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
        at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3245)
        at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:203)
        at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
        at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
        at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
        at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:144
        at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
        at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Oct 30, 2013 12:38:11 PM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to /home/oracle/app/oracle/product/11.2.0/dbhome_1/oui

listener 是起来的啊,

[oracle@localhost ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 30-OCT-2013 12:40:16

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                30-OCT-2013 12:16:47
Uptime                    0 days 0 hr. 23 min. 28 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "first_time_oracle" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

数据库也注册了,试了N遍就是一直报这个错误。。。。。请高手帮忙啊!

论坛徽章:
3
CU大牛徽章
日期:2013-09-18 15:16:55CU大牛徽章
日期:2013-09-18 15:18:22CU大牛徽章
日期:2013-09-18 15:18:43
2 [报告]
发表于 2013-10-30 15:31 |只看该作者
可能是主机名不一致导致
请检查  操作系统配置与listener.ora中是否一致?

论坛徽章:
0
3 [报告]
发表于 2013-10-30 17:12 |只看该作者
回复 2# duolanshizhe


    [root@localhost ~]# hostname
localhost
[root@localhost ~]# cat /etc/hosts|grep 127
127.0.0.1       localhost.localdomain localhost


以上是我的主机配置,看起来好像没问题啊。。

论坛徽章:
3
CU大牛徽章
日期:2013-09-18 15:16:55CU大牛徽章
日期:2013-09-18 15:18:22CU大牛徽章
日期:2013-09-18 15:18:43
4 [报告]
发表于 2013-10-30 20:33 来自手机 |只看该作者
你的主机名就是localhost么?

论坛徽章:
0
5 [报告]
发表于 2013-10-31 09:33 |只看该作者
回复 4# duolanshizhe


    我改了下/etc/hosts文件, 现在如下:

[oracle@localhost ~]$ cat /etc/hostname
localhost
[oracle@localhost ~]$ cat /etc/hosts
127.0.0.1       localhost frist_ti
::1             localhost6.localdomain6 localhost6

frist_ti 是我的oracle db name,我给他加上了,另外把localhost.localdomain 替换成了 localhost.

Listener.ora 配置如下:

[oracle@localhost ~]$ cat /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = orcl)
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
  )

EM还是重建不了,报跟上面相同的错误。 能否指教?

论坛徽章:
2
酉鸡
日期:2014-02-19 09:11:08摩羯座
日期:2014-05-23 10:16:16
6 [报告]
发表于 2013-10-31 10:01 |只看该作者
本帖最后由 tiankafeiwu 于 2013-10-31 10:01 编辑

你可以先delete掉,在create试试

论坛徽章:
0
7 [报告]
发表于 2013-10-31 10:17 |只看该作者
回复 6# tiankafeiwu


    也drop不掉:

[oracle@localhost ~]$ emca -repos drop

STARTED EMCA at Oct 31, 2013 10:16:56 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

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

Do you wish to continue? [yes(Y)/no(N)]: Y
Oct 31, 2013 10:17:09 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /home/oracle/app/cfgtoollogs/emca/first_time_oracle/emca_2013_10_31_10_16_56.log.
Oct 31, 2013 10:17:10 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Oct 31, 2013 10:17:10 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /home/oracle/app/oracle/product/11.2.0/dbhome_1/sysman/admin/emdrep/bin/RepManager -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=first_time_oracle))) -repos_user SYSMAN -action drop -verbose -output_file /home/oracle/app/cfgtoollogs/emca/first_time_oracle/emca_repos_drop_2013_10_31_10_17_10.log
Oct 31, 2013 10:17:10 AM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Error dropping the repository
Oct 31, 2013 10:17:10 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at /home/oracle/app/cfgtoollogs/emca/first_time_oracle/emca_repos_drop_<date>.log for more details.
Oct 31, 2013 10:17:10 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error dropping the repository
Refer to the log file at /home/oracle/app/cfgtoollogs/emca/first_time_oracle/emca_2013_10_31_10_16_56.log for more details.
Could not complete the configuration. Refer to the log file at /home/oracle/app/cfgtoollogs/emca/first_time_oracle/emca_2013_10_31_10_16_56.log for more details.

论坛徽章:
2
酉鸡
日期:2014-02-19 09:11:08摩羯座
日期:2014-05-23 10:16:16
8 [报告]
发表于 2013-10-31 10:28 |只看该作者
我看到你服务名弄不一致了,上面输入orcl,下面提示SERVICE_NAME=first_time_oracle
仔细查查这块吧,
Listener is not up or database service is not registered with it
而且你这边这个提示也有这个意思

论坛徽章:
0
9 [报告]
发表于 2013-11-06 15:01 |只看该作者
回复 8# tiankafeiwu


    请问应该怎么改?我贴出的我DB的信息如下:

SQL> show parameter service_names;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
service_names                        string      first_time_oracle
SQL> show parameter instance_name;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_name                        string      orcl
SQL> show parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      first_ti

Listener.ora 配置如下:


[oracle@localhost admin]$ cat listener.ora
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = orcl)
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
  )

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
10 [报告]
发表于 2013-11-06 16:30 |只看该作者
重新创建一个新的EM呢。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP