2 Day DBA > Connecting to the Database > Connecting Locally with SQL...
Connecting Locally with SQL Command Line |
Previous |
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:
From the desktop
From a terminal session (Linux) or command window (Windows)
Starting SQL Command Line from the Desktop
To start SQL Command Line from the desktop and connect locally:
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.
At the SQL Command Line prompt, enter the following command:
CONNECTusername
/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:
If not already open, open a terminal session (Linux) or a command window (Windows).
(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".
Enter the following command at the operating system prompt:
SQLPLUS /NOLOG
At the SQL Command Line prompt, enter the following command:
CONNECTusername
/password
For example, to connect as user HR
with the password PEOPLE
, enter the following command:
CONNECT HR/PEOPLE