Installing Oracle Database on Windows

Introduction

Installing Oracle Database means setting up a database server that can store data, execute Oracle SQL and PL/SQL, enforce constraints, manage transactions, and accept authenticated client connections. For a modern Windows learning environment, the practical local combination is Oracle AI Database 26ai Free for the server and Oracle SQL Developer or SQL*Plus for client access.

The database and client tools are separate. Oracle Database owns the instance, data files, container database, pluggable database, listener registration, users, and schemas. SQL Developer is a graphical client, while SQL*Plus is a command-line client. Installing SQL Developer alone does not create a local Oracle database, and closing it does not stop the Oracle services.

This tutorial follows Oracle's current 26ai Free Windows installation guidance. Oracle product names, client releases, operating-system support, and download packages can change, so verify the current documentation before installing. The stable workflow is to prepare Windows, remove conflicting older Free or XE installations, install the server, understand FREE and FREEPDB1, verify services and the listener, install a client, create a non-administrative practice schema, and run an end-to-end SQL test.

What You Need to Install

A complete beginner environment has one required server and at least one client. Oracle AI Database Free provides the database engine, multitenant database, listener, administrative tools, and SQL*Plus. Oracle SQL Developer provides a graphical worksheet and object browser. The two products have separate downloads and lifecycles.

ComponentPurposeBeginner recommendation
Oracle AI Database 26ai FreeRuns the database instance and stores dataRequired
Oracle Net ListenerAccepts network connection requestsConfigured with the database
SQL*PlusExecutes Oracle SQL and scripts from a terminalIncluded and useful
Oracle SQL DeveloperProvides a graphical SQL and PL/SQL environmentRecommended

Why Oracle AI Database 26ai Free

Oracle AI Database 26ai Free is the current free Oracle Database release for local learning and development. It supports Oracle SQL, PL/SQL, multitenant architecture, common data types, transactions, indexes, views, procedures, packages, triggers, and many advanced database features within its documented limits.

The Free edition limits itself to two CPU cores for foreground processing, 2 GB of database RAM, and 12 GB of user data. It also permits only one Free installation per logical environment. These limits are normally sufficient for tutorials and personal practice but must be considered before using larger datasets.

Database Free does not receive patches or Oracle Support service requests. Oracle does not technically restrict it to non-production environments, but recommends fully supported editions or cloud services for production. A free learning installation should therefore not be presented as a security-maintained production deployment.

Understand Oracle Version Naming

Older tutorials may refer to Oracle Database 11g XE, 18c XE, 21c XE, or Oracle Database 23ai Free. The current product name is Oracle AI Database 26ai Free. Old tutorials can still teach SQL concepts, but their installers, service names, prerequisites, connection services, and screens may not match the current Windows package.

Record the exact release, installation directory, Oracle Home, listener port, SID, database services, and SQL Developer version. This record is especially important on systems that previously hosted Oracle clients or databases.

Windows Requirements

The current Windows package is 64-bit and supports selected 64-bit Windows 10, Windows 11, and Windows Server editions. Windows Home editions are not included in Oracle's supported list. Oracle documents a minimum of 2 GB RAM, at least 8.5 GB for Oracle software, and 2 GB or more of temporary storage.

The installer account must be a direct member of the local Administrators group. Merely choosing Run as administrator is not sufficient when direct membership is missing. Domain users should remain connected to the network or VPN that can verify their group membership.

  • Use a supported 64-bit Windows edition.
  • Apply pending Windows updates and restart first.
  • Confirm at least 2 GB RAM and adequate software, data, and temporary storage.
  • Verify the installation account is a direct Administrators-group member.
  • Check for an existing Oracle Free or XE service.
  • Prepare secure storage for the administrative password.

Remove Conflicting Older Free or XE Installations

Oracle requires an existing Oracle Database XE or Oracle Database Free installation using SID XE or FREE to be uninstalled before 26ai Free installation on the target system. Do not remove an old database until its important data has been exported and the export has been tested.

Use supported migration and uninstall procedures rather than deleting services or directories manually. Oracle Data Pump export and import can move supported schema data from an older environment. Keep installation media, passwords, export logs, and object-count checks until the new environment is verified.

