Oracle 协议适配器错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6173492/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle Protocol Adapter Error
提问by Mikayil Abdullayev
HI, I've just installed Oracle 10 g Express Edition on to my laptop. The platform is Windows XP SP3. Installation went normally. BUt when I try to get connected to the Oracle database via SqlPlus I get "TNS Protocol adapter error".My laptop is on the network.I'd installed the same database on to a Windows Server 2003 and it works fine. What could the problem be?
您好,我刚刚在我的笔记本电脑上安装了 Oracle 10 g Express Edition。平台为Windows XP SP3。安装正常。但是,当我尝试通过 SqlPlus 连接到 Oracle 数据库时,我收到“TNS 协议适配器错误”。我的笔记本电脑在网络上。我在 Windows Server 2003 上安装了相同的数据库,它工作正常。可能是什么问题?
回答by APC
I presume this is ORA-12560: TNS:protocol adapter error
. The Oracle documentationdescribes it as a generic TNS error, but there are two very common causes of it.
我想这是ORA-12560: TNS:protocol adapter error
. 在Oracle文档描述为一个通用的TNS错误,但也有它的两个非常常见的原因。
- The Windows service for OracleXE has not started, so the database is not up.
- The Oracle SID is not set.
- OracleXE 的 Windows 服务尚未启动,因此数据库未启动。
- 未设置 Oracle SID。
If the service is started then try setting the SID. In a command window type:
如果服务已启动,则尝试设置 SID。在命令窗口中键入:
C:> set oracle_sid=XE
(or whatever you called it). Then you should be able to connect to the database using SQL*Plus. If this does solve your problem you should probably add it to the environment variables (System info, Advanced tab).
(或无论你怎么称呼它)。然后您应该能够使用 SQL*Plus 连接到数据库。如果这确实解决了您的问题,您可能应该将其添加到环境变量中(系统信息、高级选项卡)。