You can't actually recover a forgotten SQLPlus password, because neither SQLPlus nor the Oracle database stores user passwords in a form anyone can read back. What you can do is reset the password using an account that holds the right privileges, then reconnect—typically with ALTER USER ... IDENTIFIED BY. The path differs depending on which password is lost: a normal schema account, the SYS/SYSTEM administrative accounts, or a stored credential in a script or tool. The database version matters too, since Oracle 12c and later added features that give administrators safer, more granular options than the old blunt reset.
This guide lays out the realistic recovery routes, the prerequisites for each, and the checks that confirm you're back in. It assumes you have legitimate authority over the database; there's no method here for bypassing authentication on a system you don't administer.
First, Pin Down Which Password Is Actually Missing
People say "SQL*Plus password" to mean several different things, and the right fix depends on the answer. Before touching anything, identify the case:
A schema or application user password you use to log in at the SQL*Plus prompt. This is the most common case and the easiest to fix. The SYS or SYSTEM password, needed for administrative work. Recovery requires operating-system access to the database server or a privileged connection method. A password embedded in a script, batch file, or connection string that no longer works because it was rotated or because the account was locked. A wallet or sqlplus /@alias credential where the secret lives in Oracle Wallet or an external authentication setup rather than in the database. A client-side saved login in a tool like SQL Developer, where the "password" may simply be cached and expiring.
Each has a different recovery principle. A schema password can be reset by any user with the ALTER USER privilege on that account. An administrative password effectively requires either a privileged session or server-level access. A wallet-stored credential requires re-creating the wallet entry. Confusing these is the main reason people waste time searching for a "recover" button that doesn't exist.
Why Passwords Can't Be Retrieved, Only Reset
In a standard Oracle setup, the database stores a one-way hash of the password, not the password itself. When you log in, Oracle hashes what you type and compares the result to the stored value. Because the process is one-way, there's no supported way to reverse the hash back into your original password. This is a security feature, not an obstacle to work around.
There are older, deprecated mechanisms worth knowing about so you don't chase them. Very old Oracle versions supported a VALUES clause on ALTER USER ... IDENTIFIED BY VALUES that let an administrator set the password hash directly, and tools that displayed the hash existed for those versions. Those mechanisms are legacy, insecure, and not available in supported modern releases. If you find instructions online telling you to "decrypt" the hash, treat them with suspicion—at best they apply to end-of-life versions, and at worst they're attempts to get you to run something harmful.
The practical takeaway: plan on resetting, not recovering.
The Everyday Case: Resetting a Schema Password
This is the routine path, and it needs a second account that already has the authority to change passwords. Typically that's SYSTEM, SYS, or a DBA account, or any user granted ALTER USER on the target account.
Prerequisites: a working privileged login, the exact username whose password is lost, and awareness of any password profile rules (length, complexity, reuse) that the new password must satisfy.
Steps:
1: Connect with the privileged account, for example sqlplus system@yourdb or sqlplus / as sysdba on the server. At the prompt, enter the privileged password if asked. 2: Confirm the account exists and note its status by querying SELECT username, account_status FROM dba_users WHERE username = 'TARGET_USER';. If the status is LOCKED or EXPIRED, you'll want to unlock it as part of the fix. 3: Set the new password with ALTER USER target_user IDENTIFIED BY "NewSecurePassword";. Use double quotes if the password contains special characters or case that matters, and respect any profile complexity rules. 4: If the account was locked, run ALTER USER target_user ACCOUNT UNLOCK;. If it was expired, resetting the password generally clears the expired state, but check the status again. 5: Reconnect as the target user to confirm the new password works: sqlplus target_user@yourdb.
Success check: the ALTER USER statement returns "User altered," and a fresh sqlplus login as that user succeeds. If the login still fails, re-query dba_users for the account status and check whether a profile password-verify function is rejecting the new value.
A subtle failure mode: if the account is governed by a password verification function that enforces complexity, a password that looks fine to you can be rejected. The error message usually names the rule, so read it rather than retrying blindly.
Locked and Expired Accounts: A Different Symptom
Sometimes the password is fine but the account won't let you in. The error code tells you which problem you have, and distinguishing them saves time.
ORA-28000: the account is locked means too many failed logins or an administrative lock. The password is likely correct; the account just needs unlocking. A privileged user runs ALTER USER target_user ACCOUNT UNLOCK;. ORA-28001: the password has expired means the profile's password lifetime elapsed. The user must change it, or an administrator resets it. ORA-28002: the password will expire within N days is a warning, not a block—log in and change it now. ORA-01017: invalid username/password is the genuine wrong-password case that calls for a reset.
The distinction matters because resetting a password when the account is merely locked is unnecessary churn that may violate password-reuse rules, locking you out of the old value for future rotations. Check the error code first, then act.
When It's the SYS or SYSTEM Password You've Lost
Administrative passwords are the hardest case, and the honest answer is that recovery depends on what other access you have. There's no universal reset that works without some privileged foothold.
If you have operating-system access to the database server, a local privileged connection can bypass the network password entirely. On many Unix-like systems, a user in the dba group can connect as sqlplus / as sysdba using OS authentication and then reset the SYS password with ALTER USER sys IDENTIFIED BY "NewPassword";. On Windows, membership in the ORA_DBA group typically enables the same OS-authenticated connection. This is why the most reliable "recovery" for admin accounts is server access combined with the right OS group membership.
If you have a working password file or another DBA account, that account can reset SYS—but SYS is special, and some operations require it specifically. A regular DBA can often change SYSTEM's password directly.
If you have neither server access nor a working privileged account, you've reached the stop condition where further attempts risk damaging the installation or violating policy. Recovering administrative access in that situation is a job for your organization's database administrator or Oracle Support, and often involves a documented procedure your organization maintains precisely for this scenario. Stop and escalate rather than improvising.
A safety note: sqlplus / as sysdba with OS authentication is powerful and can be misconfigured to let more people in than intended. If you're the administrator, verify the OS group membership is as tight as your security policy requires—this is the same mechanism that makes admin recovery possible, which is exactly why it deserves scrutiny.
Saved Logins in Scripts, Tools, and Wallets
Many "lost password" cases are really lost credentials in a client tool or configuration file.
Scripts and batch files: search your scripts for connection strings. If a password is hardcoded, it's visible in the file—retrieve it there, then fix the real problem by rotating it and storing it more safely. A hardcoded password in a script is a security finding, not just an inconvenience.
SQL Developer and similar GUI tools: these often save connections with passwords. Look in the connection properties; some tools let you re-enter or reset a stored password without touching the database password. If the tool's saved password is stale because the database password changed, update the tool's stored value.
Oracle Wallet and external authentication: if you connect with sqlplus /@alias and a wallet provides the credentials, the password lives in the wallet, not the database. Recovering it means re-creating the wallet entry with the current password. Oracle's orapki and wallet-management utilities handle this, and the exact commands vary by version—check the documentation for your release rather than guessing.
Environment variables and .env files: a surprisingly common cause is a stale ORACLE_PWD or similar variable. Search your environment and startup files for the current expectation.
Version and Platform Differences That Change the Path
Oracle's behavior around passwords and authentication has shifted across releases, and a fix that works on one version may not apply on another.
12c and later introduced stronger password hashing and, in some editions, features that let administrators configure authentication more granularly, including options around whether SYS can be reset via OS authentication and how password verification behaves. The direction of travel is toward more secure defaults and fewer blunt bypasses, which means older "just reset it" advice may not match a modern release.
Pluggable databases (multitenant architecture) add a layer: a user exists within a specific pluggable database (PDB), and resetting a password in the container root won't fix a user in a PDB. Connect to the correct container before running ALTER USER.
Windows vs. Unix-like servers differ in how OS authentication is enabled—group membership and service account configuration rather than /etc/group and shell access. The principle is the same, but the check differs.
Client version matters less for password reset but affects which login mechanisms (like external authentication or wallet) are available. If you're unsure of your release, SELECT * FROM v$version; from any working connection tells you.
Because version-specific commands and defaults change, treat any exact syntax you find as something to verify against the documentation for your specific release rather than assuming it's current.
Preventing the Next Lockout
The most useful recovery advice is avoiding the situation. A few practices cut down on lost-password incidents dramatically:
Store credentials in a password manager, not in scripts or sticky notes. Shared team credentials belong in a managed vault with access controls. Use a controlled rotation process so password changes propagate to every script, tool, and service that uses the account. Most "lost" passwords are stale copies, not forgotten secrets. Keep a documented, tested administrative recovery procedure, including who is authorized to use it and how it's logged. The time to discover that your OS authentication is misconfigured is not during an outage. Watch expiry warnings in the ORA-28002 message and change passwords before they lapse. Monitor failed-login counts so an account gets locked by an attacker or a misconfigured script, not by you on a Friday afternoon.
A Quick Troubleshooting Order
When a SQL*Plus login fails, work from reversible checks upward:
1: Read the exact error code. It tells you whether this is a wrong password, a lock, or an expiry. 2: Confirm the connection target. Wrong service name, wrong PDB, or wrong host will produce failures that look like password problems. Test the host and service with a known-good connection if you have one. 3: Check the account status via a privileged query if you have access. 4: Unlock or reset as the error dictates, using the least invasive action. 5: Re-test with a fresh connection rather than a cached one, since some tools reuse sessions and hide the real state. 6: If you lack any privileged access and the account is administrative, stop and escalate to your DBA or Oracle Support rather than attempting workarounds on a production system.
That's the whole picture: there's no retrieval of a stored password, but with the right privileges there's almost always a clean reset—and the trick is matching the fix to the actual missing credential and your Oracle version.