DBA Hub

📋Steps in this guide1/5

Change Your Own Password in an Oracle Database

This article describes how to change the password for your own user in an Oracle database.

oracle miscconfigurationintermediate
by OracleDba
10 views
1

ALTER USER Command

Log on to the database as yourself, using any tool that can send SQL statements to the database. Once connected, issue to the following command, specifying the new password. If a password complexity verification function has been enabled, a normal user will need to include the keyword, along with the existing password. You don't need any additional privileges to change your own password. The same command can be used to change the password for another user, provided you have a privileged account. If you want to use special characters, remember to enclose the password in double quotes.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
conn my_user/MyPassword123@orcl

alter user my_user identified by MyNewPassword123;

alter user my_user identified by MyNewPassword123 replace MyPassword123;

alter user my_user identified by "MyNewPassword123#";
2

SQL*Plus and SQLcl

As well as using the command, you can use the command from the SQL*Plus and SQLcl utilities. You will be prompted for your current password and the new password.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
SQL> password
Changing password for MY_USER
Old password: ********
New password: ********
Retype new password: ********
Password changed
SQL>
3

SQL Developer

From SQL Developer, do the following. - Right-click on the connection. - Select the "Reset Password..." option from the popup menu. - In the subsequent dialog, enter the current password and the new password with confirmation. - Click the OK button.
4

TOAD

From TOAD, do the following. - From the top menu, select "Session > Change Password". - In the subsequent dialog, enter the current password and the new password with verification. - Click the OK button.
5

Proxy Users

Proxy users allow you to connect to another user with your own credentials. This way you never need to know the credentials of the schema you are connecting to. You should not attempt to change your password when connected as a proxy. Instead you should connect as yourself, change your password, then reconnect as a proxy user with your new password. As an example, let's imagine there is a schema owner called and my user called in a database called . My proxy connection would look like this. When prompted I would connect using the password for . To change my password I might to do something like this. For more information see: - Proxy User Authentication and Connect Through in Oracle Databases Hope this helps. Regards Tim...

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
conn my_user[schema_owner]@orcl

-- Connect to my user.
conn my_user@orcl

-- Change password.
alter user my_user identified by MyNewPassword123;

-- Make a proxy connection again.
conn my_user[schema_owner]@orcl

Comments (0)

Please to add comments

No comments yet. Be the first to comment!