Connecting to Oracle AI Database from SQL*Plus
SQL*Plus is a client program from which you can access Oracle AI Database. This topic shows how to start SQL*Plus and connect to Oracle AI Database.
Note: For steps 3 and 4 of the following procedure, you need a user name and password.
To connect to Oracle AI Database from SQL*Plus:
-
If you are on a Windows system, open a Windows command prompt.
-
At the command prompt, type sqlplus and then press the key Enter.
-
At the user name prompt, type your user name and then press the key Enter.
-
At the password prompt, type your password and then press the key Enter.
Note: For security, your password is not visible on your screen.
The system connects you to an Oracle AI Database instance.
You are in the SQLPlus environment. At the
SQL>prompt, you can enter and run SQLPlus commands, SQL statements, PL/SQL statements, and operating system commands.To exit SQL*Plus, type exit and press the Enter key.
Note: Exiting SQLPlus ends the SQLPlus session, but does not shut down the database instance.
Example 2-1 starts SQLPlus, connects to Oracle AI Database, runs a SQL
SELECTstatement, and exits SQLPlus. User input is bold.
Example 2-1 Connecting to Oracle Database 12c from SQL*Plus
> sqlplus
SQL*Plus: Release 12.1.0.1.0 Production on Thu Dec 27 07:43:41 2012
Copyright (c) 1982, 2012, Oracle. All rights reserved.
Enter user-name: your_user_name
Enter password: your_password
Connected to:
Oracle Database 12c Enterprise Edition Release - 12.1.0.1.0 64bit Production
SQL> select count(*) from employees;
COUNT(*)
----------
107
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release - 12.1.0.1.0 64bit Production
>
See Also:
-
“About SQLPlus” for a brief description of SQLPlus
-
SQL*Plus User’s Guide and Reference for more information about starting SQL*Plus and connecting to the database