Andres
Andres

Reputation: 73

Oracle 12c double quote on password restrictions

I've been able to use any character on my passwords successfully using double quotes like:

alter user example identified by "weird/@#&'pass\\";

I haven't had any issues with special exceptions, even /0 \ and other special cases I've seen failed before work, but, I cannot use a double quote in my password ("), I've tried escape characters already with no success.

I see no restrictions on the Oracle Reference, so is there a way to use double quotes or is this an undocumented restriction?

Upvotes: 7

Views: 7872

Answers (1)

Lalit Kumar B
Lalit Kumar B

Reputation: 49092

You said,

but, I cannot use a double quote in my password ("), I've tried escape characters already with no success.

I see no restrictions on the Oracle Reference, so is there a way to use double quotes or is this an undocumented restriction?

Oracle has clearly documented the exception of the double quotation mark (") and the return character in the password. Quote from the documentation about IDENTIFIED BY clause,

Passwords can contain any single-byte, multibyte, or special characters, or any combination of these, from your database character set, with the exception of the double quotation mark (") and the return character.

So, you cannot use double quotation mark` in the password. You would get two types of error :

SQL> create user test identified by "hi"hi";
create user test identified by "hi"hi"
                                     *
ERROR at line 1:
ORA-01741: illegal zero-length identifier


SQL> create user test identified by "hi""hi";
create user test identified by "hi""hi"
                               *
ERROR at line 1:
ORA-03001: unimplemented feature


SQL>

Upvotes: 6

Related Questions