Install Oracle Database 19c on Windows
This post shows the steps to install Oracle Database 19c on Windows Server Datacenter 2022.
Table of Contents
Preparation
To be able to install Oracle 19c we need a Windows Server Datacenter 2022 Virtual Machine. The process to create this VM is described here. The Oracle Database software (WINDOWS.X64_193000_db_home.zip) can be downloaded from Oracle.
Install Oracle Database 19c on Windows
The following commands can be pasted in a command window in the VM and the Oracle software including a container database (orclcdb) and a pluggable database (orcl) will be installed in silent mode. If you want to create a Standard Edition 2 (SE2) installation you can change the parameter InstallEdition=EE to InstallEdition=SE2.
(rem unpack the database software
mkdir c:\oracle\product\dbhome_19_3 && cd c:\oracle\product\dbhome_19_3
tar -xf S:\oracle\db\WINDOWS.X64_193000_db_home.zip
rem create the silent installation response file
(
echo oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
echo oracle.install.option=INSTALL_DB_AND_CONFIG
echo ORACLE_BASE=C:\oracle
echo oracle.install.db.InstallEdition=EE
echo oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
echo oracle.install.db.config.starterdb.globalDBName=orclcdb.fritz.box
echo oracle.install.db.config.starterdb.SID=orclcdb
echo oracle.install.db.ConfigureAsContainerDB=true
echo oracle.install.db.config.PDBName=orcl
echo oracle.install.db.config.starterdb.characterSet=AL32UTF8
echo oracle.install.db.config.starterdb.memoryOption=false
echo oracle.install.db.config.starterdb.memoryLimit=3277
echo oracle.install.db.config.starterdb.installExampleSchemas=false
echo oracle.install.db.config.starterdb.password.ALL=changeme
echo oracle.install.db.config.starterdb.managementOption=DEFAULT
echo oracle.install.db.config.starterdb.omsPort=0
echo oracle.install.db.config.starterdb.enableRecovery=true
echo oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
echo oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=C:\oracle\oradata
echo oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=C:\oracle\recovery_area
echo oracle.install.db.config.asm.ASMSNMPPassword=
echo oracle.install.IsBuiltInAccount=false
echo oracle.install.IsVirtualAccount=false
echo oracle.install.OracleHomeUserName=oracle
echo oracle.install.OracleHomeUserPassword=Changeme19
)>c:\oracle\db.rsp
rem install the database software
C:\oracle\product\dbhome_19_3\setup.exe -silent -responseFile c:\oracle\db.rsp)
The installation created a new Windows user “oracle” under which the database service runs. The password is Changeme19. The database is now installed and can be used.
Allow incoming connections (Windows Firewall)
The next two commands allow incoming connections to the Oracle Listener (port 1521) and to the Enterprise Manager (port 5500):
netsh advfirewall firewall add rule name="Oracle TCP port 1521" dir=in action=allow protocol=TCP localport=1521
netsh advfirewall firewall add rule name="Oracle TCP port 5500" dir=in action=allow protocol=TCP localport=5500
Access the Oracle Enterprise Manager Database Express
To perform basic Administration of the database you can access Database Express with a URL similar to this: https://win3.fritz.box:5500/em and login with sys/changeme.

Basic Administration Tasks
By default statistics are gathered by the ‘Automated Maintenance Tasks’ in the maintenance windows.
# confirm that statistic gathering is enabled
select client_name, status from dba_autotask_client where client_name = 'auto optimizer stats collection';
# display maintenance windows (start date and duration)
set lines 123 pages 66
col next_start_date for a45
col window_name for a25
select window_name,next_start_date,extract(hour from duration) dur_hours,active from dba_scheduler_windows where enabled='TRUE' order by next_start_date;
# display the status of past statistic collection runs
select log_date, status, run_duration, error#, additional_info, errors from dba_scheduler_job_run_details where job_name like 'ORA$AT_OS%' and log_date>sysdate-2 order by log_date desc;
Sample Output
SQL> select client_name, status from dba_autotask_client where client_name = 'auto optimizer stats collection';
CLIENT_NAME STATUS
---------------------------------------------------------------- --------
auto optimizer stats collection ENABLED
SQL> select window_name,next_start_date,extract(hour from duration) dur_hours,active from dba_scheduler_windows where enabled='TRUE' order by next_start_date;
WINDOW_NAME NEXT_START_DATE DUR_HOURS ACTIV
------------------------- --------------------------------------------- ---------- -----
FRIDAY_WINDOW 25-APR-25 10.00.00.000000000 PM US/MOUNTAIN 4 FALSE
SATURDAY_WINDOW 26-APR-25 06.00.00.000000000 AM US/MOUNTAIN 20 FALSE
SUNDAY_WINDOW 27-APR-25 06.00.00.000000000 AM US/MOUNTAIN 20 FALSE
MONDAY_WINDOW 28-APR-25 10.00.00.000000000 PM US/MOUNTAIN 4 FALSE
TUESDAY_WINDOW 29-APR-25 10.00.00.000000000 PM US/MOUNTAIN 4 FALSE
WEDNESDAY_WINDOW 30-APR-25 10.00.00.000000000 PM US/MOUNTAIN 4 FALSE
THURSDAY_WINDOW 01-MAY-25 10.00.00.000000000 PM US/MOUNTAIN 4 FALSE
SQL> select log_date, status, run_duration, error#, additional_info, errors from dba_scheduler_job_run_details where job_name like 'ORA$AT_OS%' and log_date>sys
date-2 order by log_date desc;
LOG_DATE STATUS RUN_DURATION ERROR# ADDITIONAL_INFO ERRORS
----------------------------------- ---------- --------------- ---------- -------------------- ----------
Leave a Reply