How to setup Oracle Database 11g XE on Windows and unlock the “HR” user

Setup Oracle Database 11g Express Edition step by step and then unlock the user “HR”.

Rizwan Hasan
TechLearners
4 min readOct 3, 2019

--

For Database Management System, Oracle’s position is very strong and also popular among the developers and companies. The version of Oracle Database 11g Express Edition is widely used among the students and database beginners. It’s very lightweight and unlike the previous version 10g, it’s improved in many ways. However, today you will be learning how to install the Oracle Database 11g XE version on Windows PC and unlocking the ‘HR’ account.

Download the Oracle Database 11g Express Edition from the official link here. It’s a zip file which is about 350 MB more or less.

Extracting the ZIP

After finishing the downloading extract the zip file and for extracting a popular opensource program called 7-Zip can be used or you can use any proprietory programs like WinRAR, WinZip, etc.

After extracting there is a folder named “DISK1” and inside that folder, there’s a “setup.exe” file and that’s needed for the installation.

Screenshot of extracted folder and setup files

Installation

To begin the installation, double click on the “setup.exe” file and a window like below screenshot will appear. ↓

Starting Window

Accept the license and click on the “Next” button like below. ↓

License Window

If you wish to install in another directory you can do so but I’m leaving it as default. I suggest unless you’re running out of space in the “C” drive, follow the program’s suggestion like below. ↓

Destination Location Window

You need to set a password for the database system user which is used for the “SYS” & “SYSTEM” user account in the Oracle DBMS environment. ↓

Database Password Window

In this step, check whether all the information is correct or not. If negative you can go back and make changes. It’s important to remember the port information showed on this window. ↓

Final Configuration Checking Window

Now the installation has begun, you can grab a cup of coffee as a waiting material. ↓

Installation Progress Window

After a couple of minutes, if the below window appears then Congratulations. You have installed the database successfully. ↓

Installation Complete Window

Although the installer won’t tell you about the restarting of pc. But it’s very important. After the restarting, you can start exploring the database and also be able to follow the further procedure of unlocking the “HR” user account.

By default Oracle Database XE comes with a sample user named “HR” and under this user’s territory there are several database tables in a sample schema. These pre-given database and tables are playground for beginners. However, for security reasons, “HR” account is locked by default.

Unlocking the “HR” user

To unlock the account you need to go through some command in CMD (Command Prompt). Also, you can use programs like PowerShell for this procedure.

So, Open up your CMD and execute the below command for connecting to the Oracle Database with CMD.↓

Command Prompt Connecting Database

Alter the “ HR” user to unlock,

Finally, unlock the user and assign a password,

Replace “<password>” with your desired one and the changes will be made for the “HR” account only.↓

Command Prompt “HR” Unlocked

Type the exit command for exiting from the database environment. You can use this same command for exiting from Command Prompt, PowerShell and similar applications also.

Conclusion

So far I’ve tried to clear all the steps and I believe you’ve understood everything I showed.

If you liked my writing you can inspire me by giving a Clap. You can follow me on Medium and I’m also available on Twitter here. Don’t forget to share your opinion on the comment section below and also the questions if any.

--

--

Rizwan Hasan
TechLearners

Experienced Software Engineer specializing in backend development, debugging, and cloud computing with Python, FastAPI, Azure, AI integration, and CI/CD skills.