Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
从昨天开始,我的数据库已经工作了一年多。突然间,我无法再连接了。
我得到的错误是:
Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
甲骨文 11.2
Windows7
数据库和侦听器都已启动并且 运行。端口 1521 已打开。
C:\Apps\Oracle\product.2.0\dbhome_1\BIN>netstat -a -n -o| findstr "1521"
TCP 127.0.0.1:1521 0.0.0.0:0 LISTENING 2412
正在尝试通过 sqlplus 登录
C:\depot\SBApp\main>sqlplus sbdba0/sbdba0@SBDB
SQL*Plus: Release 11.2.0.2.0 Production on Thu Dec 3 10:04:29 2015
Copyright (c) 1982, 2010, Oracle. All rights reserved.
错误:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Listener.ora
# listener.ora Network Configuration File: C:\Apps\Oracle\product.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\Apps\Oracle\product.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\Apps\Oracle\product.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\Apps\Oracle\product
tnsnames.ora
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
###################################################################################################
#SBDB
SBDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SBDB)
)
)
ifile=C:\Apps\Oracle\product.2.0\dbhome_1\NETWORK\ADMIN\tnsnames_QA.ora
ifile=C:\Apps\Oracle\product.2.0\dbhome_1\NETWORK\ADMIN\tnsnames_PROD.ora
我没有想法,任何帮助将不胜感激。
已解决,
必须用我的 PC 主机名替换 *.ora 文件中的本地主机。
从昨天开始,我的数据库已经工作了一年多。突然间,我无法再连接了。
我得到的错误是:
Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
甲骨文 11.2 Windows7
数据库和侦听器都已启动并且 运行。端口 1521 已打开。
C:\Apps\Oracle\product.2.0\dbhome_1\BIN>netstat -a -n -o| findstr "1521"
TCP 127.0.0.1:1521 0.0.0.0:0 LISTENING 2412
正在尝试通过 sqlplus 登录
C:\depot\SBApp\main>sqlplus sbdba0/sbdba0@SBDB
SQL*Plus: Release 11.2.0.2.0 Production on Thu Dec 3 10:04:29 2015
Copyright (c) 1982, 2010, Oracle. All rights reserved.
错误:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Listener.ora
# listener.ora Network Configuration File: C:\Apps\Oracle\product.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\Apps\Oracle\product.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\Apps\Oracle\product.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\Apps\Oracle\product
tnsnames.ora
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
###################################################################################################
#SBDB
SBDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SBDB)
)
)
ifile=C:\Apps\Oracle\product.2.0\dbhome_1\NETWORK\ADMIN\tnsnames_QA.ora
ifile=C:\Apps\Oracle\product.2.0\dbhome_1\NETWORK\ADMIN\tnsnames_PROD.ora
我没有想法,任何帮助将不胜感激。
已解决,
必须用我的 PC 主机名替换 *.ora 文件中的本地主机。