Installing Oracle and Using SQL*Plus

Harry · 11 Sep 2026 · 10 views

Choosing an Edition to Learn

Oracle Express Edition (XE) is free and enough for learning SQL and PL/SQL. It runs on Windows and Linux and listens on port 1521 by default.

Installing Oracle XE

  1. Download Oracle Database XE from the Oracle website.
  2. Run the installer and accept the licence terms.
  3. Set a password for the SYSTEM and SYS users during setup.
  4. Finish the wizard; the database service starts automatically.

Connecting With SQL*Plus

sqlplus / as sysdba
sqlplus system/your_password
sqlplus system/your_password@//localhost:1521/XEPDB1

The pluggable database in Oracle XE is usually named XEPDB1. SQL*Plus is Oracle's text client and the foundation for everything in this tutorial.

Handy SQL*Plus Commands

SHOW USER;
SELECT banner FROM v$version;
DESC emp;
SET LINESIZE 150;
SET PAGESIZE 100;

Running a Script

@/tmp/seed.sql    -- runs the file in SQL*Plus

Key Points

  • Oracle XE is free for learning with a default port of 1521.
  • SYS and SYSTEM are the administrator accounts.
  • SQL*Plus is the classic command-line client.
  • Scripts run with the @ command.
Share this post:

Comments (0)

Please login or register to comment.