启动 Oracle SQL*Plus 时 TNS 协议适配器错误

发布于 2024-12-26 01:40:46 字数 217 浏览 3 评论 0原文

每当我尝试登录 SQL*Plus(11g 标准版 Win 64)时,我都会收到与某些连接错误相关的错误。

我尝试以 sys 作为 sysdba 登录并提供密码。

所有服务都启动了。我使用的是 Windows 7。

任何帮助将不胜感激。

在此处输入图像描述

Whenever I try to login into SQL*Plus (11g Standar Edition Win 64) I get an error related to some connection error.

I try to login as sys as sysdba and provide the password.

All the services are started. I'm on Windows 7.

Any help would be appreciated.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

再可℃爱ぅ一点好了 2025-01-02 01:40:46

尝试

sqlplus sys/<your password>@<your SID> as sysdba

Try

sqlplus sys/<your password>@<your SID> as sysdba
不知所踪 2025-01-02 01:40:46

确保 OracleService 正在运行。我一直遇到这个错误,但是当我进入“服务”,找到 OracleServiceXE 并手动启动它时,问题就解决了。我将其设置为自动启动,但有时它似乎会自行停止;至少,我找不到任何我正在做的事情来阻止它。

Ensure the OracleService is running. I keep running into this error, but when I go into Services, find OracleServiceXE and manually start it, the problem is resolved. I have it set to start automatically, but sometimes it just seems to stop on its own; at least, I can't find anything I am doing to stop it.

孤独陪着我 2025-01-02 01:40:46

使用此命令,在命令提示符

sqlplus userName/password@host/serviceName

Use this command, in command prompt

sqlplus userName/password@host/serviceName

堇色安年 2025-01-02 01:40:46

尝试在命令行中输入所有这些:

sqlplus / as sysdba

因为您正在执行的操作是启动 sqlplus,然后使用 sys as sysdba 作为用户名,这是不正确的,因为这不是有效的用户。通过使用上述命令,Oracle 使用您的系统登录凭据来访问数据库。
另外,我会通过检查您的路径来确认您正在运行的 sqlplus 可执行文件是正确的 - 确保它位于服务器安装目录的 bin 中。

Try typing all of this on the command line:

sqlplus / as sysdba

As what you are doing is starting sqlplus and then using sys as sysdba as the user-name which is incorrect as that is not a valid user. By using the above command Oracle is using your system login credentials to access the db.
Also, I would confirm that the sqlplus executable you are running is the correct one by checking your path - ensure it is in the bin of the server installation directories.

浅唱々樱花落 2025-01-02 01:40:46

由于您没有启动 Oracle 数据库,因此您收到 ORA-12560:TNS:协议适配器错误

你可以像这样启动Oracle数据库。
从开始->选择 Oracle Database 11g Express Edition(11g 或任何您的数据库类型。您可以从“所有程序”中找到它)。
然后在该文件夹内有一个带有绿色斑点的数据库图标。启动数据库图标
这是“启动服务”图标。单击它。然后需要几秒钟的时间才能启动该服务。
连接成功

收到上述消息后,再次尝试通过提供用户名和密码的 SQL plus 命令行进行连接。
输入图片此处描述

You are getting ORA-12560: TNS:protocol adaptor error becuase you didn't start the Oracle database.

You can start Oracle database like this.
From START-> select Oracle Database 11g Express Edition( 11g or what ever your database type.you can find this from All Programs).
Then inside this folder there is a DB icon with green color spot.Start Database icon
It is the Start Service icon.Click it.Then it will take some seconds and start the service.
connection success

After getting the above message,again try to connect through the SQL plus command line by giving user name and password.
enter image description here

岁月无声 2025-01-02 01:40:46

输入 SQL*Plus:

sqlplus /nolog

然后:

connect sys@<SID> AS sysdba

Enter SQL*Plus with:

sqlplus /nolog

And then:

connect sys@<SID> AS sysdba
江南烟雨〆相思醉 2025-01-02 01:40:46

转到开始 -->运行-->键入“services.msc”

选择 OracleService 名称,右键单击,启动。

稍等片刻,您的服务就会开始。然后转到 sql 命令行窗口并尝试连接到您的用户。我希望你现在就能做到。

Go to Start --> Run--> type " services.msc"

Select the OracleService name, Right Click, Start.

Wait for a while and then your service will start. Then go to your sql command line window and try to connect to your user. I hope you can do that now.

无妨# 2025-01-02 01:40:46

您可能已将 oracle 设置为不自动启动。转到开始并搜索服务。向下滚动并查找 OracleServiceORCL(或 OracleServiceSID)。如果设置为手动,双击并将启动类型更改为自动。

You might have set oracle not to start automatically. Goto Start and search for Services. Scroll down and look for OracleServiceORCL (or OracleServiceSID). Double click and change startup type to automatic if it is set as manual.

路还长,别太狂 2025-01-02 01:40:46

另一种可能性(尤其是多个 Oracle 主目录)

设置 ORACLE_SID=$SID

sqlplus /nolog

conn / as sysdba;

Another possibility (esp. with multiple Oracle homes)

set ORACLE_SID=$SID

sqlplus /nolog

conn / as sysdba;

浮华 2025-01-02 01:40:46

主要问题可能是 oracle 数据库本身可能尚未启动。
所以,你需要手动通过

运行命令->服务.msc

肯定会检查OracleXEService,它可能被禁用

右键单击转到属性->将其设置为自动并按确定。然后
只需再次右键单击即可开始。

这将开始
您的数据库让您连接到它

最后,在 sqlplus 命令行中,

以 sysdba 身份连接

输入用户名作为 admin

然后按 Enter 键,您就会连接

The major issue might be the oracle database itself may not have started.
So, you need to manually go via

run command -> services.msc

check for OracleXEService surely, it may be disabled

right click go to properties-> set it to Automatic and press Ok. Then
just right click again and start.

This will start
your database making you to connect to it

Finally, In sqlplus command line,

connect as sysdba

enter username as admin

then press enter, you'll be connected

梓梦 2025-01-02 01:40:46

确保您的 oracle 服务自动运行。
只需按 Win+R。在文本框中键入 services.msc,然后按 O 查找 Oracle 服务。 Oracle 服务如图所示

在您的 PC 中,名称可能类似于 OracleserviceXYZ。
右键单击突出显示的服务。
在此对话框自动选择并单击开始

Make sure your oracle services are running automatically.
Just press Win+R. Type services.msc in textbox then press O to find oracle services. Oracle services as shown in pic

In your PC name might be like OracleserviceXYZ.
Right click on highlighted services.
In this dialogue box select automatically and click on start

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文