Oracle 和 Sql 开发者连接

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9537878/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 04:01:05  来源:igfitidea点击:

Oracle and Sql developer Connection

oracleoracle11g

提问by Sahib Singh

How do I find out the SID of my Oracle Database. I have Oracle 11g installed in my system, and i want to make a connection between SQL developer and oracle. But when I test the connection using the default SID ie xe it gives me an error of ORA-12505.

如何找出我的 Oracle 数据库的 SID。我的系统中安装了 Oracle 11g,我想在 SQL 开发人员和 oracle 之间建立连接。但是当我使用默认的 SID 即 xe 测试连接时,它给了我 ORA-12505 的错误。

回答by Joachim Isaksson

If you can connect to the database using sqlplus, just show the SID / instance name by doing;

如果你可以使用sqlplus连接到数据库,只需通过执行显示SID/实例名称;

show parameter instance_name 

or alternately

或者交替

select instance_name from v$instance; 

回答by Avi

In SQL Developer Default connection for oracle 11g:

在 Oracle 11g 的 SQL Developer 默认连接中:

Go to connection > New Connection

转到连接 > 新建连接

Connection Name =  HR or use any other name
User name = hr
Password = Your Password (This is the password that you selected during the installation of the of Oracle 11g) 

Check the "Save" option

勾选“保存”选项

role: default
port 1521
SID : orcl

If you want to create the SYSDBA Account: (Administrator account)

如果要创建 SYSDBA 帐户:(管理员帐户)

Connection Name =  admin ORCL or use any other name
User name = sys

Password = Your Password(This is the password that you selected during the installation of the of Oracle 11g)

Password = Your Password(这是您在安装 Oracle 11g 时选择的密码)

role: sysdba (from the drop down)
port 1521
SID : orcl

TEST and Save Connect

测试和保存连接

Just in case if your HR account is locked because you have connected multiple number of times than you can fix this by logging into your SYS DBA account.

以防万一您的 HR 帐户因连接多次而被锁定,您可以通过登录到您的 SYS DBA 帐户来解决此问题。

In the objects list on your list go to the OTHER USERS.

在列表中的对象列表中,转到其他用户。

GO to HR Account > Right Click

转到 HR 帐户 > 右键单击

EDIT USER

EDIT USER

Choose the password you want and uncheck The account locked and the Password Expired options if they are checked.

选择您想要的密码并取消选中 The account locked 和 Password Expired 选项(如果它们被选中)。