How to obtain the password of a specified user in Oracle? What query to use to obtain that?

closed as off-topic by hot2use, Colin 't Hart, Marco, mustaccio, LowlyDBA Dec 5 '18 at 16:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Colin 't Hart, Marco, LowlyDBA
If this question can be reworded to fit the rules in the help center, please edit the question.


You cannot; Oracle does not store user passwords, only their hash values, which you can retrieve by select password from dba_users where username = 'WHATEVER'.

  • I think in order to see the full password hash you have to select table SYS.USER$ – Wernfried Domscheit Nov 24 '18 at 20:25

Short answer: You can't.

Quite properly, Oracle Database does not store passwords in any recoverable form.

If, like me, you have a need to drop and recreate a given account, use:

set long 32767 ;
dbms_metadata.get_ddl( 'USER', 'account-name' ) user_ddl from dual ;

Not the answer you're looking for? Browse other questions tagged or ask your own question.