Someone on my twitter recently asked me a question about how to connect with Oracle database using SQL*Plus utility. If you are not aware that what is this SQL*Plus; Then let me have the pleasure of explaining it to you guys. Let’s see how quick I can do that.
This is an Oracle Property User-Friendly Interface which lets you connect with your Oracle database and comes free in a bundle. It looks more or less like native terminals of your operating system such as command prompt or Linux terminal.
That being said now let’s come to our question of how to connect to the database using this utility.
Connecting to your database using SQL*Plus does not require any Ninja Skills. As this utility comes free with Oracle Database software thus you don’t have to download it but if in case you messed up and you don’t have this utility then I am sure a quick Google search might come in handy.
Step 1: Locating your SQL*Plus
SQL*Plus is an executable file which is stored in your directory structure by the name of sqlplus.exe and you can locate this .exe executable file in %dbhome_1%\BIN directory.
Step 2: Launch SQL*Plus
You can launch this utility either directly from its base location (%dbhome_1%\BIN) or from the start menu directory. If you choose the latter option then click on your Start Menu and search for Oracle directory. In my case, the name of the directory is “Oracle-OraDb11g_home1”. Inside this directory locate the SQL*Plus utility and from here you can launch this tool.
Step 3: Connect to the Database using SQL*Plus.
In Oracle, you can connect to the database by using Users also known as Schemas. There are several types of users in the Oracle database. The most common among them are “High Privilege Users” given as default by the database, “Sample Users” come pre-installed for practice purposes or “User Define” Users these are the ones which are created either by you or by the DBA. The name of these schemas/users serves as your USERNAME and their password will be the one which you have assigned either during the installation or while unlocking them.
Let’s see some examples
Example 1: Log on to the database using high privilege user i.e. Sys user
Suppose you want to log on to your database using sys user then your username will be SYS as SYSDBA and password will be the one which you assigned at step 4 of the installation.
Suggested reading: How to connect to the database using sys user in SQL Developer
Example 2: Log on to the database using sample user i.e. HR
In case you want to log on to the database using either sample user or User-defined user then your username will be the name of the user and password will be the one which is either given by your DBA or set by you while unlocking the user.
Suggested reading: How to unlock users in oracle database.
List of suggested readings/Videos
- How to install Oracle database on Windows 10
- How to unlock user using Alter User statement
- How to unlock user using SQL Developer
- How to create a user/schema
- How to drop a user.
Hope this made the concept of “How to connect with SQL *Plus” clear to you. Kindly please share it with your friends on your social networking and help me reach out to more people. Thanks & have a great day!