How to install Oracle Database 18c XE on Windows

Oracle Database 18c XE Successful InstallationIn my previous post, I demonstrated how you can install Oracle Database 18c XE on Linux. In this post, you will learn how you can install Oracle Database 18c XE on Windows. I am performing the installation on Windows 10 but it should remain the same for all Windows versions.

Preparing for the installation

Before you can start the installation, you will have to download the Oracle Database 18c XE Windows installer zip file. Head over to, click on “Accept License Agreement” and download the “Oracle Database 18c Express Edition for Windows x64” zip file.

Oracle 18c XE Download page

Once you have downloaded the zip file, extract it anywhere.

Oracle Database 18c XE extracted folder

Installing Oracle Database 18c XE

Go into the extracted Oracle 18c XE Installer directory and double-click on setup.exeImportant: Do not double-click on Oracle Database 18c Express Edition.msi.

Oracle Database 18c XE Setup

Click “Yes” when Windows asks you whether you want to allow this app to make changes to your device.

Oracle Database 18c XE User Access Control

The installer will start up now, click “Next“.

Oracle Database 18c XE Installer

Read the license agreement and click “I accept the terms in the license agreement“. Then click “Next.

Oracle Database 18c XE License screen

Choose a destination folder for where Oracle 18c XE should be installed into, or accept the default location. Then click “Next.

Oracle Database 18c XE Destination Folder Option

Specify and confirm a database password. This is the password that will be set for the SYS, SYSTEM and PDBADMIN accounts, which you will later use to connect to the database directly. Then click “Next.

Oracle Database 18c XE Database password

On the next screen you will see the summary and confirmation of the destination folders for Oracle Database 18c XE. Click “Install“.

Oracle Database 18c XE Summary screen

Now 18c XE is being installed, this can take several minutes.

Oracle Database 18c XE Installation progress

If you have the Windows Defender Firewall activated, you will be asked to allow network access to the Java Platform SE binary. Check the checkboxes to allow access to the networks of your choice and click the “Allow access” button. Note: If you do not allow network access for Java, some features of Oracle Database 18c XE might not work correctly.

Oracle Database 18c XE Windows Firewall

The installation will proceed. Once it is finished, you will be presented with a “Oracle Database Installed Successfully” summary screen that also lists the container database, pluggable database and Enterprise Manager Express connection details. Click on “Finish“.

Oracle Database 18c XE Successful Installation

Congratulations, you now have Oracle Database 18c XE installed on your Windows machine.

Installing Oracle Database 18c XE with a different character set

Oracle 18c XE ships again with all character sets, unlike 11g XE, which only shipped with AL32UTF8. Oracle did this to help users to migrate from their country or region specific character set to the recommended UTF-8 one. You can (now again) install an 18c XE with your country/region specific character set but also with UTF-8 and see whether your applications still run the same, or fix them. On that note, I urge everybody to adopt the UTF-8 character set as soon as possible. UTF-8 is a superset of all regional characters and there should be no reason from the database side of things as to why you cannot adopt it. And if there is, please let me know so that we can overcome it. You may find that in the future it will get harder and harder to use other character sets than UTF-8.

The default character set for 18c XE is, just like in 11g XE, AL32UTF8. So if your application already happily runs on 11g XE or 18c XE today, you are all set! If you want to install 18c XE with a different character set, the installer wizard unfortunately doesn’t provide you the option to choose one. Instead you will have to call the setup.exe from the command line and pass on the CHAR_SET parameter, as documented in the Globalization Support chapter. You can do this by opening a command prompt, change into the extracted Oracle Database 18c XE installer directory and call setup.exe /v"CHAR_SET=[character_set]". Let’s say you want to install Oracle Database 18c XE with the WE8ISO8859P1 character set. You will have to call setup.exe like this: setup.exe /v"CHAR_SET=WE8ISO8859P1".

Oracle Database 18c XE Character Set command line

Note: It is very important that you pass on the /v and " quotes with no space in between, just like above! Otherwise you will get the following window as error:

Oracle Database 18c XE Character Set command line error

Once you hit Enter you will once again be prompted by Windows as to whether you want to allow this app to make changes to your machine. Click “Yes” to proceed.