Clear Conflicting Environment Variables

Before setup, Oracle instructs Windows users to remove system-level ORACLE_HOME and TNS_ADMIN environment variables if they are set. Values left by an older Oracle client or database can direct tools toward the wrong binaries or network configuration.

Removing a variable only from one command prompt is not enough for the installer prerequisite check. Inspect Windows System Properties and Environment Variables. Record existing values before changing them in case another application depends on a separate Oracle client configuration.

Download Oracle Database Free Safely

Use Oracle's official Oracle AI Database Free download path and select the Windows x64 package. Read the license and package notes before downloading. Avoid unofficial mirrors and repackaged installers.

The Windows distribution is a ZIP archive. Verify the downloaded file when Oracle publishes checksums, then extract it into a temporary directory such as C:\OracleInstall\. Do not attempt to run setup.exe directly from inside the compressed archive.

Start the Installer

Open the extracted directory and run setup.exe while logged in with the qualified administrator account. The wizard displays the welcome and license pages, executes prerequisite checks, requests an installation location and administrative password, copies software, creates the database, configures services, and starts the environment.

Official Windows x64 ZIP
    -> extract to a temporary directory
    -> run setup.exe
    -> accept license if appropriate
    -> pass prerequisite checks
    -> select installation location
    -> set administrative password
    -> install and configure FREE

Choose the Installation Location Carefully

Oracle recommends accepting the default location or entering a path whose directories do not yet exist so the installer can create them with correct permissions. The default base resembles C:\app\username\product\26ai. Do not choose a path containing spaces for this Free installation.

Oracle 26ai Free requires the installation path and its parent directories, other than the drive root, not to be modifiable by the Authenticated Users group. If an existing directory violates the rule, the wizard can offer to change permissions. Allow that only after verifying the change will not affect another application. Using the default or a new dedicated path is safer.

Oracle Base, Oracle Home, and Data Locations

Oracle Base is the root of the installation tree. Oracle Home contains database executables and network files. The oradata\Free path contains database files, while diagnostic and configuration logs live in other versioned directories below Oracle Base.

Oracle Base:  C:\app\username\product\26ai
Oracle Home:  Oracle Base\dbhomeFree
Database:     Oracle Base\oradata\Free
Alert log:    Oracle Base\diag\rdbms\free\free\trace\alert_free.log

Actual paths depend on the selected installation directory. Never edit database files directly. Use SQL, Data Pump, Recovery Manager where applicable, and documented backup or migration procedures.

Set the Administrative Password

The wizard asks for one password used to initialize important administrative accounts including SYS, SYSTEM, and PDBADMIN. Choose a strong, unique password and store it in a password manager. Do not place it in source code, screenshots, scripts, or shared documents.

SYS owns fundamental data-dictionary objects and is the most powerful administrative account. SYSTEM is also highly privileged and supports general administration. PDBADMIN administers the default pluggable database. These identities are for controlled administration, not daily application or tutorial objects.

SID FREE Is Fixed

The Oracle AI Database Free installer creates the instance with system identifier, or SID, FREE. The current Free installer does not let you choose another SID. A SID identifies the local Oracle instance and appears in service names, process configuration, and administration.

The SID is related to but different from a service name used by clients. Memorizing this distinction prevents many connection errors.

Container and Pluggable Databases

Modern Oracle Database uses multitenant architecture. The Free installation creates a container database, or CDB, named FREE and a default pluggable database, or PDB, named FREEPDB1.

Oracle instance: FREE
    -> root container: CDB$ROOT
    -> seed: PDB$SEED
    -> pluggable database: FREEPDB1
        -> practice users and schemas
        -> tables, views, and procedures

Normal SQL practice objects should be created inside FREEPDB1, not in the root container. The root holds common metadata and administration for the CDB.

SID and Service Name Are Different

The SID identifies an Oracle instance on the host. A service name is the logical destination a client requests through Oracle Net. Oracle Database Free creates default services FREE and FREEPDB1. The FREE service connects to the root container, while FREEPDB1 connects to the pluggable database intended for normal practice.

