Saturday, May 17, 2008

How to change your oracle user password?

There are two SQL command syntaxes that can be used to change Oracle user password:


first thing first log in to oracle database
sqlplus "/ as sysdba" or sqlplus [user_name]@[service_name]

1. Use SQL command "alter user" to change your oracle user password (for every of oracle version).

SQL>ALTER USER [user_name] IDENTIFIED BY [password];

2. Use SQL command "PASSWORD" to change your oracle user password (for Oracle8 and above)

SQL> password;
or
SQL> password [user_name]; (In case of changing other oracle user's password. You would need to have the privileges to change other Oracle user's password).

After pressing Enter, you will be prompted to input the old password and new password which would be something similar to:

SQL> password or password [user_name]
Changing password for [user_name]
Old password:
New password:
Retype new password:

0 comments: