Reset Password By Values in 12c

January 9, 2018 at 2:21 pm | Posted in Oracle Developement | 3 Comments

In prior Oracle version you used to be able to hack a users password by using the identified by values syntax. This no longer works in 12c, but there is a hack for the hack as blogged by Brian Peasland.

Here is a quick query that will generate the alter user command:

select u.username
 ,'alter user '||u.username||' identified by values '''||s.spare4||''';' cmd
 from dba_users u
 join sys.user$ s
 on u.user_id = s.user#
 where u.username = upper('&username');




RSS feed for comments on this post. TrackBack URI

  1. Thank you so much.. I have been struggling trying with old method. It really helped me.

  2. i prefer this : select dbms_metadata.get_ddl(‘USER’,USERNAME) from dba_users where ACCOUNT_STATUS=’OPEN’;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Entries and comments feeds.

%d bloggers like this: