Sunday, January 27, 2013

3 Install Sample Database/Schema for Oracle 11gR2

I want to install the sample database for my Oracle database server.

Prerequisite

Oracle Database installed. You can refer here for installing the Oracle Database.

Software

 

Install the Oracle Example

image

image

the 11.2.0 installer does not recognize the newer version of package therefore, if the system already has the newer version of the packages, it can be ignore.

image

image

image

After the installer completed, the mksample.sql script is populate to under $ORACLEHOME/demo/schema directory. We can use it to create the sample schema.

image

Install the Sample Schema

I am going to use the mksample.sql to create the sample schema. This is the primary script and will invoke other script to create the correspond schema. If only need some schema, you can just invoke the individual script. For example, the HR schema can be created by invoking hr_main.sql under human_resources folder.

 

@$ORACLE_HOME/demo/schema/mksample.sql

 

The log file path must be end with / .

image

After scripts, we can exam the log file in the log directory to see if there is any error.

 

 

Reference

3 comments:

  1. @?/demo/schema/human_resources/hr_main.sql
    gives me an error :-
    SP2-0310: unable to open file "F:\app\Welcome\product\11.2.0\dbhome_1/demo/schema/human_resources/hr_main.sql"

    please help

    ReplyDelete
  2. @?/demo/schema/human_resources/hr_main.sql
    gives me an error :-
    SP2-0310: unable to open file "F:\app\Welcome\product\11.2.0\dbhome_1/demo/schema/human_resources/hr_main.sql"

    please help

    ReplyDelete
    Replies
    1. You should install examples first.
      Contains examples of how to use the Oracle Database. Download if you are new to Oracle and want to try some of the examples presented in the Documentation

      Delete

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates