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
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'.
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 ;