ValueMeaningNormal use
FREESID, CDB, and root-container serviceInstance and CDB administration
FREEPDB1Default PDB and PDB serviceApplication and SQL practice
1521Default Oracle listener TCP portLocal Oracle Net connections

Understand the Oracle Net Listener

The Oracle Net Listener is a separate process that accepts connection requests and directs them to registered database services. It is not the database itself. A listener can be running while the database service is unavailable, and the database can be running while a remote client cannot reach the listener.

SQL Developer or SQL*Plus
    -> localhost:1521
    -> Oracle Net Listener
    -> requested service FREEPDB1
    -> Oracle instance and pluggable database

The default listener port is 1521. Keep the local learning listener private unless remote access is explicitly required and securely designed.

Complete Installation and Review Logs

The installer copies the software, creates the CDB and PDB, configures the listener, creates Windows services, and starts the database. Review the final status rather than relying only on the wizard closing successfully.

Installation logs are under Oracle Inventory and cfgtoollogs paths. Database-creation details are recorded in the DBCA log, and the alert log records database startup and runtime events. Preserve the first meaningful error when troubleshooting because later messages may be consequences.

Check Oracle Windows Services

Press Win + R, enter services.msc, and inspect Oracle-related services. Names vary with Oracle Home, but you should see a service associated with the FREE database and another associated with the TNS listener. Both should normally be running before a client connects through Oracle Net.

Restarting a service interrupts sessions, so only do it on a learning instance you control. If a service starts and immediately stops, inspect the alert log, listener log, Windows Event Viewer, and installation logs before reinstalling.

Verify the Listener

Open a terminal using the installed Oracle environment and run:

lsnrctl status

The output shows the listener address, port, configuration file, log location, and registered services. Confirm that port 1521 or the configured alternative appears and that FREEPDB1 is registered. If the instance is shut down, the listener can run without displaying usable database services.

Connect with SQL*Plus

SQL*Plus is Oracle's classic command-line client. Use Easy Connect syntax and allow SQL*Plus to prompt for the password:

sqlplus system@localhost:1521/FREEPDB1

Avoid putting the password on the command line because it can appear in history or process information. After login, verify the target and session:

SELECT USER FROM dual;

SELECT SYS_CONTEXT('USERENV', 'CON_NAME') AS container_name
FROM dual;

SELECT banner FROM v$version;

What Is DUAL?

DUAL is a special one-row table traditionally used to select expressions, functions, and values that do not come from an application table. You will encounter it throughout Oracle documentation and existing code.

SELECT 10 + 20 AS result FROM dual;
SELECT SYSDATE AS database_time FROM dual;
SELECT USER AS current_user FROM dual;

Modern Oracle versions can support selected expression queries without FROM dual, but understanding DUAL remains essential for reading Oracle SQL.

Install Oracle SQL Developer

Download SQL Developer from the official Oracle SQL Developer page. As of October 2026, Oracle lists SQL Developer 26.2. The Windows x64 archive includes JDK 17, which removes the need to locate a separate Java installation for that package.

SQL Developer is delivered as an archive rather than a traditional Database installer. Extract it to a stable directory and run sqldeveloper.exe from its folder. Do not run it permanently from inside the ZIP or from a temporary download directory that may be deleted.

Create a SQL Developer Connection

Open SQL Developer and create a Basic connection with a descriptive name such as Oracle Local FREEPDB1. For initial verification, use SYSTEM, host localhost, port 1521, and service name FREEPDB1. Enter the password securely and select Test.

Connection name: Oracle Local FREEPDB1
Username: SYSTEM
Hostname: localhost
Port: 1521
Connection type: Basic
Service name: FREEPDB1

A Success result confirms that the client reached the listener, requested the correct service, and authenticated. It does not mean SYSTEM should become the daily practice account.

Create a Least-Privilege Practice User

Connect to FREEPDB1 as an administrator and create a dedicated user. In Oracle, a user owns a schema with the same name, so creating sql_student establishes the SQL_STUDENT schema namespace.

