| 论坛注册| 加入收藏 | 设为首页| RSS
Google
您当前的位置:首页 > Linux频道 > Linux开发区 > 数据库开发

oracle 10g安装后部分问题解决

时间:2007-10-15 12:40:17  来源:Linux联盟收集整理  作者:
一、启动监听时出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 2007sHVLinux联盟
Copyright (c) 1982, 2005, Oracle.  All rights reserved.sHVLinux联盟
ERROR:sHVLinux联盟
ORA-12514: TNS:listener does not currently know of service requested in connectsHVLinux联盟
descriptor
产生原因和解决办法:
$ lsnrctl statussHVLinux联盟
...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 successfullysHVLinux联盟
发现并没有启动orcl10的监听,然后查看监听文件:sHVLinux联盟
$ cd $ORACLE_HOME/network/adminsHVLinux联盟
$ more listener.orasHVLinux联盟
...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.orasHVLinux联盟
修改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 stopsHVLinux联盟
$ lsnrctl startsHVLinux联盟
$ lsnrctl statussHVLinux联盟
...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 successfullysHVLinux联盟
实例orcl10的监听也起来了。sHVLinux联盟
现在可以登陆了:sHVLinux联盟
$ sqlplus wacos/oss@orcl10sHVLinux联盟
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 19 17:19:51 2007sHVLinux联盟
Copyright (c) 1982, 2005, Oracle.  All rights reserved.sHVLinux联盟
Connected to:sHVLinux联盟
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionsHVLinux联盟
With the Partitioning, OLAP and Data Mining optionssHVLinux联盟
SQL>
三、Oracle10g EM Database Console显示信息错误,和真实信息不一致
症状:
进入EM控制台(http://172.19.111.38:1158/em)后,没有输入用户名和密码就直接登陆并显示数据库状态信息;sHVLinux联盟
另外刚开始数据库监听没有起来,所以EM控制台显示信息也是说监听没有起来,后来监听起来了,EM控制台还是显示旧信息,刷新页面也那样。
问题原因和解决办法:
重启控制台服务后也没有效果:sHVLinux联盟
$ emctl status dbconsolesHVLinux联盟
$ emctl stop dbconsole        sHVLinux联盟
$ emctl start dbconsolesHVLinux联盟
可能时原先监听未成功启动过,或者由于我修改过监听端口(1521改成1528)造成的。sHVLinux联盟
重建em资料库:sHVLinux联盟
$ emctl stop dbconsolesHVLinux联盟
$ emca -repos recreatesHVLinux联盟
...sHVLinux联盟
Enter the following information:sHVLinux联盟
Database SID: orcl10sHVLinux联盟
Listener port number: 1528sHVLinux联盟
Password for SYS user: oracle10 sHVLinux联盟
Password for SYSMAN user: oracle10 sHVLinux联盟
Do you wish to continue? [yes(Y)/no(N)]: ysHVLinux联盟
...sHVLinux联盟
INFO: Repository successfully createdsHVLinux联盟
Enterprise Manager configuration completed successfullysHVLinux联盟
FINISHED EMCA at Apr 19, 2007 6:20:22 PMsHVLinux联盟
配置dbcontrol:sHVLinux联盟
$ emca -config dbcontrol dbsHVLinux联盟
Enter the following information:sHVLinux联盟
Database SID: orcl10sHVLinux联盟
Database Control is already configured for the database orcl10sHVLinux联盟
You have chosen to configure Database Control for managing the database orcl10sHVLinux联盟
This will remove the existing configuration and the default settings and perform a fresh configurationsHVLinux联盟
Do you wish to continue? [yes(Y)/no(N)]: ysHVLinux联盟
Listener port number: 1528sHVLinux联盟
Password for SYS user: oracle10sHVLinux联盟
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)]: ysHVLinux联盟
...sHVLinux联盟
Enterprise Manager configuration completed successfullysHVLinux联盟
FINISHED EMCA at Apr 19, 2007 6:27:44 PMsHVLinux联盟
然后再进入 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服务,察看服务状态等。
来顶一下
近回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
相关文章
栏目更新
栏目热门