我从Oracle DB开始。 在Windows Server 2003上,我安装了Oracle Database 10g Express Edition,然后我还安装了PL SQL Developer。
我试图通过PL SQL Developerlogin到XE数据库。
我使用这个凭证:
我得到这个错误: ORA-12528 。 所以我谷歌,并试图解决这个问题: http : //www.dba-oracle.com/sf_ora_12528_tns_listener_all_appropriate_instances_are_blocking_new_connection_tips_bc1.htm :
SQL> conn system as sysdba Enter password: Connected. SQL> $ lsnrctl LSNRCTL> stop Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE))) The command completed successfully
并再次启动监听器
LSNRCTL> start Starting tnslsnr: please wait... TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\ad min\listener.ora Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log \listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR _XEipc))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jan)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ ction Start Date 24-J┌N-2011 19:14:14 Uptime 0 days 0 hr. 0 min. 1 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Default Service XE Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a dmin\listener.ora Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l og\listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jan)(PORT=1521))) Services Summary... Service "CLRExtProc" has 1 instance(s). Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
然后我再次尝试通过PL SQL Developer连接到XE数据库,但是我得到了错误的ORA 12514 。
我检查了侦听器日志文件( listener.log ),这里是它的输出:
System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log Trace information written to C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trc Trace level is currently 0 Started with pid=2964 Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jan)(PORT=1521))) Listener completed notification to CRS on start TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE 24-JÚN-2011 19:17:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169869568)) * status * 0 24-JÚN-2011 19:18:19 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\Program Files\PLSQL Developer\plsqldev.exe)(HOST=JAN)(USER=Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.5.100)(PORT=2907)) * establish * XE * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 24-JÚN-2011 19:18:48 * service_register * xe * 0
在这里我把configuration。
的tnsname.ora
XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = jan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) ) EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) ) ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) )
listener.ora中
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) (ADDRESS = (PROTOCOL = TCP)(HOST = jan)(PORT = 1521)) ) ) DEFAULT_SERVICE_LISTENER = (XE)
我尝试在tsname.ora中进行更改,并将SERVICE_NAME更改为SID
XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = jan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = XE) ) )
但是我得到错误:
**ORA-12505** TNS: listener does not currently know of SID given in connect descriptor
我删除了tsname.ora中的更改(SID = XE => SERVICE_NAME = XE),最后我用命令检查了侦听器的状态。
LSNRCTL> stat
结果在这里:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ ction Start Date 24-J┌N-2011 19:30:31 Uptime 0 days 0 hr. 5 min. 57 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Default Service XE Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a dmin\listener.ora Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l og\listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jan)(PORT=1521))) Services Summary... Service "CLRExtProc" has 1 instance(s). Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "XE_XPT" has 1 instance(s). Instance "xe", status BLOCKED, has 1 handler(s) for this service... Service "xe" has 1 instance(s). Instance "xe", status BLOCKED, has 1 handler(s) for this service... The command completed successfully
我尝试重新启动OracleServiceXE (控制面板>pipe理工具>服务>)
最后一次尝试解决这个问题是通过cmd连接到XE。
SQL> conn system/jano@XE ERROR: ORA-12528: TNS:listener: all appropriate instances are blocking new connections
没有任何工作 我无法连接到XE。
这是我第一次和Oracle DB打交道。 什么是问题的根源,如何解决这个问题。
谢谢你的合作。
一旦禁用所有的networking连接,然后重新启动您的PC /服务器,然后尝试login。如果它成功启用所有的networking连接。