忙乎一天,终于成功完成 Oracle 0g Release 2 (10.2) for Solaris Operating System (SPARC 64-Bit) 的安装,安装完后遇到了两个问题,现在解决了,记载以下方便日后查询。
一、启动监听时出TNS-12546错
症状:
$lsnrctl start
LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 19-APR-2007 16:38:17
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1/bin/tnslsnr: please wait...
TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
System parameter file is /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1/network/admin/listener.ora
Log messages written to /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1/network/log/listener.log
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00516: Permission denied
Solaris Error: 13: Permission denied
Listener failed to start. See the error message(s) above...
产生原因和解决办法:
The Unix permissions for the hidden directory /tmp/.oracle should be:
Owner = the Oracle user who performed the database install,
Group = the dba group of the Oracle user,
and the directory's Unix permissions should be drwxrwxrwx
Change the permissions on the .oracle directory:
1) cd /var/tmp(on Solaris) or /tmp(on Hp and IBM)
2) Change the ownership and group of the ".oracle" directory to "oracle/dba":
# chown -R oracle10:dba .oracle
or
3) Change the permissions on the directory:
# chmod 777 .oracle
二、通过sqlplus登陆出ORA-12514错
症状:
$ sqlplus wacos/oss@orcl10
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 19 17:03:30 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
产生原因和解决办法:
$ lsnrctl status
...
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
发现并没有启动orcl10的监听,然后查看监听文件:
$ cd $ORACLE_HOME/network/admin
$ more listener.ora
...
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1)
(PROGRAM = extproc)
)
)
...
发现SID_LIST_LISTENER段并没有包含实例orcl10的相关信息:
$ vi listener.ora
修改SID_LIST_LISTENER成以下这样:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = orcl10)
(ORACLE_HOME = /opt/oracle/oracle10/app/oracle10/product/10.2.0/Db_1)
(PROGRAM = orcl10)
)
)
然后重启监听并查看验证:
$ lsnrctl stop
$ lsnrctl start
$ lsnrctl status
...
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl10" has 1 instance(s).
Instance "orcl10", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
实例orcl10的监听也起来了。
现在可以登陆了:
$ sqlplus wacos/oss@orcl10
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 19 17:19:51 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10881/viewspace-178054/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10881/viewspace-178054/