Password Files   «Prev  Next»

Lesson 7 Connecting as INTERNAL with a password
Objective Connect to the COIN database using the internal password.

Connecting as an INTERNAL user using Password

In Oracle 11g R2, the "INTERNAL" user is a special account used for administrative purposes, primarily during database startup and recovery. However, starting from Oracle 12c, the "INTERNAL" user has been replaced by the "SYSDBA" and "SYSOPER" roles. But, you can still connect as an "INTERNAL"s user in Oracle 11g R2 by using a password file and specifying the appropriate credentials.
Example of "Connecting as an INTERNAL User Using Password" in Oracle 11g R2:
  1. Ensure you have a password file created:
    First, make sure a password file exists on your Oracle database server. If you don't have one, you can create it using the orapwd utility.
    orapwd file=$ORACLE_HOME/dbs/orapw<SID> password=<password> entries=5
        
    • <SID> with your database SID.
    • <password> with the desired password for the INTERNAL user.
  2. Configure the `REMOTE_LOGIN_PASSWORDFILE` parameter:

    Make sure that your Oracle database is configured to use the password file. This is set in the init.ora or SPFILE file.

    REMOTE_LOGIN_PASSWORDFILE = EXCLUSIVE
        
  3. Start the Oracle database (if not already started):

    If the database is not started, use SQL*Plus to start it in mount mode. You must have the necessary privileges.

    sqlplus / as sysdba
        

    Then, start the database:

    startup mount;
        
  4. Connect as the INTERNAL user:

    In Oracle 11g R2, you can use the following command to connect as the INTERNAL user using the password file:

    sqlplus internal/<password>@<hostname>:<port>/<SID>
        
    • <password> with the password set for the INTERNAL user.
    • <hostname> with the host where the Oracle database is running.
    • <port> with the port number (default is 1521).
    • <SID> with your database SID.
Important Notes:
  • In modern Oracle releases (starting from Oracle 12c), the "INTERNAL" user is replaced by the "SYSDBA" and "SYSOPER" roles. As a result, "INTERNAL" may no longer be directly used for connecting in later versions.
  • The "SYSDBA" role is typically used for administrative tasks such as database startup and shutdown. To connect as SYSDBA:

  sqlplus sys/@:/ as sysdba
  


Continuing from the previous lesson
Now that you have created a password file and set the REMOTE_LOGIN_PASSWORDFILE initialization parameter to EXCLUSIVE, you will need to use a password whenever you connect as the INTERNAL user. Let us say, for example, that you created the password file using the following command:
orapwd file=pwdcoin.ora password=herman entries=10

  • Different ways of entering the password:
    The password specified in the command, “herman” in this example, becomes the password for the internal user. When you try to connect internally, you can either supply the password as part of the CONNECT command, or you can allow Oracle to prompt you for it. The following series of images illustrate several possibilities:
Connecting as internal using Password
SQL> connect internal
Password:
Connected.
SQL>
1) In this example, we are connecting to the default database, and allowing Oracle to prompt us for the password.


SQL> connect internal@coin
Password:
Connected.
SQL>
2) In this example, we are connecting to a database across the network identified by the Oracle Network Service named coin, but still allowing Oracle to prompt us for the password.


SQL> connect internal/herman
Connected.
SQL>
3) In this example, we are connecting to the default database, and supplying the internal password as part of the CONNECT command.


SQL> connect internal/herman@coin
Connected.
SQL>
4) In this example, we put it all together, and supply both an Oracle Network service name and the internal password as part of the CONNECT command


As you saw in the series of images above, when you enter a password in response to a prompt, Oracle does not echo these characters to the screen. This prevents other people from seeing what you type. The real utility of password files is that it allows you to grant individual DBAs the ability to perform administrative functions, such as starting and shutting down a database, using his or her own user name. In the next two lessons, you will learn how to grant these administrative privileges to other database administrators.

REMOTE_LOGIN_PASSWORDFILE

Property Description
Parameter type String
SyntaxREMOTE_LOGIN_PASSWORDFILE={shared | exclusive | none}
Default valueexclusive
Modifiable No
Basic Yes
Real Application ClustersMultiple instances must have the same value.

REMOTE_LOGIN_PASSWORDFILE specifies whether Oracle checks for a password file.
Values:
  1. shared: One or more databases can use the password file. The password file can contain SYS as well as non-SYS users.
  2. exclusive: The password file can be used by only one database. The password file can contain SYS as well as non-SYS users.
  3. none: Oracle ignores any password file. Therefore, privileged users must be authenticated by the operating system.

SEMrush Software