To change your Oracle Database user password, connect to your database in SQL*Plus, enter PASSWORD without a semicolon, and follow the prompts for your old and new passwords. Oracle recommends this interactive method because password entry is hidden and the password is encrypted in transit. These steps cover password-authenticated accounts in Oracle AI Database 26ai.
You can also use a SQL worksheet, the expired-password dialog in SQL Developer desktop 26.2, or Database Actions where your service and privileges permit it. Sign in only through Oracle’s own app or website, and never share a code, password, or remote access with someone who contacts you.
The short version
- Recommended method: Use the interactive
PASSWORDcommand in SQL*Plus to keep password entry hidden. - SQL alternative: Change your own password with
ALTER USERover a local or encrypted network connection. - Expired password: SQL*Plus prompts you to replace an expired password during login when you know the existing password.
- Forgotten password: Ask your database administrator to reset it and unlock the account if needed.
| Method | When to use it | What you need |
|---|---|---|
SQL*Plus PASSWORD | Change your own password interactively | A connection and your existing password |
| SQL worksheet | Change your own password using SQL | A local or encrypted connection and your existing password |
| SQL*Plus login prompts | Replace an expired password | Your existing expired password |
| SQL Developer Reset Password | Replace an expired password in desktop 26.2 | Your connection and existing password |
| Database Actions SQL | Reset a schema password in a browser worksheet | ADMIN access to Database Actions SQL |
| Database Actions user editor | Change an Autonomous Database user password | Database Actions access with administrator rights |
| Administrator reset | Recover access after forgetting a password | An administrator with the ALTER USER privilege |
Change your password in SQL*Plus
Connect to the appropriate database service in SQL*Plus using your database user account. Enter the following command without adding a semicolon:
PASSWORDAt Old password:, enter your existing password. At New password:, enter the replacement, then enter that same replacement at Retype new password:. Your password entries stay hidden during these prompts.
Change your password in a SQL worksheet
For a password-authenticated Oracle AI Database 26ai account, you can use a desktop SQL worksheet, a command-line SQL client, or an authorized browser SQL worksheet. Connect as the user whose password you want to change. In the statement below, replace your_username, new_password, and old_password with your actual values before executing it. The statement includes both passwords in its command text, so use a local connection or an encrypted network connection:
ALTER USER your_username IDENTIFIED BY "new_password" REPLACE "old_password";Keep the REPLACE clause when you execute the statement. Oracle requires it for an ordinary user when a password verification function is enabled.
If you need SQL Developer, get it from Oracle’s SQL Developer download page and select the package for your operating system. Desktop packages cover Windows, macOS, and Linux. You can use its SQL worksheet to execute the statement above.
Replace an expired password during login
When your password has expired but you still know it, start SQL*Plus and connect using your username, database service, and existing expired password. SQL*Plus prompts you to change the password before completing the connection. Enter your replacement password and repeat it when prompted.
A successful replacement completes the login. If your account is also locked, ask your database administrator to address the lock as well as the password.
Reset an expired password in SQL Developer
In SQL Developer desktop 26.2, find your database connection under Connections. Right-click the connection and select Reset Password. Enter your existing password, enter the replacement, repeat the replacement, and click OK.
SQL Developer also supports an automatic expired-password dialog when you open a connection, but that automatic dialog requires an available OCI thick driver. If it does not open, use the SQL*Plus expired-password login procedure. These dialog instructions apply to SQL Developer desktop 26.2.
Change a schema password in Database Actions
For Autonomous AI Database schemas used by Fusion Data Intelligence, such as OAX_USER and custom schemas, Oracle documents a browser SQL route for administrators. Open your database’s Database Actions, sign in with the ADMIN schema credentials, and select SQL. Replace schema_name and new_password with your actual values, then execute this statement:
ALTER USER schema_name IDENTIFIED BY "new_password";The statement includes the new password in its command text, so use an encrypted network connection.
For Autonomous Database accounts, an administrator can also use the Database Actions user editor. From the Launchpad, select Administration, then Database Users. Open the target user’s context menu and select Edit.
On User, enter the replacement in Password and repeat it in Confirm Password. If you are an administrator resetting a locked account, also deselect Account is Locked. Click Apply Changes to submit the edit.
If you cannot access the user editor, use the SQL worksheet route when you have authorized SQL access. You can also change your own password through SQL*Plus using its interactive prompts.
Get a forgotten password reset
If you have forgotten your existing password, ask your database administrator to reset your user’s password in the correct database and container. Resetting another user’s password requires the ALTER USER privilege. Your administrator can also unlock the account as part of that reset.
Your administrator can require you to replace a temporary password at your next compatible login. SQL*Plus supports that replacement through its expired-password prompts. Connect with the temporary password, then enter and confirm your replacement when prompted.
Frequently Asked Questions
Do you need ALTER USER privilege to change your own password?
You can change your own password without the ALTER USER privilege when you have a password-authenticated Oracle AI Database 26ai account. The privilege requirement applies when you reset another user’s password.
Does a common user need to connect to a particular container?
Yes, if you are changing a common user’s password with ALTER USER in Oracle AI Database 26ai, you must use the appropriate root container. Connect there before executing the password-change statement.
Is an IAM database password the same as your OCI console password?
Your IAM database password is separate from your OCI console password and from a locally authenticated database user’s password. If your database uses IAM database-password authentication, you manage that credential through Database Passwords in your OCI IAM profile.
Can you use Enterprise Manager Database Express for Oracle AI Database 26ai?
You cannot use Enterprise Manager Database Express for 26ai because Oracle desupported it in that release, following its deprecation in Oracle Database 21c. Use SQL*Plus, SQL Developer, Database Actions where available, or Enterprise Manager Cloud Control instead.