Click here to Skip to main content
11,928,605 members (54,842 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


4 bookmarked

How to Change Password in Oracle

, 26 Jul 2015 CPOL
Rate this:
Please Sign up or sign in to vote.
This alternative is created to correct few mistakes in the original tip. Most importantly: Never update system tables.

This is not meant as an alternative to the original tip "How to Change Password in Oracle" but as a clarification for changing passwords.

One option to change the password is to include the new password to a GRANT statement, for example:


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:

General comment

In your examples, the passwords are changed for users, not roles. Role password is a different thing and is defined using CREATE ROLE statement.

Option B

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

ALTER USER can be used for any user (as long as you have the necessary privileges), not only for SYS or SYSTEM.

Also there's no need to restart the database instance when using ALTER USER. The change is automatically effective.

Option C

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 ALTER USER.
  2. As far as I know, the password is encrypted in sys.user$ so setting the password in non-encrypted format won't work correctly.
  3. In the unlikely event that this would work out as it should, if the password is changed by updating sys.user$ I believe that instance restart is needed in order to reset the password in SGA.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Finland Finland
No Biography provided

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151126.1 | Last Updated 26 Jul 2015
Article Copyright 2011 by MikaW
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid