简体   繁体   中英

SQl Developer gets ORA-01017

SQL Plus makes login but SQL Developer doesn´t

I am using:

  • Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production Version 18.4.0.0.0
  • SQL*Plus: Release 18.0.0.0.0
  • SQL Developer 20.2.0.175.1842

Using SQL Plus I can make login

  • user: system as sysdba
  • psw: oracle

Using SQL Developer I get ORA-01017

在此处输入图像描述

But months ago I made login everyday with SQL Developer.

I am using a Windows 10 with a few other users.

How can I make login with SQL Developer again?

It's not obvious but you are using a different connection type in SQL*Plus compared to SQL Developer.

In SQL*Plus you're doing this:

user: system as sysdba

However, in the SQL Developer connection dialog your tipo de conexion is set to Basico . Open the dropdown and choose Sysdba , and you should be fine.

The reason for this is that SYSTEM is a power-user account, and so needs an elevated connection.

Your connection with sqlplus is utilizing os credentials, and is not even checking the username and password. 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. 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.

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.

First, use SQL Plus to create a new user, for example "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:

Finally you can use "system_user_1" to create new regular users:

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;

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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