Oracle Database 18c XE User Access Control

Now you are back again at the same installer wizard as shown above. All steps from here on remain the same. The only difference is that the database will be created with the WE8ISO8859P1 character set.

Oracle Database 18c XE Character Set command line installer

Once your installation is completed you can verify that by executing the following query: SELECT * FROM NLS_DATABASE_PARAMETERS WHERE parameter = 'NLS_CHARACTERSET';

Oracle Database 18c XE Character Set SQL

Connecting to Oracle Database 18c XE

Connecting via SQL Developer

To connect to Oracle Database 18c XE, I highly recommend to download and install SQL Developer (please see the installation instructions for SQL Developer).

Open a new connection window by clicking on the green + sign at the top left under “Connections“.

Oracle Database 18c XE SQLDeveloper New Connection

Then enter the connection details for XE.

Oracle Database 18c XE SQLDeveloper XE Connection Details

Don’t forget to change the role to SYSDBA if you are trying to connect as SYS. Check the “Save Password” box, if you want SQL Developer to remember your password. Then click “Connect“.

A new SQL worksheet should have popped up and you are connected to Oracle Database 18c XE.

Oracle Database 18c XE SQLDeveloper Connection Success

Connecting via Command Prompt

To connect to Oracle Database 18c XE via command prompt, fire up a command prompt and type sqlplus / as sysdba, which will connect you as SYS to the container database XE.

Oracle Database 18c XE SqlPlus connect to CDB as SYS

You can switch to the pluggable database XEPDB1 by typing alter session set container=XEPDB1; You can confirm the container switch by typing show con_name which should return XEPDB1. If you do not see XEPDB1 but CDB$ROOT instead, you have not switched the container. Check for potential errors in your alter session command.

Oracle Database 18c XE SqlPlus connected to PDB as SYS

Performing a silent installation of Oracle Database 18c XE

You can also execute the installation of Oracle 18c XE silently, i.e. without having to click through the installer wizard. That method has the benefit that you can script and automate the installation. The prerequisites remain the same,  you will have to download and extract the installer zip file first. Once extracted, you will find a file called XEInstall.rsp inside the directory which is the response (or parameter) file that you have to pass on to setup.exe. You can set values for all parameters that you would otherwise be asked during the installation:

Parameter Purpose Default value
INSTALLDIR The install directory location. (Replace [USERNAME] with your current user) INSTALLDIR=C:\app\[USERNAME]\product\18.0.0\
PASSWORD The XE Database password. All users are set with this password. PASSWORD=passwordvalue

If listener port is set to 0, available ports will be automatically allocated starting from 1521.


If EM express port is set to 0, available port will be automatically allocated starting from 5550.

CHAR_SET The character set of the database. CHAR_SET=AL32UTF8

Let’s say you want to install Oracle 18c XE into C:\oracle\product\18c, with the character set WE8MSWIN1252 and set the password to Hello18cXE. To do so, open the XEInstall.rsp file with the Notepad application. Right-click on the XEInstall.rsp file, click on “Open with” and choose Notepad.

Oracle Database 18c XE Silent Install Open with

Now change the three parameters INSTALLDIR, PASSWORD, CHAR_SET and then save and close the file.

Oracle Database 18c XE Silent Install Response File values

To kick off the silent installation, open a command prompt, go into the 18c XE installer directory (where you have also edited the XEInstall.rsp file) and execute the following command:

setup.exe /s /v"RSP_FILE=[Your Oracle XE Installer directory]\XEInstall.rsp" /v"/L*v [Your Oracle XE Installer directory]\setup.log" /v"/qn"

You are best of to copy/paste the command above, as the command prompt is rather unforgiving with typos. Change [Your Oracle XE Installer directory] to the path of your extracted Oracle XE Installer files directory.

Note: You will have to use absolute paths for both, the location of the response file and the location of the log file!

Oracle Database 18c XE Silent Install execution

You will be asked again by Windows whether you want to allow the app to make changes to your device. Click on “Yes” and the installation will proceed. You can bypass the pop-up by running the command prompt as Administrator. There is no installer wizard coming up anymore, as the installation is silent. So how do you check the progress of the installation? You may have noticed that the above command did specify a setup.log log file, which is a detailed (and rather big) log of the installation process. Once the installation is successfully finished, you will see the following at the bottom of the log file:

