尝试从SQL Developer或Net Manager连接到新安装的Oracle Enterprise时出现此错误。我确实尝试了所有我找不到的解决方案。
我正在尝试连接系统帐户,我可以使用sqlplus登录,所以我知道我的凭据是正确的。
的listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\Oracle\OracleUser\product\12.1.0\dbhome_2\bin\oraclr12.dll")
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\Oracle\OracleUser\product\12.1.0\dbhome_2)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\Oracle\OracleUser\product\12.1.0\dbhome_2\log
的tnsnames.ora
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
在<\ product \ 12.1.0 \ dbhome_2 \ log \ diag \ tnslsnr \ iper410a \ listener \ trace \ listener.log 内的错误
24-APR-2016 19:10:33 * (CONNECT_DATA=(CID=(PROGRAM=null)(HOST=__jdbc__)(USER=null))(SERVICE_NAME=orcl)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1195)) * establish * orcl * 12514
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
24-APR-2016 19:10:40 * (CONNECT_DATA=(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=my_windows_login))(SERVICE_NAME=orcl)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1198)) * establish * orcl * 12514
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
让我感到困惑的是,而不是系统&#39; Oracle帐户,错误是列出我的Windows登录帐户(my_windows_login)。
请指教!
答案 0 :(得分:0)
看来你有两个甲骨文家园。
检查cmd的输出 - &gt; tnsping orcl
命令。您可以看到正在使用的oracle目录。
然后你可以检查环境变量 - &gt;系统变量 - &gt;路径和重新排序Oracle主目录。这适用于我的情况。