Table of contents
1.
Introduction
2.
Steps for Installation
3.
Connecting to Oracle Database
4.
Add an entry to tnsnames.ora file
5.
Useful Links on PL/SQL
6.
FAQs
7.
Key Takeaways
Last Updated: Mar 27, 2024

PL/SQL Environment Setup

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

To install the Oracle database on our computer, we need to download the installer from the download page of the Oracle website.

After installing the files in ZIP format, we need to extract them into a specific folder on our system.

The given picture shows the structure of the folder of the Oracle installation files after extracting it from the zip.

Install Oracle Database

To start the installation process, we need to double-click the setup.exe file. There will be  9 steps that are mostly automatically executed.

Recommended topics, Coalesce in SQL and Tcl Commands in SQL

Steps for Installation

Step 1. The installer asks to provide the email address to get the latest security issues and updates. We will ignore it by clicking the Next button.

The Oracle database installer confirmed an email address because an email address was not provided. We need to click the No button to continue.

Step 2. In step 2, the Oracle installer provides us with three options. It asks whether we want to create and configure a database, install database software only, or upgrade an existing database. Because we are installing the Oracle database for the first time, we will choose option 1 and click on the Next button.

Install Oracle Database - Step 2

Step 3. The installer allows us to choose the system class. Because we are installing Oracle on our computer, not a server, we will select the first option: desktop-class and click on the Next button.

Install Oracle Database - Step 3

Step 4.  This step will specify the Windows user account to install and configure Oracle Home for enhanced security. We will choose the third option: "Use Windows Built-in Account."

Install Oracle Database - Step 4

Step 5. In this step, we can:

  1. Choose the folder on which the Oracle database will be installed.
  2. Global database name and password.
  3. Pluggable database name.
Install Oracle Database - Step 5

Step 6. The installer will perform a prerequisites check.

Install Oracle Database - Step 6

Step 7.  The installer shows the summary of the global settings, database information, etc. We need to review the information and click the install button if everything looks good.

Install Oracle Database - Step 7

Step 8. The installer will start installing the Oracle database. It will take a few minutes to complete, depending on the computer.

Install Oracle Database - Step 8

After that, we can see the Database Configuration Assistant window. Click on the Password Management button to enter the password.

We will also enter the password for hr, SYS and SYSTEM accounts and click on the OK button.

Step 9. The installer will inform you when the installation completes successfully, as shown in the following screenshot. Click on the Close button to close the window.

Install Oracle Database - Step 9

Connecting to Oracle Database

First, we will launch the Sql developer application provided by the Oracle Database.

Second, right-click the connections node and choose the New Connection menu to create a new connection.

Third, we will enter the information provided during the installation process, as shown in the following screenshot. After that, we will click on the Connect button to connect to the Oracle Database.

SQL Developer will display all objects as given below.

SQL Developer - Connected

The Oracle Database is installed successfully. Let's start exploring Oracle.

Add an entry to tnsnames.ora file

The tnsnames.ora file is situated in the following directory:

C:\app\<user>\product\12.1.0\dbhome_1\network\admin\

 

If installation steps are followed correctly, then the file is located in the following directory:

C:\app\product\12.1.0\dbhome_1\network\admin\

First, we open the tnsnames.ora file using any text editor such as Notepad. Then, we will add the following lines at the end of the file:

After that, we will save the file and close it. 

PDBORCL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = pdborcl)

    )

  )

 

It is time to download and load our sample database into the Oracle Database server.

Useful Links on PL/SQL

FAQs

  1. What is PL/SQL?
    PL/SQL stands for "Procedural Language extensions to the Structured Query Language ." SQL is a language used for both querying and updating data in the RDBMS. Many procedural constructs are added to SQL language to get rid of some limitations of SQL by PL/SQL. PL/SQL also provides a more comprehensive programming language solution for building mission-critical applications on Oracle Databases.
     
  2. What is Oracle, and why is it used?
    Oracle Database is the first database designed for enterprise grid computing. It is the most flexible and cost-effective way to manage information and applications. Enterprise grid computing creates large industry-standard, modular storage and servers pools.
     
  3. What is the difference between MySQL and PL/SQL?
    The MySQL software is a fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. Whereas Oracle PL/SQL is a combination of SQL and the procedural features of programming languages".

Key Takeaways

In this article, we learned about the step-by-step Oracle database installation in our computer to set up an environment for PL/SQL. We have also seen some resources of PL/SQL to get knowledge in depth.

Also Read - TCL Commands In SQL

Visit here to learn more about different topics related to database and management systems. Ninjas don't stop here. Check out the Top 100 SQL Problems to master frequently asked questions in big companies and land your dream job. Also, try  Coding Ninjas Studio to practice a wide range of DSA questions asked in many interviews.

Live masterclass