Oracle Database

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

For Database Management SystemOracle’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 Editionfrom 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 WinRARWinZip, 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.

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.↓

SQLPLUS / AS SYSDBA;

Command Prompt Connecting Database

Alter the “ HR” user to unlock,

SQLPLUS / AS SYSDBA;

Finally, unlock the user and assign a password,

ALTER USER HR IDENTIFIED BY <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 PromptPowerShell and similar applications also.

exit

If you like it, share it with others !
Leave a Reply

Your email address will not be published. Required fields are marked *