I have this problem:
When I create the TEST user with the password TEST but in the PDBDB1 container
ALTER SESSION SET CONTAINER= PDBDB1;
CREATE USER TEST IDENTIFIED BY TEST ;
GRANT "CONNECT" TO TEST ;
GRANT "RESOURCE" TO TEST ;
ALTER USER "TEST" DEFAULT ROLE "CONNECT","RESOURCE";
And when I try to connect with SQL Developer from my laptop and use the srvpdb1 service (from this container), I have an error: invalid username / password; logon denied
But when I give it SYSDBA permission
GRANT SYSDBA TO TEST;
And in SQL Developer, I will change Role: SYSDBA
It connects correctly to the correct container right away.
show con_name
CON_NAME
------------------------------
PDBDB1
CodePudding user response:
Make sure your connection looks like this -
It's likely you copied your SYS connection, and had your Role set to 'SYSDBA' - which will give you a bad user/password response if the user doesn't have the SYSDBA role granted.
PS Don't grant this role to someone unless they are truly the type who will be doing dba work or upgrading/repairing your database.
CodePudding user response:
When will I do:
SQL> revoke sysdba from TEST;
And I set Role: Default in SQL Developer unable to connect.
And I have an invalid user / password error.
And when (for tests only) I set:
SQL> GRANT SYSDBA TO TEST;
And I set "SYSDBA" in SQL Developer, the TEST user connects correctly.
Of course, I don't want to leave SYSDBA, but how do I make it connect properly?