将SQL开发人员连接到Oracle 12c

问题描述 投票:1回答:2

我在设置这个Oracle Stuff时有点新意,所以希望你能忍受我。

  • 我在个人笔记本电脑上安装了Oracle,并且已经验证从命令提示符运行它是否正常工作。我使用SYS作为用户ID连接,我能够正常登录
  • 我也安装了SQL开发人员

如何设置从SQL开发人员到Oracle的连接?我确实读过这本手册。如果我需要连接到HR数据库,需要为连接,用户名和密码提供哪些参数?

oracle oracle-sqldeveloper
2个回答
3
投票

运行SQLPlus,以SYS用户身份连接(使用您在安装期间输入的管理员密码)并解锁HR用户并给他一个新密码:

C:\>sqlplus  sys as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Mon Oct 19 18:10:51 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> alter user hr identified by new_password;

User altered.

SQL> alter user hr account unlock;

User altered.

如果您使用的是Windows,则运行防火墙配置并允许连接到TCP / IP端口1521。 运行SQL Developer并单击“连接”面板中的绿色“+”图标。

enter image description here

您将看到如下对话框:enter image description here

填写此表单中的字段,如上图所示。 SID是您在安装期间输入的数据库名称(默认为ORACL)。 单击“测试”按钮以验证一切是否正常,如果是,则单击“保存”按钮以记住连接的配置,然后单击“连接”。


0
投票

我的可插拔数据库必须首先强行关闭然后才能成功连接。

© www.soinside.com 2019 - 2024. All rights reserved.