Installing Oracle Database 11g XE and Unlocking the HR Sample Schema – A Tutorial with Screenshots

Brenton WilburnTechnical Tips9 Comments

Installing Oracle Database 11g XE and Unlocking the HR Sample Schema – A Tutorial with Screenshots

When learning to develop Oracle Fusion applications, one of your first steps, if not already completed, should be to install a database for your applications to connect to. Oracle ADF applications are capable of connecting with several different database technologies, but perhaps the most conducive is Oracle’s own database suite. Oracle offers several different database solutions with varying levels of functionality. Oracle’s free, entry-level database offering, Oracle Database Express Edition (XE), is a very capable platform which should provide ample power for development purposes. Oracle Database XE does have some performance limitations which are described in Oracle XE Limitations (CPU, RAM, Data Limits). Fortunately, you can often start with the entry-level XE edition and upgrade your existing database when it becomes necessary.

Installing Oracle Database 11g XE

The first step in installing Oracle Database XE is to download the latest version from Oracle’s website. This can be found in Downloads tab on any their pages.

2014-01-16 14_47_10-Oracle Downloads _ Software _ OracleOnce the download is complete, extract the archive and run the setup.exe file under the DISK1 directory. Once the installer loads, step through the installation.

2014-01-16 15_23_02-Program Manager

2014-01-16 15_23_38-Program ManagerIf you want to install the software in a non-standard location, you can do so on the Choose Destination Location screen. 

2014-01-16 15_24_38-Program ManagerMake sure to choose a safe password that you can remember. You will need this password to make any changes to your database.

2014-01-16 15_26_36-Program Manager

2014-01-16 15_27_01-Program Manager

2014-01-16 15_29_52-Program Manager

2014-01-16 15_31_10-Program ManagerOnce the installer finishes, your installation will be complete. The system will automatically start the database running in the background. You can find tools for administering the database in your start menu under Oracle Database 11g Express Edition in your application menu. These tools can be use to start, stop, backup, or restore the database.

Unlocking the HR Schema

Once the database is installed, you can create users and schemas with most any SQL scripting tool or command line. Two of the most common tools used to interface with Oracle databases are SQL*Plus, a command line-based interface, and Oracle SQL Developer, an graphical database utility.

Many of the tutorials that you will encounter while learning to develop ADF applications make use of the HR example schema which comes pre-installed with Oracle databases. Before you can make use of this, the hr user must first be unlocked. This can be accomplished by issuing the following SQL command:

ALTER USER HR IDENTIFIED BY hr ACCOUNT UNLOCK;

This command can be issued from any SQL utility capable of interfacing with Oracle databases. To execute this command in SQL*Plus, first start the console application by typing sqlplus in a command prompt. Next, log in as the system user using the password you specified earlier during installation of the database. Finally execute the above code.

2014-01-16 15_41_40-Administrator_ Start Database - sqlplusAn alternative way of accomplishing this is via the Oracle SQL Developer application. The application does not come bundled with Oracle Database XE and must be downloaded from Oracle’s website. The first time the application is executed, you must create a connection to your database as the system user. To do this, click the green plus icon in the Connections panel.

2014-01-16 16_26_13-Oracle SQL Developer _ SYSTEMThis will bring up a dialog for creating the new connection. Enter a connection name, the username system, and your password. Once you’ve entered these details, test your connection with the Test button. You should see a status of Success if everything went correctly. Click Connect to save and confirm.

2014-01-16 16_27_15-Oracle SQL DeveloperOnce you are connected as system, expand the tree in the connection panel as Connections-SYSTEM-Other Users and right-click on HR to access the Edit User dialog.

2014-01-16 16_30_17-Oracle SQL Developer

Within the dialog, simply uncheck the box entitled Account is Locked and click Apply.

2014-01-16 16_30_48-Oracle SQL DeveloperAfter completing this tutorial, you should now have a fully functional Oracle XE database with the example HR schema unlocked.

[message_box title=”We’re Oracle Experts!” color=”blue”]If you need Oracle help, you’re in the right place. We want to partner with you to get your projects done, and make things better.[/message_box] Contact Us

9 Comments on “Installing Oracle Database 11g XE and Unlocking the HR Sample Schema – A Tutorial with Screenshots”

  1. 100 % perfect tutorial connecting with SQL Developer.

    But Any any connect the 11g XE with oracle Developer suit (Form & Reports)

Leave a Reply to _R_Desu Cancel reply

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