Connecting Locally with SQL Command Line

Previous
Previous
Next
Next

Connecting locally means running SQL Command Line (SQL*Plus) and Oracle Database XE on the same computer. There are two ways to start a local connection with SQL Command Line:

Starting SQL Command Line from the Desktop

To start SQL Command Line from the desktop and connect locally:

  1. 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.

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

    CONNECT username/password
    
    

    For example, to connect as user HR with the password PEOPLE, enter the following command:

    CONNECT HR/PEOPLE
    

Starting SQL Command Line from a Terminal Session or Command Window

To start SQL Command Line from a terminal session or command window and connect locally:

  1. If not already open, open a terminal session (Linux) or a command window (Windows).

  2. (Linux only) If the required environment variables are not already set for your session, set them as described in "Setting Environment Variables on the Linux Platform".

  3. Enter the following command at the operating system prompt:

    SQLPLUS /NOLOG
    
    
  4. At the SQL Command Line prompt, enter the following command:

    CONNECT username/password
    
    

    For example, to connect as user HR with the password PEOPLE, enter the following command:

    CONNECT HR/PEOPLE