I cannot understand why the account in Oracle 19c NON-CDB database getting locked few minutes later after creation. Audit trail is not configured.
I'm running the database in container, it's Oracle 19c, NON-CDB. Firstly I'm creating new profile with all the corresponding parameters set to UNLIMITED. Then I'm creating the user account using that profile and first unclear thing is the account is created as LOCKED.
Question #1. Why is it locked after creation?
Then I'm doing
alter user MYUSER identified by password account unlock;
I'm checking DBA_USERS and see that MYUSER is OK:
ACCOUNT_STATUS LOCK_DATE EXPIRY_DATE
-------------------- -------------------- --------------------
OPEN
Then I'm running sql-scripts against the created schema to create all the need objects. Everything goes fine. This takes about 2-3 minutes to complete. When all scripts executed I can successfully login into the MYUSER schema and see all created objects.
But about 5-10 minutes later if I try to login again, I'm getting:
ORA-28000: The account is locked.
And I'm connecting as SYS to check and see that the account really locked with today date:
ACCOUNT_STATUS LOCK_DATE EXPIRY_DATE
-------------------- -------------------- --------------------
EXPIRED & LOCKED 04-JUL-24 04-JUL-24
Question #2. Why is it happening? Why the account is getting locked despite its profile settings.
Question #3. How to find out what locks the account if audit trail is not enabled?
Next thing I do is just running again alter-action the same as before and in this case the account continue to be unlocked forever and works fine.
Question #4. Why is it not getting locked again then?
Thanks