CREATE USER sql_student
IDENTIFIED BY "replace-with-a-strong-password";

GRANT CREATE SESSION, CREATE TABLE,
      CREATE VIEW, CREATE SEQUENCE,
      CREATE PROCEDURE
TO sql_student;

ALTER USER sql_student
QUOTA 500M ON USERS;

Grant only privileges needed by the course. A finite tablespace quota is a better habit than unlimited quota, even though unlimited quota may seem convenient on a disposable local environment.

Connect as the Practice User

Create another SQL Developer connection for sql_student using the same host, port, and FREEPDB1 service. Test and connect. Then verify both user and container:

SELECT USER AS current_user FROM dual;

SELECT SYS_CONTEXT('USERENV', 'CON_NAME') AS container_name
FROM dual;

The expected values are SQL_STUDENT and FREEPDB1. This prevents practice objects from being created under an administrative account or in the root container.

Create a Table and Verify Data

Create a constrained table, insert one row, commit the transaction, and query it:

CREATE TABLE students (
    student_id NUMBER
        GENERATED BY DEFAULT AS IDENTITY
        PRIMARY KEY,
    student_name VARCHAR2(100) NOT NULL,
    email VARCHAR2(150) UNIQUE
);

INSERT INTO students (student_name, email)
VALUES ('John', 'john@test.com');

COMMIT;

SELECT student_id, student_name, email
FROM students;

If the row appears, the instance, listener, PDB, authentication, schema privileges, tablespace quota, transaction, and query path are functioning.

Why COMMIT Matters

Oracle transactions normally remain uncommitted until the session issues COMMIT, executes certain DDL with implicit commit behavior, or the client performs configured commit behavior. COMMIT makes the transaction durable and visible according to Oracle's concurrency rules. ROLLBACK abandons uncommitted changes.

Do not depend on a graphical client's auto-commit setting without knowing its value. Explicit transaction control makes tutorial behavior easier to understand and connects installation verification to ACID properties.

Oracle Identifier and Data Type Behavior

Oracle stores ordinary unquoted identifiers in uppercase, so students, Students, and STUDENTS normally refer to the same unquoted object. Quoted identifiers preserve case and create avoidable complexity for beginner schemas.

Common Oracle types include NUMBER, VARCHAR2, CHAR, DATE, TIMESTAMP, CLOB, and BLOB. Oracle DATE includes date and time to seconds. Learn Oracle semantics rather than assuming identically named types behave exactly like those in another DBMS.

Sequences and Identity Columns

Modern Oracle supports identity columns, as used in the students table. Sequences remain important in existing applications and for independent number generation.

CREATE SEQUENCE order_seq
START WITH 1
INCREMENT BY 1;

SELECT order_seq.NEXTVAL
FROM dual;

Sequence values are designed for concurrency and can contain gaps after rollback, caching, or failed work. They provide unique number generation, not gapless accounting numbers.

Oracle Instance and Database Files

Oracle distinguishes the instance from the database. The instance consists of memory structures and background processes. The database consists of physical files such as data files, control files, and online redo logs. The instance opens and manages the database.

Oracle instance
    -> memory and background processes
    -> opens and manages
Oracle database
    -> data files, control files, redo logs

This distinction becomes important when learning startup states, recovery, backup, and high availability.

Troubleshoot Listener Errors

Listener errors or refused connections can mean the listener service is stopped, the host or port is wrong, the service is not registered, or security software blocks the connection. Start with lsnrctl status and Windows Services.

  • Confirm the Oracle database service is Running.
  • Confirm the listener service is Running.
  • Use hostname localhost for the local installation.
  • Verify the listener's actual port, normally 1521.
  • Confirm FREEPDB1 appears in the listener service summary.
  • Review the listener log and database alert log.

Troubleshoot the Wrong Service Name

Old Oracle XE tutorials often use service XE. The current Free environment creates FREE and FREEPDB1. For normal schema practice, request FREEPDB1.

Correct practice destination:
localhost:1521/FREEPDB1

Root-container administration destination:
localhost:1521/FREE