Product: Oracle Database 18c Express Edition -- Installation operation completed successfully.

Oracle Database 18c XE Silent Install execution

Note: If the Windows Defender firewall is activated, you may still get a pop-up to allow or deny the Java Platform SE access to your networks. There is no way around this in a silent installation. If you want a truly silent installation you may want to have the Windows Defender firewall already appropriately configured to avoid the pop-up.

Congratulations, you have successfully performed a silent Oracle Database 18c XE installation on your Windows machine.

For more information about the silent installation, see the Performing a Silent Installation section in the documentation.

30 thoughts on “How to install Oracle Database 18c XE on Windows

  1. I can’t get connected. I get: Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection


      1. Hi Gerald, Thanks for the reply. I am following the instructions above under the heading, “Connecting via SQL Developer”


        1. Sure thing! Where is the database running? What connect details did you specify? Is there a firewall running preventing you to reach the database? The error basically means that SQL Developer can’t reach the database.



          1. Thanks for the context. I am new to MySQL; I was using Postgres before, and that was pretty straightforward. I have been following installation instructions in a book to learn MySQL, and instructions from Oracle, and from this page. So I tried a few things for the connection details, and lastly I tried what you have printed above. I presumed this was local, but maybe I’m wrong? I am starting from scratch and I want to be able to create a database, I presume, as I did when I was using Postgres. I spent most of the day Googling to try to figure out why it wasn’t working. Thanks for your patience.


            1. Hi Ross,

              This blog post isn’t about MySQL, it’s about Oracle Database Express Edition, just to clarify.
              If you have just installed Oracle XE on Windows, you should have no issues opening a command prompt and connect via “sqlplus / as sysdba” as shown in the post. If you cannot connect via that then most likely something went wrong during the installation. If you can connect like that, then it’s merely a question of connection details that are wrong or need to be reconfigured. Can you try to connect via “sqlplus / as sysdba”?



    1. XE18C have many problems with network, especially on Win 10 Home, because not certified

      in Sys as sysdba run …
      SQL> alter system set LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))’ scope=both;
      SQL> alter system register;

      if necessary set tnsname :

      XE =
      (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))
      (CONNECT_DATA = (SID = XE))

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

      and Listener:
      LISTENER =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


  2. Hi Gerald, The Installation went through and I received the “Installation Successful” message exactly the way you have displayed here.
    I then tried to connect to the Oracle Database using sqlplus (sqlplus / as sysdba) as you have mentioned.
    When I start it, I get the message “ERROR: ORA-12560: TNS: protocol adapter error”, but I got the login prompt, so I log in using user-name: sys and my password and I get the same ERROR again.
    I have not installed Oracle specifically using “Run as Administrator”.


        1. I have the same problem as above, installs successfully but then “ERROR: ORA-12560: TNS: protocol adapter error” when I try to login. I have installed as administrator.


          1. Hi Donnie,

            The issue is not exactly the same.
            Varghese gets a ERROR: ORA-12541 TNS:no listener while you are getting a ERROR: ORA-12560: TNS: protocol adapter error

            Your error suggests that the firewall is blocking the connection.
            Varghese error suggests that the listener isn’t running (or wasn’t setup correctly during the install).



      1. I am getting the same error. Just wanted to ask if you were able to resolve yours? I have installed Oracle XE 18c on windows 10 home as an admin.


  3. Hi,
    I can´t get through directory select. No matter if I put mine or use default. When I press next, it “loads for a moment” (circle symbol for mouse pointer – Win 10) and then nothing…
    Please help


  4. Getting this:

    MSI (s) (A4:5C) [11:37:56:474]: Note: 1: 1708
    MSI (s) (A4:5C) [11:37:56:474]: Product: Oracle Database 18c Express Edition — Installation operation failed.

    MSI (s) (A4:5C) [11:37:56:477]: Windows Installer installed the product. Product Name: Oracle Database 18c Express Edition. Product Version: Product Language: 1033. Manufacturer: Oracle Corporation. Installation success or error status: 1603.


  5. Dear Gerald,
    I’m writing to express great appreciation.
    Your article has just helped me with installation of Oracle Database 18c Express Edition on Windows 8.1 Home! Yes! 8.1 Home!
    I have used the silent installation. Usual installation failed 3 times.
    But now I have Oracle installed. I have checked. SQL Plus works fine.
    It’s great!
    Thank you

    Liked by 1 person

  6. HI Gerald,
    I’ve tried to silent install using your method but I get the error below, what am I doing wrong here?
    Product: Oracle Database 18c Express Edition — Installation operation failed.

    Windows Installer installed the product. Product Name: Oracle Database 18c Express Edition. Product Version: Product Language: 1033. Manufacturer: Oracle Corporation. Installation success or error status: 1603.



  7. I got this error:
    [INS-08101] Unexpected error while executing the action at state: ‘summaryPage’
    once I clicked ‘Yes’, it prompt this message:

    please help!


  8. Hi Gerald,
    After succesfully installed the db, I get an error when trying to connect to the db :

    Status : Failure -Test failed: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

    Here is the listener.ora:

    listener.ora Network Configuration File: C:\Oracle\OracleDBExpressEdition\product\18.0.0\dbhomeXE\NETWORK\ADMIN\listener.ora

    Generated by Oracle configuration tools.


    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\Oracle\OracleDBExpressEdition\product\18.0.0\dbhomeXE)
    (PROGRAM = extproc)
    (ENVS = “EXTPROC_DLLS=ONLY:C:\Oracle\OracleDBExpressEdition\product\18.0.0\dbhomeXE\bin\oraclr18.dll”)

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

    And the tnsnames.ora :

    tnsnames.ora Network Configuration File: C:\Oracle\OracleDBExpressEdition\product\18.0.0\dbhomeXE\NETWORK\ADMIN\tnsnames.ora

    Generated by Oracle configuration tools.

    (SID = CLRExtProc)

    Am I missing something ?


    1. Hi Michail,

      At the first look, I do not see a TNSNames entry for the XE instance nor the PDB service, but depending how you try to connect, that may or may not matter.
      I recommend you post your issue in the Oracle DB XE Forum.



  9. Hello Gerald,

    I tried to install XE 18c on my computer (Windows10 Pro) several times but after a few minutes during the installation a rollback process will be initiate and delete all installation folders completely.
    After this rollback there is no any ORACLE folder on my drive.

    So it is not possible to have a look on any logs. Only the logfile of Windows Installer with an error code 1603 but this is not helpfully for me in this case …
    Definition of Error Code 1603:
    “Error installing Windows Installer engine. A file which needs to be replaced may be held in use. Close all applications and try again.”

    But which file is it and which tool blocked this ? I don’t know.

    Here are my installations points:
    – Windows10 Pro
    – Run as Administrator
    – my windows account belongs to the administration group
    – switch off any antivirus tools and firewall during installation
    – no oracle folders or systemvariables are noticed
    – also tried as silent installation (see oracle doku)

    Last week I posted my problem also on Oracle Database XE Forum – but without solution to solve it.

    Have you any ideas what happens here and how can I solve this problem ?


    1. Hi Tom,

      Unfortunately, I myself have not come across this issue yet (also, I’m using Mac). However, I know that a couple of times we had issues that users were wrongly executing the Oracle Database 18c Express Edition.msi instead of the setup.exe, which caused unexpected errors. Could that perhaps be the case here too?

      I’ve also just found, which may offer some insights and ideas as well.

      Hope this helps!



      1. Hi Gerald,
        in the meantime I was able to install Oracle 18 XE on my computer.
        I created a second user (ADMINISTRATOR account) and the installation worked without errors, although my standard account has also admin privileges.

        Thanks for your help.

        Best regards


  10. I installed Oracle 18 XE on my computer. I had trouble finding the sample HR database so I uninstalled it and was attempting to reinstall it. Unfortunately, I had a power outage while running the install wizard which caused it to terminate in the middle of the process. When my computer restarted I tried to start the install process again, I received an error saying that I had to uninstall. I did that and it seemed to complete successfully. When I tried to install it again I got the following message:
    “There is an existing Oracle Database Express Edition service on this machine”

    This was on the prerequisite step.

    How can I clear this error?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.