DROP USER fails with "ORA-01918: user does not exist" when username contains newline
(Doc ID 1665546.1)
Last updated on SEPTEMBER 14, 2021
Applies to:Oracle Database Cloud Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 22.214.171.124 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
A DROP USER command fails even though the user appears in DBA_USERS. Unlike Note 1297361.1, the username has been specified in the correct case and in double quotes.
Inspecting the username using the LENGTH function reveals that the username contains an extra, unprintable, character.
For example, for a username of "ops$scott", which is 9 characters long, the following would be observed:
SQL> select length(username) x from dba_users where username like 'ops$scott%';
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document