Do not switch SQL Developer to SID mode and enter values randomly. Use a Basic connection with the documented service name unless a specific configuration requires another connection type.

Troubleshoot Invalid Credentials

An invalid username or password error means the listener and database service were reached but authentication failed. Verify the account name, case-sensitive password, requested service, account status, and whether the account exists in that container.

A local user created in FREEPDB1 is not a root-container common user. Connecting to FREE with that local account fails even when the password is correct. This is another reason to verify the service and current container together.

Troubleshoot a Closed PDB

The listener and CDB can be available while the target PDB is closed. An administrator can inspect pluggable databases from SQL*Plus:

SHOW PDBS;

SELECT name, open_mode
FROM v$pdbs;

If FREEPDB1 is not open, follow documented PDB administration procedures and investigate why. Avoid issuing powerful startup commands from an unverified session or against a shared environment.

Troubleshoot Tablespace Quota Errors

A user can have CREATE TABLE privilege but still receive an error because no quota is available on the target tablespace. Check the user's default tablespace and quota. Grant a deliberate quota on USERS for the learning account rather than unrestricted system privileges.

Privileges answer whether the user may issue an operation; quota limits how much storage the user may allocate in a tablespace. Both can be required for successful table creation.

Keep the Listener Local Unless Needed

A learning database normally needs only local connections. Do not expose port 1521 publicly. Remote access requires deliberate listener configuration, Windows Firewall scope, network segmentation, encryption, supported authentication, patch strategy, monitoring, and least-privilege accounts.

The Free edition's lack of patches is especially important when considering network exposure. Use a supported Oracle edition or managed service for production requirements that need security updates and vendor support.

Back Up Practice Work

As exercises become valuable, keep repeatable DDL scripts and non-sensitive sample data in version control. Use Oracle Data Pump for logical exports and imports when appropriate. Do not copy active database files as though they were ordinary documents.

A backup is useful only when it can be restored. Practice importing into a disposable schema, verify row counts and constraints, and protect export files because they can contain credentials or personal data from the source application.

Uninstall or Upgrade Safely

Before removing Database Free, identify Oracle Base, Oracle Home, services, PDBs, schemas, environment variables, SQL Developer connections, and every export that matters. Use Oracle's documented uninstall procedure and preserve migration data before deleting directories.

Moving between Free releases can require export, uninstall, new installation, and import rather than an in-place overwrite. Read the target release's migration guidance. Do not point a new Oracle Home at an old data directory and expect it to upgrade itself.

Verify After a Windows Restart

Restart Windows after installation and confirm the database and listener services start automatically. Connect as sql_student, verify the service and container, and query the committed row.

SELECT USER FROM dual;

SELECT SYS_CONTEXT('USERENV', 'CON_NAME')
FROM dual;

SELECT student_id, student_name, email
FROM students;

Expected results include user SQL_STUDENT, container FREEPDB1, and the previously inserted data. This checks persistent storage and service startup, not just initial setup.

Build a Reusable Practice Schema

A realistic schema supports more learning than isolated tables. Customers, orders, order items, and products support constraints, joins, indexes, transactions, and aggregation. Departments and employees support one-to-many and hierarchical relationships. Students, courses, and enrollments support many-to-many design.

CUSTOMER -> ORDERS -> ORDER_ITEM -> PRODUCT

DEPARTMENT -> EMPLOYEE

STUDENT -> ENROLLMENT -> COURSE

Create objects as SQL_STUDENT through repeatable scripts. Resetting one practice schema should never require reinstalling Oracle Database.

Oracle SQL and PL/SQL

Oracle SQL handles declarative data definition, querying, modification, permissions, and transaction control. PL/SQL is Oracle's procedural extension with variables, conditions, loops, exceptions, procedures, functions, packages, and triggers.

Learn tables, keys, SELECT, filtering, joins, grouping, subqueries, views, indexes, and transactions first. Then add PL/SQL using the same practice schema. Installation creates the platform for both, but they remain distinct areas of the learning path.

Compare Common Local Database Setups

