Oracle 12.2: Reset user password is not working - oracle

I have tried to import a database-dump that was created with Oracle 12.1 (12c Release 1) into my Oracle 12.2.
There was some problem due to a false or invalid authentication protocol:
ORA-28040: No matching authentication protocol
I found some posts where people had similar problems and tried to fix it by adding the following two lines to my sqlnet.ora
(the file is located in C:\app\oracle\product\12.2.0\dbhome_1\network\admin):
SQLNET.ALLOWED_LOGON_VERSION = 8
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8
Since then I can not connect with any of my users anymore. I have deleted the two lines above from sqlnet.ora and now my sqlnet.ora only contains the following two lines, just as before:
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
But I cannot connect with any user now. I thought I just have to reset the passwords for all of my users.
So I have tried to reset the passwords for all Oracle users. Therefore I use the cmd and log in to sqlplus as sysdba:
C:\>sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mi Nov 20 14:14:44 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
SQL> select * from all_users where username='CUSTOMER';
USERNAME USER_ID CREATED COM O INH DEFAULT_COLLATION IMP ALL
--------------------------------------------------------------
CUSTOMER 106 10.07.19 NO N NO USING_NLS_COMP NO NO
SQL> alter user CUSTOMER identified by CUST;
User was changed.
SQL> connect CUSTOMER/CUST
ERROR:
ORA-01017 Invalid Username/Password
The same happens if I try to reset the password in the GUI of SQL Developer. I always get ORA-01017.
With another user it worked again, but only after I tried the following:
alter user CUST2 identified by "cust2";
So I had to put the password in double quotes and in the properties of the connection in SQL Developer I used the password cust2 without quotes for the user CUST2. Somehow that worked, but I have tried the following options for the password for the user CUSTOMER: CUST, "CUST", cust, "cust". I have also tried different passwords like TEST, test, "Test", custom, "custom", etc.
But nothing works, I can not connect with the user CUSTOMER anymore.
The SID of my Oracle instance is orcl, and I have also tried the following:
SQL> connect CUSTOMER#orcl/CUST
ERROR:
ORA-12514 –
TNS:listener does not currently know of service requested in connect descriptor
Does someone know how to fix this?

Related

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;

Oracle on Docker :: Warning: You are no longer connected to ORACLE. SP2-0640: Not connected

In the screenshot below you can see how I can successfully connect to the database but the command is rejected because... I'm not connected to the database...
I login into SQL*Plus and I receive the confirmation I'm connected: Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0
Just to be sure I re-enter the connection: connect SYSTEM/SYSTEM#localhost:1521/ORCLCDB and I receive as a response Connected.
I follow the official instruction of Oracle Database Sample Schemas and I run #/home/oracle/db-sample-schemas-master/mksample.sql systempw syspw hrpw oepw pmpw ixpw shpw bipw users temp /var/opt/oracle/log/ localhost:1521/ORCLCDB and here is when things start to get nasty.
First I receive an ERROR: ORA-01017: invalid username/password; logon denied.
Then a Warning: You are no longer connected to ORACLE. SP2-0640: Not connected
How can it be, that is the Administrator password.
Should I grant anything else to this user?
The "no longer connected" warning is simply because the script issued its own connect that failed with ORA-01017. A connect attempt necessarily disconnects the current session first, so when the new connection fails there is no active connection at all. You have to reconnect successfully to be able to do anything useful.
The documentation you linked to says:
Start SQL*Plus and run the top level installation script as discussed in README.txt:
sqlplus system/systempw#connect_string
#mksample systempw syspw hrpw oepw pmpw ixpw shpw bipw users temp /your/path/to/log/ connect_string
Note: Use an absolute path and also append a trailing slash to the log directory name.
Use your current SYSTEM and SYS passwords, and also your actual default and temporary tablespace names. The passwords for the new HR, OE, PM, IX, SH and BI users will be set to the values you specify.
You have to supply your actual current password for the SYSTEM and SYS accounts, not the examples in that command; and sensible password for the new sample-schema accounts that will be created. For example, from your successful connect, the first argument to #mksample should be SYSTEM rather than the example systempw.
I was trying to load the sample schemas inside oracle database inside the docker container using the guide. What worked for me was to use localhost:1521/ORCLPDB1 as connection string in place of the SID. After this all of the tables got loaded.

