Oracle11g
ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务
在windows server 2008安装了oracle11g,oracle11g一直运行得很好,但是最近却出现了一些问题,oracle配置文件如下:
listener.ora文件
# listener.ora Network Configuration File:
C:\oracle\Administrator\product\11.1.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = TEST)(PORT = 1521))
)
)
sqlnet.ora文件
# sqlnet.ora Network Configuration File: C:\oracle\Administrator\product\11.1.0\db_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora文件
# tnsnames.ora Network Configuration File: C:\oracle\Administrator\product\11.1.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
TESTONE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = TEST)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = TEST)
)
)
TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = TEST)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TEST)
)
)
使用如下方式登录,是正常的
c:\>sqlplus scott/tiger
SQL>
但是使用下面方式登录,却无法登录
c:\>sqlplus scott/tiger@TEST
ERROR:
ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务
c:\>sqlplus scott/tiger@TESTONE
ERROR:
ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务
使用lsnrctl命令查看状态
c:\>lsnrctl
LSNRCTL> status
监听端点概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=TEST)(PORT=1521)))
监听程序不支持服务
命令执行成功
我曾尝试删除数据库,然后新创建数据库,一切正常,可以访问,可是系统重新启动后,又无法访问了。
如何解决上面的问题?
谢谢!
------解决方案--------------------
从你的lsnrctl status来看,是服务没有注册进来,
用sqlplus "/ as sysdba"进入sqlplus, 检查一下数据库实例的状态,
SQL>select status from v$instance.
如果实例没有启动,启动实例。如果实例已经启动, 运行alter system register.
再查看lsnrctl status,如果是注册成功,会多出几个instance的信息。
==================================================================
Inthirties关注Oracle数据库 维护 优化,安全,备份,恢复,迁移,故障处理
如果你需要帮助或想和我一起学习的请联系
联系方式QQ:370140387
QQ群: 85837884(注明:数据库)
电子邮件:dba@Inthirties.com
网站: http://www.inthirties.com