问题描述
- oracle 11g 64位plsql登陆问题
-
我用myeclipse创建了web应用并且用jdbc驱动创建数据库连接,兵配置好监听器和tnsname,当我在doc界界面启动数据库和监听器后一切正常,tnsping 服务名也可以通过,但是登陆plsql出现登陆超时错误,sqlplus 登录名/密码@服务名出现TNS:监听程序无法分发客户机连接。在myeclipse上想测试连接
Connection conn=DButils.getInstance().getconn();
System.out.println(conn);
控制台输出错误java.sql.SQLException:Listener refused the connection with the following error:ORA-12518,TNS:litener could not hand off client connection
。。。。null.下面是我的监听器和tnsname配置:
listener.ora Network Configuration File: F:appAdministratorproduct11.2.0dbhome_1networkadminlistener.ora
Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:appAdministratorproduct11.2.0dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:appAdministratorproduct11.2.0dbhome_1binoraclr11.dll")
)
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = F:appAdministratorproduct11.2.0dbhome_1)
(PROGRAM = orcl)
(ENVS = "EXTPROC_DLLS=ONLY:F:appAdministratorproduct11.2.0dbhome_1binoraclr11.dll")
)
)LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 27.151.20.130)(PORT = 1521))
)
)ADR_BASE_LISTENER = F:appAdministrator
tnsnames.ora Network Configuration File: F:appAdministratorproduct11.2.0dbhome_1networkadmintnsnames.ora
Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 27.151.20.130)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)我查看session值session——cached_cuesors50,sesssion_max_open_files 10,sessions 248,
parameter值sga_max_size 1600M,不知道是什么原因,想做一个小项目在数据库这边卡住了心碎,希望大家能帮忙看看。
解决方案
这个首先你要看服务器本机能不能登录上数据库,没问题就把本机的TNS配置复制到客户机的PL/SQL去试下,不行重新配置一下客户机的监听,还不行PING一下服务器的1521端口,这个要看具体报什么错才能给你解决