我已经尝试在家里安装 Oracle 一个多月了,但仍然遇到一些问题。
目前,我已经在专用的 Win2k8R2 虚拟机上安装并运行了服务器。安装似乎没问题。本地运行正常。
但是我无法在 sqlplus/sqldeveloper/Visual Studio 或其他地方远程登录。
最初我收到 ORA-12514 错误。更正 TNS 后,每次尝试登录时都会遇到这种情况:
C:\>sqlplus gama@main
SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 17 09:22:43 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
输入密码并按下回车键后,连接卡住了。没有错误消息。我以为我会收到超时,但无论我等多久,什么都没有发生(昨天,我花了 3 个小时玩 Skyrim,然后才放弃并按下 CTRL+C)
同样,我可以在本地连接,而且也没有防火墙问题(我甚至禁用了客户端和服务器中的防火墙)。客户端计算机可以通过远程桌面连接到服务器。我确认已建立与 Oracle 的连接,最后,这是处于“卡住状态”的服务器netstat
的输出:LSNRCTL services
LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "MAIN.WIN2k8-ORACLE" has 1 instance(s).
Instance "main", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0 state:ready
LOCAL SERVER
Service "MAINXDB.WIN2k8-ORACLE" has 1 instance(s).
Instance "main", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: WIN2K8-ORACLE, pid: 1712>
(ADDRESS=(PROTOCOL=tcp)(HOST=WIN2k8-ORACLE)(PORT=49160))
The command completed successfully
请注意,服务 MAIN.WIN2k8-ORACLE 已建立 1 个连接。
我确实有一些使用 Oracle 开发的经验,但这是我第一次尝试安装它。
提前致谢。
====编辑======
关注我的 tnsnames.ora:
MAIN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <MY SERVER'S IP>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = MAIN.WIN2k8-ORACLE)
)
)
答案1
请发布 lsnrctl 服务的输出。您可以尝试反弹数据库和侦听器。您还可以尝试将 UR=A 设置添加到您的 tnsnames.ora
...(SERVICE_NAME=srv1)(UR=A)...