一、启动监听时出TNS-12546错 症状: $lsnrctl startsHVLinux联盟 LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 19-APR-2007 16:38:17sHVLinux联盟 Copyright (c) 1991, 2005, Oracle. All rights reserved.sHVLinux联盟 Starting /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1/bin/tnslsnr: please wait...sHVLinux联盟 TNSLSNR for Solaris: Version 10.2.0.1.0 - ProductionsHVLinux联盟 System parameter file is /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1/network/admin/listener.orasHVLinux联盟 Log messages written to /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1/network/log/listener.logsHVLinux联盟 Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))sHVLinux联盟 TNS-12546: TNS:permission deniedsHVLinux联盟 TNS-12560: TNS:protocol adapter errorsHVLinux联盟 TNS-00516: Permission deniedsHVLinux联盟 Solaris Error: 13: Permission deniedsHVLinux联盟 Listener failed to start. See the error message(s) above... 产生原因和解决办法: The Unix permissions for the hidden directory /tmp/.oracle should be: sHVLinux联盟 Owner = the Oracle user who performed the database install, sHVLinux联盟 Group = the dba group of the Oracle user, sHVLinux联盟 and the directory's Unix permissions should be drwxrwxrwxsHVLinux联盟 Change the permissions on the .oracle directory:sHVLinux联盟 1) cd /var/tmp(on Solaris) or /tmp(on Hp and IBM)sHVLinux联盟 2) Change the ownership and group of the ".oracle" directory to "oracle/dba":sHVLinux联盟 # chown -R oracle10:dba .oraclesHVLinux联盟 or sHVLinux联盟 3) Change the permissions on the directory:sHVLinux联盟 # chmod 777 .oracle sHVLinux联盟 二、通过sqlplus登陆出ORA-12514错 症状: $ sqlplus wacos/oss@orcl10sHVLinux联盟SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 19 17:03:30 2007 sHVLinux联盟Copyright (c) 1982, 2005, Oracle. All rights reserved. sHVLinux联盟ERROR: sHVLinux联盟ORA-12514: TNS:listener does not currently know of service requested in connect sHVLinux联盟descriptor 产生原因和解决办法: $ lsnrctl status sHVLinux联盟... sHVLinux联盟Services Summary... sHVLinux联盟Service "PLSExtProc" has 1 instance(s). sHVLinux联盟 Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... sHVLinux联盟The command completed successfully sHVLinux联盟发现并没有启动orcl10的监听,然后查看监听文件: sHVLinux联盟$ cd $ORACLE_HOME/network/admin sHVLinux联盟$ more listener.ora sHVLinux联盟... sHVLinux联盟SID_LIST_LISTENER = sHVLinux联盟 (SID_LIST = sHVLinux联盟 (SID_DESC = sHVLinux联盟 (SID_NAME = PLSExtProc) sHVLinux联盟 (ORACLE_HOME = /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1) sHVLinux联盟 (PROGRAM = extproc) sHVLinux联盟 ) sHVLinux联盟 ) sHVLinux联盟... sHVLinux联盟发现SID_LIST_LISTENER段并没有包含实例orcl10的相关信息: sHVLinux联盟$ vi listener.ora sHVLinux联盟修改SID_LIST_LISTENER成以下这样: sHVLinux联盟SID_LIST_LISTENER = sHVLinux联盟 (SID_LIST = sHVLinux联盟 (SID_DESC = sHVLinux联盟 (SID_NAME = PLSExtProc) sHVLinux联盟 (ORACLE_HOME = /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1) sHVLinux联盟 (PROGRAM = extproc) sHVLinux联盟 ) sHVLinux联盟 (SID_DESC = sHVLinux联盟 (SID_NAME = orcl10) sHVLinux联盟 (ORACLE_HOME = /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1) sHVLinux联盟 (PROGRAM = orcl10) sHVLinux联盟 ) sHVLinux联盟 ) sHVLinux联盟然后重启监听并查看验证: sHVLinux联盟$ lsnrctl stop sHVLinux联盟$ lsnrctl start sHVLinux联盟$ lsnrctl status sHVLinux联盟... sHVLinux联盟Services Summary... sHVLinux联盟Service "PLSExtProc" has 1 instance(s). sHVLinux联盟 Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... sHVLinux联盟Service "orcl10" has 1 instance(s). sHVLinux联盟 Instance "orcl10", status UNKNOWN, has 1 handler(s) for this service... sHVLinux联盟The command completed successfully sHVLinux联盟实例orcl10的监听也起来了。 sHVLinux联盟现在可以登陆了: sHVLinux联盟$ sqlplus wacos/oss@orcl10sHVLinux联盟SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 19 17:19:51 2007 sHVLinux联盟Copyright (c) 1982, 2005, Oracle. All rights reserved. sHVLinux联盟Connected to: sHVLinux联盟Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production sHVLinux联盟With the Partitioning, OLAP and Data Mining options sHVLinux联盟SQL> 三、Oracle10g EM Database Console显示信息错误,和真实信息不一致 症状: 进入EM控制台( http://172.19.111.38:1158/em)后,没有输入用户名和密码就直接登陆并显示数据库状态信息; sHVLinux联盟另外刚开始数据库监听没有起来,所以EM控制台显示信息也是说监听没有起来,后来监听起来了,EM控制台还是显示旧信息,刷新页面也那样。 问题原因和解决办法: 重启控制台服务后也没有效果: sHVLinux联盟$ emctl status dbconsole sHVLinux联盟$ emctl stop dbconsole sHVLinux联盟$ emctl start dbconsole sHVLinux联盟可能时原先监听未成功启动过,或者由于我修改过监听端口(1521改成1528)造成的。 sHVLinux联盟重建em资料库: sHVLinux联盟$ emctl stop dbconsole sHVLinux联盟$ emca -repos recreate sHVLinux联盟... sHVLinux联盟Enter the following information: sHVLinux联盟Database SID: orcl10 sHVLinux联盟Listener port number: 1528 sHVLinux联盟Password for SYS user: oracle10 sHVLinux联盟Password for SYSMAN user: oracle10 sHVLinux联盟Do you wish to continue? [yes(Y)/no(N)]: y sHVLinux联盟... sHVLinux联盟INFO: Repository successfully created sHVLinux联盟Enterprise Manager configuration completed successfully sHVLinux联盟FINISHED EMCA at Apr 19, 2007 6:20:22 PM sHVLinux联盟配置dbcontrol: sHVLinux联盟$ emca -config dbcontrol db sHVLinux联盟Enter the following information: sHVLinux联盟Database SID: orcl10 sHVLinux联盟Database Control is already configured for the database orcl10 sHVLinux联盟You have chosen to configure Database Control for managing the database orcl10 sHVLinux联盟This will remove the existing configuration and the default settings and perform a fresh configuration sHVLinux联盟Do you wish to continue? [yes(Y)/no(N)]: y sHVLinux联盟Listener port number: 1528 sHVLinux联盟Password for SYS user: oracle10 sHVLinux联盟Password for DBSNMP user: oracle10 sHVLinux联盟Password for SYSMAN user: oracle10 sHVLinux联盟Email address for notifications (optional): sHVLinux联盟Outgoing Mail (SMTP) server for notifications (optional): sHVLinux联盟... sHVLinux联盟Do you wish to continue? [yes(Y)/no(N)]: y sHVLinux联盟... sHVLinux联盟Enterprise Manager configuration completed successfully sHVLinux联盟FINISHED EMCA at Apr 19, 2007 6:27:44 PM sHVLinux联盟然后再进入 http://172.19.111.38:1158/em 查看正常了。 附emca和emctl常用的命令语法:sHVLinux联盟 Oracle10G的EM采用了web方式,并且分成了2个产品,database control和grid control。Grid control需要下载单独的光盘安装。在用DBCA建库的时候,可以选择是否启用dbcontrol,启用的话需要在数据库中建立一个sysman的schema,用于保存EM的一些数据,这个就是EM的资料库(repository)。使用命令行工具emca可以创建,修改,重建或者删除dbcontrol的配置。sHVLinux联盟 由于要在数据库中建EM资料库,数据库和监听都必须已经启动并正常工作。sHVLinux联盟 emca -repos create 创建一个EM资料库sHVLinux联盟 emca -repos recreate 重建一个EM资料库sHVLinux联盟 emca -repos drop 删除一个EM资料库sHVLinux联盟 emca -config dbcontrol db 配置数据库的 Database ControlsHVLinux联盟 emca -deconfig dbcontrol db 删除数据库的 Database Control配置sHVLinux联盟 emca -reconfig ports 重新配置db control和agent的端口sHVLinux联盟 emctl start console 启动EM console服务,使用前需要先设置ORACLE_SID环境变量sHVLinux联盟 emctl stop console 停止EM console服务,使用前需要先设置ORACLE_SID环境变量sHVLinux联盟 注:通过查看$ORACLE_HOME/install/portlist.ini 文件可以知道当前dbcontrol正在使用的端口,默认dbcontrol http端口1158,agent端口3938。如果要重新配置端口,可以使用如下命令:sHVLinux联盟 emca -reconfig ports -dbcontrol_http_port 1159sHVLinux联盟 emca -reconfig ports -agent_port 3939sHVLinux联盟 使用命令行工具emctl可以启动/停止console服务,察看服务状态等。
|