Your browser does not support JavaScript. This help page requires JavaScript to render correctly. Connecting to Oracle Database from SQL*Plus
Skip Headers
Previous
Previous
 
Next
Next

Connecting to Oracle Database from SQL*Plus

SQL*Plus is a client program with which you can access Oracle Database. This section shows how to start SQL*Plus and connect to Oracle Database.

Note: For steps 3 and 4 of the following procedure, you need a user name and password.

To connect to Oracle Database from SQL*Plus:

  1. If you are on a Windows system, display a Windows command prompt.

  2. At the command prompt, type sqlplus and press the key Enter.

    SQL*Plus starts and prompts you for your user name.

  3. Type your user name and press the key Enter.

    SQL*Plus prompts you for your password.

  4. Type your password and press the key Enter.

    Note: For security, your password is not visible on your screen.

    The system connects you to an Oracle Database instance.

    You are in the SQL*Plus environment. At the SQL> prompt, you can enter and run SQL*Plus commands, SQL statements, PL/SQL statements, and operating system commands.

    To exit SQL*Plus, type exit and press the key Enter.

    Note: Exiting SQL*Plus ends the SQL*Plus session, but does not shut down the Oracle Database instance.

    The following example starts SQL*Plus, connects to Oracle Database, runs a SQL SELECT statement, and exits SQL*Plus. User input is bold.

Connecting to Oracle Database from SQL*Plus

> sqlplus
SQL*Plus: Release 11.2.0.0.1 - Beta on Mon Jun 9 15:31:26 2008
 
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
 
Enter user-name: your_user_name
Enter password: your_password
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.0.0 - Development
With the Partitioning, Data Mining and Real Application Testing options
 
SQL> select count(*) from employees;
 
  COUNT(*)
----------
       107
 
SQL> exit
 
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.0.0 - Development
With the Partitioning, Data Mining and Real Application Testing options
> 

Related Topics

Connecting to Oracle Database as User HR from SQL*Plus

About SQL*Plus

SQL*Plus User's Guide and Reference

Connecting to Oracle Database