Home » Misc » Special characters in Oracle passwords

Here's a table of what special characters have I succeded (and failed) to use in Oracle user passwords. Oracle10g. Solaris10.

More or less the following sequence of commands were executed (interrupted at appropriate points by login attempts with the new passwords) for all special characters I could think of (examplified here by an asterisk):

SQL> CREATE USER bla IDENTIFIED BY b*la;
SQL> GRANT CREATE SESSION TO bla;
SQL> ALTER USER bla IDENTIFIED BY bla;
SQL> ALTER USER bla IDENTIFIED BY b*la;
SQL> ALTER USER bla IDENTIFIED BY bla;
SQL> PASSWORD bla
Changing password for BLA
Old password:
New password: b*la
Retype new password: b*la
Password changed
SQL> CONN bla/b*la
SQL> EXIT
$ sqlplus bla/b*la
SQL> DROP USER bla;

See the table below for results. Keep in mind that I have not yet tried the characters as first characters of passwords.

Legend (sort of thing): "+" demonstrates success, "-" demonstrates failure. In many cases in order to achieve success small tricks are needed. These are:

  • quot: the word containing the special character must be put between double quotes

  • esc: the special character must be escaped (with a backslash on most systems)

  • defoff: define must be turned off before operation (set define off)

Special characters in Oracle 10g passwords
charactercreatealterpassconnSQL+loginnote
'+,quot+,quot+++,esc
"--+++,esc
/+,quot+,quot++,quot--sqlplus /nolog + conn
#+++++
@+,quot+,quot++,quot--sqlplus /nolog + conn
$+++++,esc
&+,defoff+,defoff,quot++,defoff+,esc
!+,quot+,quot+++,esc
?+,quot+,quot+++
%+,quot+,quot+++
^+,quot+,quot+++
*+,quot+,quot+++
(+,quot+,quot+++,escSQL+ also with quotes
)+,quot+,quot+++,escSQL+ also with quotes
_+++++supported by Oracle
++,quot+,quot+++
~+,quot+,quot+++
`+,quot+,quot+++,esc
-+,quot+,quot+++
=+,quot+,quot+++
[+,quot+,quot+++
{+,quot+,quot+++
]+,quot+,quot+++
}+,quot+,quot+++
\+,quot+,quot+++,escSQL+ also with quotes
|+,quot+,quot+++,escSQL+ also with quotes
;+,quot+,quot+++,escSQL+ also with quotes
:+,quot+,quot+++
,+,quot+,quot+++
<+,quot+,quot+++,escSQL+ also with quotes
.+,quot+,quot+++
>+,quot+,quot+++,escSQL+ also with quotes

With those passwords containing "@", or "/" I was not able to log in SQL*Plus directly. Only with nolog:

$ sqlplus /nolog
SQL> conn user/pass

Note that it is sometimes possible to start SQL*Plus from the shell also with the double-quote-method, not just by escaping the character in question.

For further info check out askTom!

Ora code

There is a page (and persumably a number of others) that can be searched for ORA-codes. Unfortunately the page tends to be rather slow, so I created an alternative, which is much faster, plus the design is more sophisticated ;)

Linkek

Valid HTML 4.01 Transitional