Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Replaced newpassword for currentpassword
Source Link
FerranB
  • 1.4k
  • 2
  • 18
  • 28

Expanding the @Randy answer, you also can use the following (undocumented) sentence to set a password without knowing the real one:

alter user <user> identified by values '<encrypted password>'; 

You can get the encryped values for passwords on PASSWORD column on the table DBA_USERS. Its nice, for instance to migrate a database to another one and copy the password without knowing it. The password owner have not to be disturbed.

In some scenarios (for example, if password complexity verification function has been enabled) you have to use the following one:

alter user <user> identified by '<newpassword>' replace '<newpassword>';'<currentpassword>'; 

As reference, you can check in the Oracle® Database SQL Reference the ALTER USER command, and the INDENTIFIED BY clause.

Expanding the @Randy answer, you also can use the following (undocumented) sentence to set a password without knowing the real one:

alter user <user> identified by values '<encrypted password>'; 

You can get the encryped values for passwords on PASSWORD column on the table DBA_USERS. Its nice, for instance to migrate a database to another one and copy the password without knowing it. The password owner have not to be disturbed.

In some scenarios (for example, if password complexity verification function has been enabled) you have to use the following one:

alter user <user> identified by '<newpassword>' replace '<newpassword>'; 

As reference, you can check in the Oracle® Database SQL Reference the ALTER USER command, and the INDENTIFIED BY clause.

Expanding the @Randy answer, you also can use the following (undocumented) sentence to set a password without knowing the real one:

alter user <user> identified by values '<encrypted password>'; 

You can get the encryped values for passwords on PASSWORD column on the table DBA_USERS. Its nice, for instance to migrate a database to another one and copy the password without knowing it. The password owner have not to be disturbed.

In some scenarios (for example, if password complexity verification function has been enabled) you have to use the following one:

alter user <user> identified by '<newpassword>' replace '<currentpassword>'; 

As reference, you can check in the Oracle® Database SQL Reference the ALTER USER command, and the INDENTIFIED BY clause.

Source Link
FerranB
  • 1.4k
  • 2
  • 18
  • 28

Expanding the @Randy answer, you also can use the following (undocumented) sentence to set a password without knowing the real one:

alter user <user> identified by values '<encrypted password>'; 

You can get the encryped values for passwords on PASSWORD column on the table DBA_USERS. Its nice, for instance to migrate a database to another one and copy the password without knowing it. The password owner have not to be disturbed.

In some scenarios (for example, if password complexity verification function has been enabled) you have to use the following one:

alter user <user> identified by '<newpassword>' replace '<newpassword>'; 

As reference, you can check in the Oracle® Database SQL Reference the ALTER USER command, and the INDENTIFIED BY clause.