有没有办法可以在 Windows 上配置 XE 安装以仅使用 localhost 接口上的端口而不使用外部接口?我想在没有其他人能够连接到我的实例的情况下运行它进行开发。
我尝试修改 listener.ora 和 tnsnames.ora 文件,将“HOST =”条目更改为 localhost。我的主机文件中有以下行:
127.0.0.1 localhost
完成此操作并重新启动服务后,apex 停止工作(它不在端口 8080 上侦听),并且我无法使用 JDBC 连接到数据库。使用 JDBC 时出现以下错误:
Exception in thread "main" java.sql.SQLException: Listener refused the connection
with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect
descriptor
The Connection descriptor used by the client was:
localhost:1521:XE
我应该注意,如果我将 'HOST = 条目更改回我的机器主机名并重新启动服务,那么 apex 和 JDBC 都可以正常工作。