DROP USER fails with "ORA-01918: user does not exist" when username contains newline
Last updated on SEPTEMBER 16, 2015
Applies to:Oracle Database - Enterprise Edition - Version 126.96.36.199 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%';
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms