total page visits

Monday, October 18, 2010

Create HR schema for ORACLE 10 g

ORACLE 10g is not having the built in hr schema as it was in 9i so we need to build it all over again.
Not to worry here are all the steps to do so.

save all the scripts in oracle/product/10.2.0/db_1/demo/schema/human_resources


download all the scripts from : http://www.mediafire.com/?8n0suo2nim2b2n9




Script Name      Description
hr_analz.sql       Collects statistics on the tables in the schema.
hr_code.sql        Creates procedural objects in the schema.
hr_comnt.sql      Creates comments for each object in the schema.
hr_cre.sql           Creates the HR objects.
hr_dn_c.sql        Adds the distinguished name column used by Oracle Internet Directory to                                     employees and departments tables.
hr_dn_d.sql        Drops the Oracle Internet Directory distinguished name column from employees 
                             departments.
hr_drop.sql        Drops the HR schema and all its objects.
hr_idx.sql          Creates indexes on the HR tables.
hr_main.sql        Main script for the HR schema; calls other scripts.
hr_popul.sql       Populates the objects.


then
        
       
connect to sqlplus from command prompt sys as  sysdba




run the script hr_main as sys dba




to run script type the full path


@C:\oracle\product\10.2.0\db_1\demo\schema\human_resources\hr_main.sql

18 comments:

  1. thanks very much it sort out my problems thanks again

    ReplyDelete
  2. Gracias, necesitaba esto, pero no pude hacer que me ejecute directo los script del esquema HR así que tuve que ejecutar uno por uno

    ReplyDelete
  3. you've been such a great help thanks.

    ReplyDelete
  4. thank u so much man it is so helpful to me thanks a lot again

    ReplyDelete
  5. It helps me to build HR schema. Thanks for sharing useful information, keep it up.

    ReplyDelete
  6. Nice work...
    Thanks for taking the time to help...
    Kudos !

    ReplyDelete
  7. Thank you so much!! Keep the good work coming.

    ReplyDelete
  8. it gives following error:


    SQL> run C:\oraclexe\app\oracle\product\10.2.0\server\demo\schema\human_resource
    s\hr_main.sql
    1* alter user hr indentified account unlock
    alter user hr indentified account unlock
    *
    ERROR at line 1:
    ORA-00922: missing or invalid option


    please resolve it thanks

    ReplyDelete
    Replies
    1. While creating a database from Dbca i think you forgot to unlock the hr user.

      Delete
  9. nothing happened i do not have the hr schema. i cannot connect to internet in my virtual machine

    ReplyDelete
    Replies
    1. So download it from your windows and transfer it to the virtual machine.

      Delete
  10. you save me and my assignment!!! thank you!!! >_____<

    ReplyDelete
  11. thanks dude....
    i searched a lot....
    but this is the only place where i got solution to my problem....
    thank you so much....

    ReplyDelete
  12. Thanks a lot... It helped !!

    ReplyDelete