Logging In and Connecting to the Database as SYSDBA

Previous
Previous
Next
Next

You can log in and connect as SYSDBA only with SQL Command Line (SQL*Plus). You can do so either by supplying the SYS user name and password, or by using operating system (OS) authentication.


Note:

The following instructions establish a local connection to the database. Do not attempt to connect AS SYSDBA remotely. See "About Local and Remote Connections" for more information.

Connecting as SYSDBA with the SYS User Name and Password

To connect as SYSDBA supplying the SYS user name and password:

  1. Log in to the Oracle Database XE host computer with any user account.

  2. Do one of the following:

    • On Windows: Click Start, point to Programs (or All Programs), point to Oracle Database 10g Express Edition, and then select Run SQL Command Line.

    • On Linux with Gnome: In the Applications menu, point to Oracle Database 10g Express Edition, and then select Run SQL Command Line.

    • On Linux with KDE: Click the icon for the K Menu, point to Oracle Database 10g Express Edition, and then select Run SQL Command Line.

    A SQL Command Line command window opens.


    Note:

    You can also start SQL Command Line from a terminal session (Linux) or command window (Windows). See "Connecting Locally with SQL Command Line" for instructions.

  3. At the SQL Command Line prompt, enter the following command:

    CONNECT SYS/password AS SYSDBA
    
    

    where password is the password for the SYS user account. You set the SYS account password upon installation (Windows) or configuration (Linux).

Connecting as SYSDBA with OS Authentication

To connect as SYSDBA using OS authentication:

  1. Do one of the following:

    • On Windows: Log in to the Oracle Database XE host computer as a user who is a member of the ORA_DBA user group. This is typically the user that installed Oracle Database XE.

    • On Linux: Log in to the Oracle Database XE host computer as a user who is a member of the dba user group. This is typically the oracle user.

  2. Do one of the following:

    • On Windows: Click Start, point to Programs (or All Programs), point to Oracle Database 10g Express Edition, and then select Run SQL Command Line.

    • On Linux with Gnome: In the Applications menu, point to Oracle Database 10g Express Edition, and then select Run SQL Command Line.

    • On Linux with KDE: Click the icon for the K Menu, point to Oracle Database 10g Express Edition, and then select Run SQL Command Line.

    A SQL Command Line command window opens.


    Note:

    You can also start SQL Command Line from a terminal session (Linux) or command window (Windows). See "Connecting Locally with SQL Command Line" for instructions.

  3. At the SQL Command Line prompt, enter the following command:

    CONNECT / AS SYSDBA
    
    

    The slash (/) indicates that the database should authenticate you with operating system (OS) authentication. Remember that when you connect with OS authentication, you are effectively logging in to the database as user SYS.