日期:2014-05-16  浏览次数:20500 次

或许你不知的ORACLE秘密 系列一

Oracle 11g introduces Case-sensitive passwords for database authentication. Along with this if you wish to change the password (temporarily) and reset it back to old , you will find that password field in dba_users is empty. Prior to 11g we could use following technique to change/restore password

SQL> create user liu identified by liu;User created.
SQL> grant create session to liu;Grant succeeded.
SQL> conn sys as sysdbaEnter password:Connected.
SQL> select username,password from dba_users where username='LIU';
USERNAME                           PASSWORD
------------------------------ ------------------------------
LIU                                       9DEC0D889E8E9A6B

SQL> alter user amit identified by abc;

User altered.

SQL> conn amit/abc

Connected.

SQL> conn sys as sysdba

Enter password:

Connected.

SQL> alter user LIU identified by values'9DEC0D889E8E9A6B';

User altered.

SQL> conn l