问题
请注意,出于安全目的,我更改了详细信息。但是,问题仍然完好无损。
我在服务器上安装了一个 Oracle 11g 数据库,例如 herp-devDV.derp.edu。
现在我在某个位置的服务器上有另一个 Oracle 11g 数据库,例如,derp-db.derp.edu。
我在 Oracle SQL developer 中为 herp-devDV.derp.edu 和 derp-db.derp.edu 输入了连接名称、用户名、密码、主机名和服务名称。我可以连接到derp-db.derp.edu 中的模式,但不能连接到herp-devDV.derp.edu。它给了我这个信息:
Failure - Test failed: The Network Adapter could not establish the connection
细节
我有以下信息:
我做了什么
lsnrctl status
我收到以下输出
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date 03-JUN-2014 13:37:22
Uptime 6 days 0 hr. 53 min. 4 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File d:\oracle\diag\tnslsnr\HERP-DEVDB\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HERP-DEVDB.derp.edu)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "HERPDEVDBXDB" has 1 instance(s).
Instance "herpdevdb", status READY, has 1 handler(s) for this service...
Service "herpdevdb" has 1 instance(s).
Instance "herpdevdb", status READY, has 1 handler(s) for this service...
The command completed successfully
然后我检查了我的 listener.ora 并找到
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\oracle\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = HERP-DEVDB.derp.edu)(PORT = 1521))
)
)
在这一点上,我承认我在挠头,因为我没有看到任何突出并告诉我为什么这不应该工作。
唯一的线索是当我检查 derp-db.derp.edu 并运行命令
lsnrctl status
时.请见下面的摘录:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DERP-DB.edu)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.3.0 - Production
Start Date 18-MAY-2014 02:19:01
Uptime 22 days 12 hr. 23 min. 18 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
---etc----
所以我还在摸不着头脑。为什么 derp-db 会连接到 DERP-DB.edu 而 herp-devDB 会连接到 EXTPROC1521?我该如何解决?除了实例名称外,这两个服务器之间的 listener.ora 和其他文件几乎相同。
嗯。
无论如何,我们将不胜感激。谢谢
问候,
极客
最佳答案
您可以找到一个名为 listener.ora
的文件。安装文件夹下oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
它包含以下条目
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = Codemaker-PC)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
您应该验证主机(这里是 Codemaker-PC)应该是计算机名称。如果不正确,请将其更改为计算机名称。
然后在以管理员身份运行的命令提示符下尝试以下命令,
lsnrctl start
关于Oracle SQL 开发人员 : Failure - Test failed: The Network Adapter could not establish the connection?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24127839/