How to Change the Oracle Database Password?
Last Updated :
26 Aug, 2024
Changing the password of an Oracle Database is an essential administrative task that can be done through two main methods such as using the ALTER USER
command or the PASSWORD
command in the command prompt. Both methods are straightforward and offer flexibility depending on our preference for database interaction.
In this guide, we will explore both methods in detail and provide a step-by-step explanation of how to change an Oracle database password securely
How to Change the Password of the Oracle Database
There are two methods, to change the password of the Oracle database, i.e., the the PASSWORD and the PASSWORD command. Let's understand each of these method in detail.
Change Oracle Database Password By using the ALTER USER command
1. log in to your Oracle database as you normally would. Here we log in as username system and password geeks123.

2. Use ALTER USER command and specify the new password for your user
Syntax:
ALTER USER user_name IDENTIFIED BY new_password ;

Here 'system' is a username and now the new password for 'system' becomes 'Newgeeks123' it means 'system' is now identified by password Newgeeks123. The password is changed from geeks123 to Newgeeks123.
Output:

3. You don't need any other privileges to change your own password. The same command can be used to change the password for another user from your database, that user behaves as a proxy user. You can use that proxy user and a new set password to login into your database.
4. Now if trying to log in with an old password (geeks123) it will show an invalid credential as shown below, it will log in successfully when login with a new password (Newgeeks123.)

Change the Oracle Database Password By using the PASSWORD command in the command prompt.
1. Open command prompt window, enter sqlplus command to login into Oracle database.
2. Enter your username and password.
3. It will show a message like connected to Oracle database and your version name as shown below.

4. Enter the password at the SQL prompt. You will be prompted for your Old password and the New password.
5. Type your Old Password and press enter. Now type a New Password and press enter.
6. Enter the New Password again and press enter. You will receive a confirmation that your password has changed for the database to which you were logged in as shown below.

Conclusion
Changing the password of an Oracle Database is a simple yet vital task to maintain security. By using either the ALTER USER
command or the PASSWORD
command in the command prompt, you can ensure your database credentials are updated effectively. Always remember to choose strong passwords and update them regularly to safeguard your database.
Similar Reads
How to Reset Password for Azure Database Microsoft Azure's Azure Database provides cloud-based database solutions for all types of data management requirements. Users don't need to worry about infrastructure upkeep while creating, scaling, and managing databases thanks to alternatives like SQL databases and Azure Database for MySQL. This p
4 min read
How to change or reset Your Discord Password How to Change Discord Password - Quick StepsOpen the Discord app.Click the gear icon in the bottom left to open âUser Settings.âGo to âMy accountâ > Click âEditâ next to your username.Click âChange password" Enter your current and new passwords > Press âSave.âYour password has been changed.In
6 min read
How to secure database passwords in PHP? Most of the websites are providing sing up and login facility to the user. User has to create a password and use it for login to the website. But it is very important to secure the password of the user. password_hash() function provides the facility to securely store the password of the user to the
1 min read
How to Create User in Oracle Database ? In Oracle databases, creating and managing users is a critical task for database administrators to control access and maintain security. The CREATE USER command is used to add new users to the database, assigning them specific roles, privileges, and passwords. Additionally, users can be created and
3 min read
How to Change Your MacBook Password? Changing your MacBook password is an important step in maintaining the security of your device. Whether you're looking to update your MacBook password or need to reset your MacBook password for any reason, this article will walk you through the process. Understanding how to change your password on y
5 min read
How to Change Computer Password? There are only a few people who don't use passwords on their Computer. User password is the most basic security check that helps you restrict unauthorized access to your computer. It's a good practice to change your passwords in a short span that helps your password to be healthy. By the end of this
3 min read
How to Migrate an Oracle Database to MySQL Migrating databases between different platforms is a common task in the world of data management. Whether you're consolidating databases, switching to a different database management system (DBMS), or moving to a more cost-effective solution, migrating from Oracle to MySQL can be a complex but rewar
5 min read
How to Change Wi-Fi Password? Changing your Wi-Fi password is a basic however significant step to upgrade your home network's security. Whether you're doing it to anticipate unauthorized get to or fair reviving your qualifications, itâs a fast assignment you can effectively oversee. In this direct, weâll walk you through the pre
5 min read
How to Change Password in Outlook: Step by Step Guide Keeping your Outlook password up to date is essential for securing your email account and preventing unauthorized access. Whether you're using Outlook 365, the Outlook app on Windows 10, or mobile devices, updating your password is a quick and straightforward process.This guide will walk you through
7 min read
How to Change the Default Port in PostgreSQL PostgreSQL is one of the most powerful and widely used relational database management systems (RDBMS) in the world. By default, PostgreSQL listens for incoming connections on port 5432. In this article, we will describe the process of changing the default port for PostgreSQL in detailed and step-by-
6 min read