One option to change the password is to include the new password to a
statement, for example:
GRANT CONNECT TO SomeUser IDENTIFIED BY SomePassword;
However be careful: If you specify a non-existent user, the user will be created so it's easy to mistakenly create unwanted users.
Few comments on the original trick:
In your examples, the passwords are changed for users, not roles. Role password is a different thing and is defined typically using
kaveh Yazdi Nezhad wrote:if you wante to change sys/system password , you have to work a little more :
1- connect to oracle
2- run this command :
alter user sys/system identified by newpassword;
3- restart your oracle service or your O.S
can be used for any user (as long as you have the necessary privileges), not only for
Also there's no need to restart the database instance when using
kaveh Yazdi Nezhad wrote:You can use Update command :
update sys.user$ set password='Newpass' where name='SCOTT';
it's needed to mention that sys/system passwords will change after system/service restart and before that still you can connect with old passwords
1. In my opinion, this is something that should never
be done. System tables are not meant to be modified using DML statements instead we have the necessary DDL statements such as
2. As far as I know, the password is encrypted in
so setting the password in non-encrypted format won't work correctly.
3. If the password is changed by updating
I believe that instance restart is needed in order to reset the password in SGA.