ConceptOracleMySQLPostgreSQLSQL Server
Common GUISQL DeveloperWorkbenchpgAdminSSMS
CLISQL*Plusmysqlpsqlsqlcmd
Common local port1521330654321433 when configured
Administrative identitySYS or SYSTEMrootpostgresWindows administrator or sa
DialectOracle SQL and PL/SQLMySQL SQLPostgreSQL SQL and PL/pgSQLT-SQL

Common Installation Mistakes

Common mistakes include installing only SQL Developer, using a Windows Home edition, lacking direct Administrators-group membership, leaving old ORACLE_HOME or TNS_ADMIN variables, and failing to remove a conflicting XE or Free service.

Connection mistakes include entering XE from an old tutorial, confusing FREE with FREEPDB1, using SYS or SYSTEM for practice, creating a user in the wrong container, omitting tablespace quota, assuming a running listener proves the PDB is open, and exposing port 1521 without a security design.

A Systematic Troubleshooting Flow

Work through the architecture in order. First verify the database service, then the listener, endpoint, registered service, credentials, container, privileges, and tablespace quota. Preserve exact ORA and TNS error codes because each narrows the problem.

Is the Oracle FREE database service running?
    No  -> inspect alert and installation logs
    Yes -> Is the listener running on the expected port?
              No  -> inspect listener service and log
              Yes -> Is FREEPDB1 registered and open?
                        No  -> inspect instance and PDB state
                        Yes -> Do credentials work in FREEPDB1?
                                  No  -> inspect account and password
                                  Yes -> check privileges and quota

Installation Verification Checklist

  • The ZIP came from Oracle's official Database Free download path.
  • Windows edition, architecture, RAM, disk, and temporary space meet requirements.
  • The installer account is a direct local Administrators-group member.
  • Conflicting XE or Free installations were migrated and removed safely.
  • System-level ORACLE_HOME and TNS_ADMIN conflicts were addressed.
  • The installation path meets Oracle's permission and naming requirements.
  • The administrative password is strong and stored securely.
  • The FREE database and listener services run after a restart.
  • lsnrctl shows FREE and FREEPDB1 on the expected listener.
  • SQL Developer and SQL*Plus connect to FREEPDB1.
  • A non-administrative practice user has explicit privileges and quota.
  • A table can be created, inserted, committed, reconnected, and queried.
  • Practice scripts and exports can rebuild valuable work.

Interview Questions and Answers

What is the difference between Oracle Database and SQL Developer? Oracle Database is the server and storage engine. SQL Developer is a separate graphical client.

What are FREE and FREEPDB1? FREE is the fixed SID and container database name; FREEPDB1 is the default pluggable database and service for normal practice.

What is the Oracle listener? It is the network process that accepts connection requests and directs them to registered database services.

What is the common Oracle listener port? Oracle Database Free uses port 1521 by default.

What is the difference between an instance and a database? The instance is memory plus background processes; the database is the physical files managed by the instance.

Why should practice not use SYS? SYS owns critical dictionary objects and has exceptional administrative power. A dedicated schema teaches proper privileges and limits mistakes.

Why can CREATE TABLE fail after granting CREATE TABLE? The user may still lack quota on the target tablespace.

Key Takeaway

A dependable Oracle learning environment starts with the official Oracle AI Database 26ai Free Windows x64 package on a supported Windows edition. Remove conflicting XE or Free installations safely, clear conflicting Oracle environment variables, use a qualified administrator account, accept a secure installation location, and protect the administrative password.

Official Oracle Database Free ZIP
    -> extract and run setup.exe
    -> install SID/CDB FREE
    -> verify PDB/service FREEPDB1
    -> verify listener on localhost:1521
    -> install SQL Developer
    -> connect to FREEPDB1
    -> create SQL_STUDENT with privileges and quota
    -> create, insert, commit, reconnect, and query

Remember the four core distinctions: Oracle Database is the server, SQL Developer is a client, FREE identifies the instance and CDB, and FREEPDB1 is the pluggable database service for ordinary practice. Keep the listener private, avoid administrative accounts for normal work, preserve repeatable scripts and exports, and use a supported Oracle offering for production requirements that need patches and vendor support.