Connect to Oracle Database from SQL*Plus
Oracle Database from SQL*Plus
In this tutorial, we will learn how to connect to an Oracle database using the SQL*Plus tool. Oracle SQL*Plus is a database client tool that allows us to access and interact with the database.
Environment
- Oracle Database
- Windows Operating System
Ensure that you have Oracle Database and SQL*Plus installed on your machine. You can download them from the Oracle website if you don’t have them installed already.
Steps to install the Oracle database can be found here:
Setup ORACLE_HOME variable
Ensure that the Oracle environment variables are set correctly. You need to set ORACLE_HOME and PATH variables to include the Oracle binaries.
Launch SQL*Plus
Open a command prompt on Windows and launch SQL*Plus by typing
the following command, and hit the Enter key:
C:\> sqlplus
or
C:\>sqlplus /nolog
The SQL> prompt will be displayed.
CONNECT command
Connect to the Database. You can connect to the Oracle database using the following command:
SQL> CONNECT username/password;
For example, to connect to scott database schema.
SQL> CONNECT scott/tiger;
or
SQL> CONNECT scott/tiger@orclpdb;
Connected.
SQL>
—
Database Tutorials on this website:
More information about Oracle Database: