Monday, 9 November 2015

How to install Oracle Example Schemas

Hello,

I have been looking everywhere for a simple way to install the HR, OE, etc... sample schemas. If you do not have the files already somewhere on your system, this is a pretty good way to get these schemas:

1. Download the Oracle Examples from:

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

Choose your version and operating system and click on "See All". On the next page select and download the "Examples".

2. Copy the archive to your system

3. Extract the archive, you will have an "examples" folder now.

4.  Go to examples/stage/Components/oracle.rdbms.companion/11.2.0.1.0/1/DataFiles

There you find a lot of filegroupX.jar files.

5. For the specific schema you want, extract the filegroupX.jar file:

9 - BI
10 - HR
11 - IX
12 - mksample.sql
13 - OE
14 - PM
15 - SH

For example, for the HR schema, do: unzip filegroup10.jar

This will create a "demo" folder.

6. Copy the whole "human_resources" folder to ORACLE_HOME/demo/schemas/

7. Go into the $ORACLE_HOME/demo/schema/human_resources folder

7. In your SQL-Tool (SQLPLus, SQL Developer, etc..) run the hr_main.sql as SYS-User!!! out of the human_resources folder. This will install the schema for you.


No comments:

Post a Comment