Where SQL*Plus stores your login information

SQL*Plus is Oracle's command-line tool, and your username and password are not stored in a single file the way some other databases work. Instead, they live in three possible places depending on how your system is set up: in Oracle's password file on the server, in your operating system's user account (if you are connecting as an OS-authenticated user), or in a wallet file if your database administrator configured encrypted credential storage.

The most common scenario is that you were given a username and password when your account was created, and you type them each time you connect. If you have forgotten them, recovery depends on whether you have administrative access to the Oracle server itself.

Key Takeaways

  • SQL*Plus usernames and passwords are not stored in a readable file on your computer — they are verified against Oracle's password file on the server.
  • If you remember your password, you can test it by opening SQL*Plus and entering your username at the prompt, then your password when asked.
  • If you have forgotten your password, only a database administrator with access to the server can reset it using the ALTER USER command.
  • Some systems use operating system authentication, which means your Windows or Linux login credentials work in SQL*Plus without a separate password.
  • Wallet files store encrypted credentials and are typically managed by your database administrator, not by individual users.

Testing a username and password you think you know

Open SQL*Plus on your computer. On Windows, search for "SQL*Plus" in the Start menu. On Mac or Linux, open a terminal and type sqlplus at the command prompt. You will see a login screen asking for username, password, and hostname.

Type your username and press Enter. Then type your password when prompted — the characters will not display as you type, which is normal. If the connection succeeds, you will see the SQL> prompt. If it fails, you will see "ORA-01017: invalid username/password; logon denied" or a similar error.

Write down the exact username you used if the login worked. This is the name you will need every time you connect. If you want to avoid typing the password each time, ask your database administrator whether your system supports wallet files or operating system authentication.

Recovering a forgotten password

You cannot reset your own SQL*Plus password without administrative access to the Oracle server. Contact your database administrator and ask them to reset your account. They will use a command like ALTER USER your_username IDENTIFIED BY new_password; and then provide you with a temporary password.

When you receive the temporary password, log in to SQL*Plus, then when ready change it to something only you know. Run the command ALTER USER your_username IDENTIFIED BY your_new_password; and press Enter. Do not share this new password with anyone except your database administrator if they ask for it for troubleshooting.

If you cannot reach your database administrator, check whether your organization has a self-service password reset portal. Some companies integrate Oracle accounts with their main directory service, which means you might be able to reset it through your company's IT portal or help desk.

Checking if you use operating system authentication

Some Oracle systems are configured so that your Windows or Linux login credentials work directly in SQL*Plus without a separate password. To test this, open SQL*Plus and at the username prompt, type / as sysdba (if you have administrative rights) or just press Enter without typing anything.

If you are logged in successfully without entering a password, your system uses operating system authentication. In that case, your "username" for SQL*Plus purposes is your Windows or Linux username, and your password is your operating system password. If this method fails, your system requires a separate SQL*Plus password.

Finding your username in existing SQL*Plus sessions

If you are already logged in to SQL*Plus but cannot remember your username, type SHOW USER; at the SQL> prompt and press Enter. The output will display your current username. Write this down for future reference.

You can also run SELECT USER FROM DUAL; to see the same information in a different format. Both commands work on any Oracle database version and do not require special permissions.

Using wallet files if your administrator set them up

A wallet is an encrypted file that stores your SQL*Plus credentials so you do not have to type your password each time. If your database administrator created a wallet for you, it is usually stored in a folder on your computer, often in a path like C:\Users\your_name\AppData\Roaming\Oracle\Wallets on Windows or ~/.oracle/wallets on Mac or Linux.

You cannot read the contents of a wallet file directly — it is encrypted. Instead, if you need to know what credentials are stored in it, ask your database administrator to check the wallet configuration file (usually named sqlnet.ora) or to create a new wallet with updated credentials. Do not try to edit wallet files yourself, as corruption will prevent SQL*Plus from connecting.

What to do if you see "ORA-12514" or "ORA-12170" errors

These errors mean SQL*Plus cannot reach the database server, not that your username or password is wrong. Check that you typed the correct hostname or IP address and that the database server is running. Ask your database administrator for the correct connection string if you are unsure.

Once you can connect to the server, you will then see the username and password prompt. If the server is unreachable, you will never get that far, so fix the connection problem first before troubleshooting credentials.

Frequently Asked Questions

Can I see my password if I have already logged in?

No. SQL*Plus does not store or display passwords, even if you are logged in. Once you authenticate, the password is discarded. If you need to change your password, use the ALTER USER command. If you need to know what password to use for a different computer, you will have to reset it through your database administrator.

What if my username has special characters or spaces?

Usernames with spaces or special characters must be enclosed in double quotes when you log in. For example, if your username is "John Doe", type it as "John Doe" at the SQL*Plus prompt. Ask your database administrator what your exact username is if you are unsure whether it contains special characters.

Is there a default username and password for Oracle?

Oracle comes with some built-in accounts like SYS and SYSTEM, but these are only for database administrators and require a password set during installation. There is no universal default password. Your database administrator will have created a separate account for you with its own credentials.

Can I log in to SQL*Plus without a password?

Only if your system uses operating system authentication, which your database administrator must configure. In that case, you log in with your Windows or Linux credentials. Standard SQL*Plus accounts always require a password, and there is no way to create a passwordless account.

What if I am locked out after too many wrong password attempts?

Oracle locks accounts after a certain number of failed login attempts for security. Only your database administrator can unlock your account using the ALTER USER command. Contact them and explain that you have been locked out, and they will reset your account and provide a temporary password.