简体   繁体   English

SQl 开发人员获得 ORA-01017

[英]SQl Developer gets ORA-01017

SQL Plus makes login but SQL Developer doesn´t SQL Plus 可以登录,但 SQL 开发人员没有

I am using:我在用:

  • Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production Version 18.4.0.0.0 Oracle Database 18c Express Edition Release 18.0.0.0.0 - 生产版本 18.4.0.0.0
  • SQL*Plus: Release 18.0.0.0.0 SQL*Plus:版本 18.0.0.0.0
  • SQL Developer 20.2.0.175.1842 SQL 开发者 20.2.0.175.1842

Using SQL Plus I can make login使用 SQL Plus 我可以登录

  • user: system as sysdba用户:系统为 sysdba
  • psw: oracle psw:oracle

Using SQL Developer I get ORA-01017使用 SQL Developer 我得到 ORA-01017

在此处输入图像描述

But months ago I made login everyday with SQL Developer.但是几个月前,我每天都使用 SQL Developer 登录。

I am using a Windows 10 with a few other users.我正在与其他一些用户一起使用 Windows 10。

How can I make login with SQL Developer again?如何再次使用 SQL Developer 登录?

It's not obvious but you are using a different connection type in SQL*Plus compared to SQL Developer.这并不明显,但与 SQL Developer 相比,您在 SQL*Plus 中使用了不同的连接类型

In SQL*Plus you're doing this:在 SQL*Plus 中,您正在这样做:

user: system as sysdba

However, in the SQL Developer connection dialog your tipo de conexion is set to Basico .但是,在tipo de conexion开发人员连接对话框中,您的连接线设置为Basico Open the dropdown and choose Sysdba , and you should be fine.打开下拉菜单并选择Sysdba ,你应该没问题。

The reason for this is that SYSTEM is a power-user account, and so needs an elevated connection.原因是 SYSTEM 是高级用户帐户,因此需要提升连接。

Your connection with sqlplus is utilizing os credentials, and is not even checking the username and password.您与 sqlplus 的连接正在使用操作系统凭据,甚至没有检查用户名和密码。 The fact that you are requesting a connection 'as sysdba' tells oracle to see if the requesting OS user is a member of the os group DBA.您请求连接“作为 sysdba”的事实告诉 oracle 查看请求的操作系统用户是否是操作系统组 DBA 的成员。 If it is, let 'm in.如果是,让我们进来。

[oracle@vbol83-01 ~]$ sqlplus fubar/thisiswrong as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jan 24 08:31:50 2022
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL>

In fact, you don't even need a username/password at all for this connection:实际上,您甚至根本不需要用户名/密码来进行此连接:

[oracle@vbol83-01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jan 24 08:34:11 2022
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

On the other hand, your SQL Dev connection is going across the network, and requires the credentials that are presented match what is in the oracle password file.另一方面,您的 SQL 开发连接正在通过网络,并要求提供的凭据与 oracle 密码文件中的凭据相匹配。

I don't know what your system looked like "months ago", or what you might have been doing differently then.我不知道你的系统“几个月前”是什么样子,或者你当时可能做了什么不同的事情。

OK, this is not th best solution, but it could be usefull.好的,这不是最好的解决方案,但它可能很有用。

I didn´t resolve how to connect SQl Developer using "system" user, but I have how to use SQL Developer.我没有解决如何使用“系统”用户连接 SQl Developer,但我知道如何使用 SQL Developer。

First, use SQL Plus to create a new user, for example "system_user_1":首先,使用 SQL Plus 创建一个新用户,例如“system_user_1”:

alter session set "_ORACLE_SCRIPT"=true;
create user system_user_1 identified by system_user_1;
GRANT RESOURCE TO system_user_1;
grant create session to system_user_1;
grant unlimited tablespace to system_user_1;
grant sysdba to system_user_1;

Then, add new conection to SQL Developer for "system_user_1" as SYSDBA:然后,将新连接添加到 SQL Developer for "system_user_1" 作为 SYSDBA:

Finally you can use "system_user_1" to create new regular users:最后,您可以使用“system_user_1”创建新的普通用户:

alter session set "_ORACLE_SCRIPT"=true;
create user regular_user_1 identified by regular_user_1;
GRANT RESOURCE TO regular_user_1;
grant create session to regular_user_1;
grant unlimited tablespace to regular_user_1;

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM