Oracle Express Edition - 无法远程连接(以及其他)
我无法远程连接到 Oracle XE 安装(通过 TOAD / SQL Developer)。 事情是这样的。
我设置了一个新服务器(Windows 2003)。 目标是制作一个预装多个应用程序的新映像,Oracle XE 就是其中之一。 Oracle 安装没有问题,本地连接、远程连接并可以访问 Web 界面 - 可以在 http://127.0 找到该界面.0.1:8081/apex(注意:当我们在 8080 上运行 Tomcat 开发环境时,我手动更改了 Web 界面的端口)。
所以,一切都很顺利,我创建了图像,擦拭机器并将新创建的图像放在那里。 除了 Oracle 之外,一切正常。 经过大量挖掘,我更新了 tnsnames.ora 文件,添加环境变量 ORACLE_HOME 和 ORACLE_SID,这样我就可以在本地连接。 我仍然无法远程连接,并且完全无法访问网络界面。 我在谷歌上花了两天时间,但我没有任何想法。 请帮忙!
I'm unable to make a remote connection to an Oracle XE install (through TOAD / SQL Developer). Here's the deal.
I set up a new server (windows 2003). The goal was to make a new image with several applications preinstalled, Oracle XE being one of them. Got Oracle installed no problem, connected locally, remotely and had access to the web interface - the one found at http://127.0.0.1:8081/apex (Note: I changed the port of the web interface manually as we are running our Tomcat dev environment on 8080).
So, everything is going swimmingly, I create the image, wipe the machine and put the newly created image on there. Everything works except Oracle. After much digging, I update the tnsnames.ora file, add environment variables ORACLE_HOME and ORACLE_SID, so I can connect locally. I still can't connect remotely and have completely lost access to the web interface. I've spent 2 days on google and I'm all out of ideas. Please HELP!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
ManuelF与通过Web前端的访问有关,但与通过Web前端的本地访问无关。
您没有说明如何处理主机名/地址,或者如何在本地连接。
如果你正在做
SQLPLUS / AS SYSDBA
然后您就可以直接附加。如果您正在执行
SQLPLUS user/pass@XE
,那么您将通过侦听器进行附加。 如果前者有效而后者无效,请查找名为listener.ora 的文件并检查其中的主机名。 如果仍然有问题,请尝试如果有效,则问题出在 tnsnames.ora 上。
在远程访问时,如果您的映像安装在“box a”上,并且您希望从“box b”访问,您可以从“box b”ping“box a”吗?
然后在 box_b 上尝试
这假设您在 box_b 上有一个带有 sql*plus 的 Oracle 客户端。 如果可行,您需要查看 box_b 上的 tnsnames.ora 文件。
如果您在 box_b 上没有 Oracle 客户端,Oracle 的 SQL Developer 可以通过 JDBC 瘦驱动程序进行连接(不需要任何 Oracle 客户端),为此您需要指定主机、侦听器端口(通常为 1521) ) 和 sid(XE 表示 Express 版本)
ManuelF relates to access through the web front end, but isn't relevant to local access through the web front end.
You don't say how hostname/address is being handled, or how you are connecting locally.
If you are doing
SQLPLUS / AS SYSDBA
then you are attaching directly.If you are doing
SQLPLUS user/pass@XE
then you are attaching via the listener. If the former works and the latter doesn't, look for a file called listener.ora and check the hostname in there. If you still have problems, tryIf that works, then the problem is the tnsnames.ora.
On the remote access, if your image is installed on 'box a', and you want access from 'box b', can you ping 'box a' from 'box b'.
Then try, on box_b
This assumes you have an Oracle client, with sql*plus, on box_b. If that works, you'll need to look at the tnsnames.ora file on box_b.
If you don't have an Oracle client on box_b, Oracle's SQL Developer can connect through the JDBC thin driver (which doesn't need any Oracle client), and for that you'll need to specify the host, listener port (generally 1521) and sid (XE for express edition)
你检查一下防火墙是否开放了1521端口?
Did you check if you have open port 1521 on firewall?
在 Web 界面中,您必须以 DBA 身份登录[我认为],并且管理部分中有一个选项,您必须在其中激活“启用来自外部的连接”。
编辑:完整路径:WebInterface -> 管理-> [下拉菜单]管理HTTP访问-> 可从本地服务器和远程客户端获取。
From the Web Interface, you have to login as a DBA [I think], and there is an option in the administration section where you have to activate "Enable connections from outside".
EDIT: Full Path : WebInterface -> Administration -> [drop down menu] Manage HTTP Access -> Available from local server and remote clients.
只需以 sysdba 或系统用户身份登录 sqlplus 并输入以下命令:
Just login into sqlplus as sysdba or system user and let the following command go:
我发现我的 Ubuntu 机器的远程连接失败,因为我错误配置了
/etc/hosts
文件。 该机器在/etc/interfaces
中设置了静态 IP,但主机中的条目有错误的 IP 地址:最后一行有错误的 IP。
因此,运行 lnsrctl status 并未列出 XE 服务。 更正主机文件后,我重新启动了 oracle-xe 服务,远程连接开始工作。
I discovered that remote connections were failing to my Ubuntu box because I'd misconfigured the
/etc/hosts
file. The machine had a static IP set up in/etc/interfaces
, but the entry in hosts had the wrong IP address:The last line had the wrong IP.
As a result, running
lnsrctl status
did not list the XE service. Once I corrected the hosts file, I restarted the oracle-xe service and remote connections began to work.我在运行防火墙的 Windows 8.1 上也遇到类似问题。 我已经安装了 Oracle XE 11g 并安装了 Oracle Application Express 5.0.2。 本地主机/计算机中的一切都按预期工作。 唯一的问题是无法从 LAN 内的远程计算机登录到 Oracle Application Express。
经过一番研究,通过将 TNSLSNR 可执行文件添加到 Windows 防火墙设置中解决了该问题,如下所示。
系统与安全 --> Windows 防火墙 --> 允许的应用程序
I have similar issue with windows 8.1 running with firewall. I have installed Oracle XE 11g and installed Oracle Application express 5.0.2. Everything is working as expected in the local host / machine. Only issue was unable to login to oracle application express from the remote machine within LAN.
After some research, resolved the issue by adding TNSLSNR executable to windows fire wall settings as below.
System and Security --> Windows Firewall --> Allowed apps
确保您的计算机启用了远程连接。
在本地计算机上连接到
http://localhost:8080/apex/
作为系统用户,然后转到“管理”并从右侧面板中选择“管理 HTTP 访问”,然后在以下窗口中选择,因此请按应用更改。
在我的机器上,我必须重新启动才能得到结果。
make sure remote connection is enabled in your machine.
on the local machine connect to
http://localhost:8080/apex/
as SYSTEM user, then go to Administration and from right side panel choose Manage HTTP Access then in the following window chooseso press apply changes.
In my machine I have to restart to get result.