ORA-01017 Invalid Username/Password whenever creating a new user or connection in Oracle SQL Developer 4.1

Although I have some experience with SQL, my familiarity with it has waned, and I understand this is likely a very basic issue, but I'm having no luck finding any solutions. I'm trying to set up a new connection, but all of my attempts are being blocked. I have 3 connections- one entitled COMPANY, another "System", and a generic test one (they're all blank). The original and main connection was System, and that's where the other connections were created. No matter what I've tried at this point though, I get the same error message: "Status : Failure -Test failed: ORA-01017: invalid username/password; logon denied"
My attempts follow the pattern of entering this into the System worksheet:
CREATE USER user_name
IDENTIFIED BY password;
CREATE SCHEMA user_name
IDENTIFIED BY password;
GRANT all privileges to username;
And entering the desired password and such in the new connection window. No matter what, I get the same error, even when I change the password and username. What might I be doing wrong?
If I understand your question correctly, your Oracle SQL Developer has 3 connections defined and they are blank. Hence you are not able to connect to any of it.
In this case, there are only 2 ways I think of
Find someone who has the password for the connections.
Either you or your DBA should connect to Oracle as SYSDBA and reset the password
alter user your_user identified by new_password;
Example
C:\Users\Utsav>sqlplus /nolog
SQL*Plus: Release 12.1.0.1.0 Production on Sun Jun 11 14:29:52 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect as sysdba
Enter user-name: sys
Enter password:
Connected.
SQL> alter user devdb identified by *****;
User altered.

Connecting SQL developer to Oracle 12c

I am a little new at setting up this Oracle Stuff so hopefully you bear with me.
I installed Oracle on my personal laptop and have verified running from the command prompt that it works fine. I connected using SYS as the user id and I was able to login fine
I installed SQL developer as well
How do I setup a connection from SQL developer to Oracle? I did read the manual. What are the parameters that need to be given for the connection, the user name and the password in case I need to connect to the HR database?
Run SQLPlus, connect as SYS user (use administrator's password you have entered during installation) and unlock HR user and give him a new password:
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.
If you are using Windows, then run firewall configuration and allow connections to TCP/IP port 1521.
Run SQL Developer and click big green "+" icon in "Connections" panel.
You will see a dialog box like below:
Fill in fields in this form like in the above picture.
SID is your database name you have entered during instalation (default is ORACL).
Click "Test" button to verify if everything is OK, if yes, then click "Save" button to remember connection's configuration, and then click "Connect".
My pluggable database had to be force closed first and then I was able connect successfully.

Oracle 11g database not connecting

i installed oracle 11g database express edition on my windows 7 (32 bit) pc . It was successfully installed but now when i try to open it , Firefox gives me following error.
"unable to connect."
So please reply to this post as soon as possible to open Oracle as without this , i can't go ahead in learning it. I m just a beginner.
Check if u can open SQLPLUS
if yes, change the port of ORACLE web server by using
connect / as sysdba
DBMS_XDB.sethttpport('9090');
open run SQL command line or in your cmd writes: sqlplus "/ as sysdba"
for both cases:
SQL> conn
Enter user-name:
Enter password:
In SQL DEVELOPER
Default connection for oracle 11g
go to connection>New Connection
Connection Name = HR or Use any 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)
Connection Name = admin ORCL or Use any name
User name = sys
Password = Your Password (This is the password that you selected during the installation of the of 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
In the objects list on your list go to the OTHER USERS and
GO to HR Account > RT Click
EDIT USER
Choose the password youlike
and UN CHECK The account locked and Uncheck the Password Expired options if they are checked in
This happens when the you install as a user and not as admin. Even if u have admin privileges, it won't do.
Also, after this error comes then the issue is that the port 8080 is being used by another application.
1.) First of all, stop that app.
2.) Rest Oracle Port
SQL> begin
2 dbms_xdb.sethttpport('9090');
3 end;
4 /
PS: I read one thread it says that don't use # in the password also.
Hope it helps :)

Resources