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.
Once 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.
If you want to install the software in a non-standard location, you can do so on the Choose Destination Location screen.
Make sure to choose a safe password that you can remember. You will need this password to make any changes to your database.
Once 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.
An 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.
This 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.
Once 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.
Within the dialog, simply uncheck the box entitled Account is Locked and click Apply.
After completing this tutorial, you should now have a fully functional Oracle XE database with the example HR schema unlocked.
9 Comments on “Installing Oracle Database 11g XE and Unlocking the HR Sample Schema – A Tutorial with Screenshots”
thank u buddy;
100 % perfect tutorial connecting with SQL Developer.
But Any any connect the 11g XE with oracle Developer suit (Form & Reports)
Thank you.
pretty useless – carried out the instruction – they worked – where is the hr database….????
connect to hr
user hr
password – password you set on installation
did you know how to connecting Oracle to asp.net with MVC ?
excellent procedure .
connect to hr
user hr
password – password you set on installation
Thanks Bro