ORA-28040 After the Move to 26ai: Rolling Back the Setting Made It Worse
The migration to 26ai went well. Every application connected, including the old reporting service that still runs
on an 11g-era JDBC driver. Two weeks later, a hardening ticket lands: set
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 12a, the strictest value. That night the password rotation job runs, as it does every month, and sets the reporting
account’s new password. The next morning the reporting service is down:
ORA-28040: The database does not accept your client's authentication protocol; login denied.
Someone rolls the setting back. The reporting service, configured with the new password, still can’t log in, but now the error is different:
ORA-01017: invalid credential or not authorized; logon denied
The password is correct. A few minutes later the account is locked, and the main application, on a current driver, can’t log in either.
I built a lab to measure each step of this on Oracle AI Database 26ai Free (23.26.3), with four clients: SQLPlus
11.2.0.2, the 11.2.0.4 JDBC driver (ojdbc6), the 26ai SQLPlus and the 19.24 JDBC driver (ojdbc8), both drivers
on Java 8. Here is what each one got, and why rolling back made it worse.
What the default lets in
In 26ai SQLNET.ALLOWED_LOGON_VERSION_SERVER defaults to 12, and the
Net Services Reference
lists only two values: 12 and 12a. With nothing in sqlnet.ora, all four clients logged in, the 11.2.0.2 SQLPlus
and the 11.2.0.4 JDBC driver included. So moving to 26ai doesn’t, by itself, lock out an 11.2 client. (The reference
asks for 11.2.0.3, or an older client with the October 2012 patch; the 11.2.0.2 XE SQLPlus logged in anyway. I
couldn’t get an older client from an official source to test the edge.)
The setting decides two things: which login protocol a client must support, and which password versions (hashes)
the database stores when a password is set. At the default, a password gets two: 11G and 12C.
select username, password_versions from dba_users where username = 'APP';
USERNAME PASSWORD_VERSIONS
APP 11G 12C
The 11.2 clients log in with the 11G one. Keep that in mind; it’s the whole story.
12a: who gets ORA-28040
With SQLNET.ALLOWED_LOGON_VERSION_SERVER = 12a added to the server’s sqlnet.ora (no restart; it applies to new
connections):
| client | default (12) | 12a |
|---|---|---|
| SQL*Plus 11.2.0.2 | logs in | ORA-28040 |
JDBC 11.2.0.4 (ojdbc6) | logs in | ORA-28040 |
| SQL*Plus 26ai | logs in | logs in |
JDBC 19.24 (ojdbc8) on Java 8 | logs in | logs in |
The reference says 12a lets in “only Oracle Database 12c release 1 (12.1.0.2 or later) clients”, and that a JDBC
client offers the needed ability only on JRE 8 or later. Note the 26ai wording of the error: “The database does not
accept your client’s authentication protocol”. Older releases said “No matching authentication protocol”, so search
for the number, not the text.
What makes this one hard to diagnose is where it doesn’t show up:
- The unified audit trail. With the
ORA_LOGON_FAILURESpolicy enabled, a wrong password was recorded (RETURN_CODE = 1017). TheORA-28040attempts weren’t: zero rows inCDB_UNIFIED_AUDIT_TRAIL, checked from the root. - The alert log and the listener log. No
ORA-28040in either. The listener logs the connection as established. - The failed-login count. Eight
ORA-28040s against an account withFAILED_LOGIN_ATTEMPTS 5left its count at 0 and the accountOPEN.
The database refuses the client before it checks a password, and keeps no record of it. The only place the error exists is the client’s log.
Rolling back: ORA-01017 with the right password
First the control: with 12a removed again and no password change in between, all four clients logged in as
before. Rolling back on its own undoes 12a.
Here’s the step that turns a contained outage into a bigger one. While 12a was set, the account’s password was
reset. That happens all the time: a rotation job, a ticket, someone testing the fix. Under 12a the database stores
only the 12C version:
USERNAME PASSWORD_VERSIONS
APP2 12C
Then the setting went back to the default:
| client | 12, after a password change under 12a |
|---|---|
| SQL*Plus 11.2.0.2 | ORA-01017 (right password) |
| JDBC 11.2.0.4 | ORA-01017 (right password) |
| SQL*Plus 26ai | logs in |
| JDBC 19.24 | logs in |
The protocol is allowed again, but the 11G password version the old clients need is gone. Oracle’s own text
doesn’t agree with what these two clients got: the oerr entry for ORA-28040 says it’s “also raised when the client
is authenticating to a user account which was created without a verifier suitable for the client software version”,
and the Net Services Reference names ORA-03134 for a client that needs the 11G version when it’s missing. Both
11.2 clients got ORA-01017.
And unlike ORA-28040, ORA-01017 counts as a failed login. With FAILED_LOGIN_ATTEMPTS 5 on the account:
the old SQL*Plus, right password, 6 tries:
ORA-01017 ORA-01017 ORA-01017 ORA-01017 ORA-01017 ORA-28000
account status: LOCKED(TIMED)
SQL*Plus 26ai, right password: ORA-28000
An old client retrying in a loop locks the shared account for everyone, the current applications included. The lab
set a limit of 5; check what your accounts’ profiles say (FAILED_LOGIN_ATTEMPTS in DBA_PROFILES).
The fix is a password reset after the setting is back at 12. That stores 11G 12C again, and all four clients
log in:
alter user app2 identified by "<the same password>" account unlock;
Accounts that came from 11g
A long-lived database has accounts whose passwords were last set on 10g or early 11g, and they can carry only the
10G password version. 26ai doesn’t support it: the reference says the 10G verifier “is no longer supported or
available on Oracle AI Database 26ai.”
I made two accounts on 11g XE (11.2.0.2): LEGACY10 with only 10G, and LEGACY11 with 10G 11G, the usual mix
on an 11g database. Both logged in there. Then a schema export and an import into 26ai:
ORA-39384: Warning: User LEGACY10 has been locked and the password expired.
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 1 error(s)
USERNAME PASSWORD_VERSIONS ACCOUNT_STATUS
LEGACY10 (none) EXPIRED & LOCKED
LEGACY11 10G 11G OPEN
LEGACY10 arrived with no usable password at all. Every client, old or new, got ORA-28000 for it. The import log
calls it a warning, and the job reports “completed with 1 error(s)”, which is easy to wave through in a migration
with hundreds of objects. The same import into 21c XE and into 23ai Free (23.5) did exactly the same, so this isn’t
new in 26ai; in those three runs, at the default setting, it’s what an 11g-to-21c-or-later import did with such
accounts.
LEGACY11 arrived OPEN, with 10G 11G, and all four clients logged in at the default. But it has no 12C
version, so under 12a:
| client | LEGACY11 under 12a |
|---|---|
| SQL*Plus 11.2.0.2 | ORA-28040 |
| JDBC 11.2.0.4 | ORA-28040 |
| SQL*Plus 26ai | ORA-01017 (right password) |
| JDBC 19.24 | ORA-01017 (right password) |
Turning on 12a locks migrated accounts out even for current clients, until their passwords are reset.
None of the 12a and password-version behaviour above is specific to 26ai; the 12a setting and the 12C password
version date back to 12c. What 23ai and 26ai changed is the next part.
The 10G password version isn’t coming back
Old forum answers to ORA-28040 say to set SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8. On 26ai the database accepts
the line without complaint, and it changes nothing useful: a password set under 8 still got only 11G 12C, and
putting a 10G-only hash back with IDENTIFIED BY VALUES failed:
ORA-02153: invalid VALUES password string
23ai Free (23.5) behaved the same way. The control was 21c XE: there, a password set under 8 got 10G 11G 12C,
and the 10G-only hash was accepted. On 23ai and 26ai there’s no 10G version left for a client that needs one; the
client has to be upgraded.
Database links go the other way
A 26ai database that keeps a database link to an 11g system that stays behind is itself the client. The link from
the 26ai PDB to the 11g XE database worked at the default. With
SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 12a on the 26ai side, a hardening baseline sometimes sets both, the link
failed:
ORA-28040: The database does not accept your client's authentication protocol; login denied.
Find them before you change anything
Since the database keeps no record of an ORA-28040, find the old clients while they’re still connected:
select distinct ci.client_version, ci.client_driver, s.program, s.machine, s.username
from v$session s
join v$session_connect_info ci on ci.sid = s.sid and ci.serial# = s.serial#
where s.type = 'USER'
order by 1;
CLIENT_VERSION CLIENT_DRIVER PROGRAM
11.2.0.2.0 SQL*PLUS sqlplus@legacydb (TNS V1-V3)
11.2.0.4.0 jdbcthin JDBC Thin Client
19.128.0.0.0 jdbcthin : 19.24.0.0.0 JDBC Thin Client
23.26.3.0.0 SQL*PLUS sqlplus@dbhost (TNS V1-V3)
Per the reference, anything below 12.1.0.2 gets ORA-28040 under 12a; both 11.2 clients in the lab did. One
oddity: the 19.24 JDBC driver reported 19.128.0.0.0 as
its CLIENT_VERSION; CLIENT_DRIVER had the real version. A batch job that connects once a month won’t be in
V$SESSION when you look, so sample this over a full business cycle, or check the application inventory.
Then the accounts that 12a would lock out, the ones without a 12C password version:
select username, password_versions, account_status
from dba_users
where oracle_maintained = 'N'
and (password_versions is null or password_versions not like '%12C%')
order by 1;
In the lab, after the import, that listed both migrated accounts: LEGACY10 with none, LEGACY11 with 10G 11G.
On a real system it also lists schema-only and externally authenticated accounts, which have no password versions
and don’t log in with a password anyway; skip them.
The order that works
- Inventory the clients with
V$SESSION_CONNECT_INFO, over time. Note every client below 12.1.0.2, and every JDBC application still on Java 7 or older. - Inventory the password versions with the
DBA_USERSquery. After a migration from 11g, look at the Data Pump log forORA-39384too. - Upgrade or retire the old clients. There’s no setting that lets a 10G-only client into 23ai or 26ai.
- Reset the passwords of accounts without
12C, while the setting is still12, so they get11G 12C. - Then set
12a, if your baseline asks for it, and reset those passwords once more if you want them to keep only12C. - If you have to roll back, reset the passwords of the affected accounts right after, and stop the old clients’ retries before they lock the account for everyone.
Prove it
The lab runs Oracle AI Database 26ai Free (23.26.3) and Oracle Database 11g XE (11.2.0.2), whose SQL*Plus is the old client and whose database is the migration source. The JDBC drivers run on Java 8:
drill case result
default no setting (12) all 4 clients log in; APP 11G 12C
strict 12a 11.2 SQL*Plus / JDBC: ORA-28040; 26ai SQL*Plus,
JDBC 19.24: in; ORA-28040 not audited (ORA-01017 is),
not in alert or listener log; 8 tries: lcount 0, OPEN
control: back to 12, no password change all 4 in again
verifier password reset under 12a, back to 12 12C only; 11.2 clients ORA-01017 (right password);
5 tries -> ORA-28000 for every client;
reset under 12 -> 11G 12C, all 4 in
teng setting 8 / VALUES with a 10G-only hash 11G 12C (no 10G) / ORA-02153
legacy 11g accounts via Data Pump: 10G / 10G 11G ORA-39384; (none), EXPIRED & LOCKED, ORA-28000 for all
/ OPEN, all 4 in; under 12a: ORA-01017 for the new
clients; reset fixes LEGACY10
find one held session per client CLIENT_VERSION 11.2.0.2.0, 11.2.0.4.0, ...
dblink 26ai -> 11g link; ALLOWED_LOGON_VERSION_CLIENT works / 12a: ORA-28040
Don’t take my word for it — run it. The auth-protocol lab asserts every row: each client’s result at the default and under
12a, the rollback control, the missing audit, alert and listener entries, the lockout count, the password versions after each reset, theORA-01017and the lockout after a rollback, the Data Pump import of both 11g accounts, the missing10Gversion,V$SESSION_CONNECT_INFO, and the database link. If any of it doesn’t reproduce, the run fails. Proven on every CI push.
What the lab doesn’t cover: clients older than 11.2 (I couldn’t get one from an official public source), ODP.NET, python-oracledb, OCI applications other than SQL*Plus, and Kerberos, RADIUS or TLS authentication. The 21c and 23ai controls were one-off runs, not part of the lab.
What teams get wrong
- Assuming 26ai locks out 11g clients on its own. At the default, an 11.2 SQL*Plus and the 11.2.0.4 JDBC driver logged in.
- Rolling back
12aand stopping there. Passwords changed while it was set have only12C. The old clients then getORA-01017with the right password, and their retries lock the account for everyone. - Looking for
ORA-28040on the server. It isn’t in the unified audit trail, the alert log or the listener log. Only the client sees it. - Treating
ORA-39384as a warning. The account arrived with no password and locked. - Setting
ALLOWED_LOGON_VERSION_SERVER = 8. On 23ai and 26ai it doesn’t bring back the10Gversion. - Turning on
12abefore checkingPASSWORD_VERSIONS. Accounts without12C, like migrated ones, getORA-01017even from current clients. - Forgetting the database links. With
ALLOWED_LOGON_VERSION_CLIENT = 12a, the database is the client that getsORA-28040.
Frequently asked questions
What causes ORA-28040 after an upgrade to Oracle 23ai or 26ai?
A client that doesn't support the login protocol that SQLNET.ALLOWED_LOGON_VERSION_SERVER requires. In the companion lab on Oracle AI Database 26ai Free 23.26.3, the default (12) let an 11.2.0.2 SQL*Plus and the 11.2.0.4 JDBC driver log in; with 12a both got ORA-28040, while the 26ai SQL*Plus and the 19.24 JDBC driver on Java 8 logged in. Oracle documents 12a as accepting only 12.1.0.2 or later clients, and JDBC only on JRE 8 or later.
Why do I get ORA-01017 with the correct password after changing SQLNET.ALLOWED_LOGON_VERSION_SERVER?
Because the account no longer has the password version the client needs. In the companion lab, a password reset while 12a was set left only the 12C version; after going back to 12, the 11.2 clients got ORA-01017 with the right password while newer clients logged in. A password reset under 12 stored 11G 12C again and fixed it. Under 12a, accounts that have only 10G 11G (migrated from 11g) get ORA-01017 even from current clients.
Does ORA-28040 appear in the audit trail or the alert log?
Not in the companion lab. With the ORA_LOGON_FAILURES unified audit policy enabled, a wrong password was recorded with return code 1017, but there were no rows for the ORA-28040 attempts in CDB_UNIFIED_AUDIT_TRAIL, and nothing in the alert log or the listener log. The attempts also didn't count toward FAILED_LOGIN_ATTEMPTS. Find old clients beforehand with V$SESSION_CONNECT_INFO.CLIENT_VERSION.
Can I set SQLNET.ALLOWED_LOGON_VERSION_SERVER to 8 or 10 on 23ai or 26ai to allow old clients?
It doesn't bring back the 10G password version. In the companion lab on 26ai, and on 23ai Free 23.5, a password set with the setting at 8 still got only 11G 12C, and a 10G-only hash in IDENTIFIED BY VALUES failed with ORA-02153. On 21c XE the same steps produced and accepted a 10G version. Oracle's 26ai Net Services Reference lists only 12 and 12a and says the 10G verifier is no longer supported or available.
What happens to 11g accounts with only a 10G password version when I import them into 26ai?
In the companion lab, Data Pump created the account with no password version, EXPIRED & LOCKED, and logged ORA-39384 as a warning; the job reported 'completed with 1 error(s)'. Every client got ORA-28000 until the password was reset and the account unlocked. An account with 10G 11G arrived OPEN and worked at the default. The same happened importing into 21c XE and 23ai Free.
Can a database link fail with ORA-28040?
Yes, when the database with the link is the client. In the companion lab a link from 26ai to an 11.2.0.2 database worked at the default, and failed with ORA-28040 once SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 12a was set in the 26ai sqlnet.ora.
ORA-28040 is the visible part. The protocol setting decides who may talk to the database; the password versions
decide whether an account can be checked at all, and they change whenever a password does. Inventory both before
you touch the setting, reset passwords at the right moment, and treat ORA-39384 in an import as an account that
won’t log in. Then prove it with the auth-protocol lab.
Have a question or some feedback?
I write here in a personal capacity and enjoy comparing notes with other Oracle folks. Say hello.
Get in touch