Where to find sample schemas?

Hi all,
I need to install the hr sample database. The SQL book that I am reading uses the hr db for the examples. The book claims that the schemas should be in
$OH/demo/schema/human_resources
I just did a full install of 10g and can only find hr_code.sql in that directory. Where do I get the schemas to create the hr database?
TIA,
Fernando

If you did the default install of the DB then the HR schema should already have been installed for you (just that the account is locked by default).
Enter user-name: hr
Enter password:
ERROR:
ORA-28000: the account is lockedJust unlock the account using ALTER USER command and you should be ready to go.

Similar Messages

  • Where is HR Sample Schema Script for APEX 2.2

    Just installed APEX 2.2 and am reviewing the 2-day developers guide. In there they give many examples based on an HR sample schema which they say can be downloaded from http://www.oracle.com/technology/products/database/application_express/code/hr_sample_schema.sql
    I'm finding this address invalid. Does anyone know the right url for the script or can someone supply it to me?

    Hi skondolf1,
    I don't know where that specific script is now, but you can also get the HR samle schema here: http://www.oracle.com/technology/obe/obe1013jdev/common/files/sample_schema_scripts9i10g.zip
    Regards Pete

  • Can't find sample schemas

    I have installed 10g xe. I am self training using the oracle press book "Oracle Database 10g A Beginner's Guide." However, the book indicates that the customer table, mentioned in chapter 2 is provided as part of the sample schema in 10g. But the only schema I have is HR. Is there a place where I can download and import the schemas mentioned in the book? Or must I install enterprise edition in order to work with them? Thanks to any that can assist.

    The Order Entry (OE) schema builds on the purely relational Human Relations (HR) schema with some object-relational and object-oriented features. The OE schema contains seven tables: Customers, Product_Descriptions, Product_Information, Order_Items, Orders, Inventories, and Warehouses. The OE schema has links into the HR schema and PM schema. This schema also has synonyms defined on HR objects to make access transparent to users.
    rem
    rem Header: oe_cre.sql 09-jan-01
    rem
    rem Copyright (c) 2001, 2002, Oracle Corporation.  All rights reserved. 
    rem
    rem Owner  : ahunold
    rem
    rem NAME
    rem   oe_cre.sql - create OE Common Schema
    rem
    rem DESCRIPTON
    rem   Creates database objects. The script assumes that the HR schema
    rem   is present.
    rem
    rem NOTES
    rem   The OIDs assigned for the object types are used to
    rem   simplify the setup of Replication demos and are not needed
    rem   in most unreplicated environments.
    rem
    rem MODIFIED   (MM/DD/YY)
    rem   hyeh      08/29/02 - hyeh_mv_comschema_to_rdbms
    rem   ahunold   09/17/01 - FK in PRODUCT_DESCRIPTIONS
    rem   ahunold   04/25/01 - OID
    rem   ahunold   03/02/01 - eliminating DROP SEQUENCE
    rem   ahunold   01/30/01 - OE script headers
    rem   ahunold   01/24/01 - Eliminate extra lines from last merge
    rem   ahunold   01/05/01 - promo_id
    rem   ahunold   01/05/01 - NN constraints in product_descriptions
    rem   ahunold   01/09/01 - checkin ADE
    PROMPT
    PROMPT specify Sample Schema version as parameter 1:
    DEFINE vrs     = &1
    PROMPT
    -- ======================================================================
    -- Type definitions
    -- ======================================================================
    CREATE TYPE cust_address_typ
      OID '82A4AF6A4CD1656DE034080020E0EE3D'
      AS OBJECT
        ( street_address     VARCHAR2(40)
        , postal_code        VARCHAR2(10)
        , city               VARCHAR2(30)
        , state_province     VARCHAR2(10)
        , country_id         CHAR(2)
    REM ===========================================================================
    REM Create phone_list_typ varray to be varray column in customers table.
    REM ===========================================================================
    CREATE TYPE phone_list_typ
      OID '82A4AF6A4CD2656DE034080020E0EE3D'
      AS VARRAY(5) OF VARCHAR2(25);
    REM ===========================================================================
    REM Create customers table.
    REM The cust_geo_location column will become MDSYS.SDO_GEOMETRY (spatial)
    REM datatype when appropriate scripts and data are available.
    REM ===========================================================================
    DEFINE vscript = ?/demo/schema/order_entry/ccus_&vrs
    @&vscript
    CREATE UNIQUE INDEX customers_pk
       ON customers (customer_id) ;
    REM Both table and indexes are analyzed using the oe_analz.sql script.
    ALTER TABLE customers
    ADD ( CONSTRAINT customers_pk
          PRIMARY KEY (customer_id)
    REM ===========================================================================
    REM Create warehouses table;
    REM  includes spatial data column wh_geo_location and
    REM  XML type warehouse_spec (was bug b41)
    REM ===========================================================================
    DEFINE vscript = ?/demo/schema/order_entry/cwhs_&vrs
    @&vscript
    CREATE UNIQUE INDEX warehouses_pk
    ON warehouses (warehouse_id) ;
    ALTER TABLE warehouses
    ADD (CONSTRAINT warehouses_pk PRIMARY KEY (warehouse_id)
    REM ===========================================================================
    REM Create table order_items.
    REM ===========================================================================
    CREATE TABLE order_items
        ( order_id           NUMBER(12)
        , line_item_id       NUMBER(3)  NOT NULL
        , product_id         NUMBER(6)  NOT NULL
        , unit_price         NUMBER(8,2)
        , quantity           NUMBER(8)
    CREATE UNIQUE INDEX order_items_pk
    ON order_items (order_id, line_item_id) ;
    CREATE UNIQUE INDEX order_items_uk
    ON order_items (order_id, product_id) ;
    ALTER TABLE order_items
    ADD ( CONSTRAINT order_items_pk PRIMARY KEY (order_id, line_item_id)
    CREATE OR REPLACE TRIGGER insert_ord_line
      BEFORE INSERT ON order_items
      FOR EACH ROW
      DECLARE
        new_line number;
      BEGIN
        SELECT (NVL(MAX(line_item_id),0)+1) INTO new_line
          FROM order_items
          WHERE order_id = :new.order_id;
        :new.line_item_id := new_line;
      END;
    REM ===========================================================================
    REM Create table orders, which includes a TIMESTAMP column and a check
    REM constraint.
    REM ===========================================================================
    DEFINE vscript = ?/demo/schema/order_entry/cord_&vrs
    @&vscript
    CREATE UNIQUE INDEX order_pk
    ON orders (order_id) ;
    ALTER TABLE orders
    ADD ( CONSTRAINT order_pk
          PRIMARY KEY (order_id)
    REM ===========================================================================
    REM Create inventories table, which contains a concatenated primary key.
    REM ===========================================================================
    CREATE TABLE inventories
      ( product_id         NUMBER(6)
      , warehouse_id       NUMBER(3) CONSTRAINT inventory_warehouse_id_nn NOT NULL
      , quantity_on_hand   NUMBER(8)
    CONSTRAINT inventory_qoh_nn NOT NULL
      , CONSTRAINT inventory_pk PRIMARY KEY (product_id, warehouse_id)
    REM ===========================================================================
    REM Create table product_information, which contains an INTERVAL datatype and
    REM a CHECK ... IN constraint.
    REM ===========================================================================
    CREATE TABLE product_information
        ( product_id          NUMBER(6)
        , product_name        VARCHAR2(50)
        , product_description VARCHAR2(2000)
        , category_id         NUMBER(2)
        , weight_class        NUMBER(1)
        , warranty_period     INTERVAL YEAR TO MONTH
        , supplier_id         NUMBER(6)
        , product_status      VARCHAR2(20)
        , list_price          NUMBER(8,2)
        , min_price           NUMBER(8,2)
        , catalog_url         VARCHAR2(50)
        , CONSTRAINT          product_status_lov
                              CHECK (product_status in ('orderable'
                                                      ,'planned'
                                                      ,'under development'
                                                      ,'obsolete')
    ALTER TABLE product_information
    ADD ( CONSTRAINT product_information_pk PRIMARY KEY (product_id)
    REM ===========================================================================
    REM Create table product_descriptions, which contains NVARCHAR2 columns for
    REM NLS-language information.
    REM ===========================================================================
    CREATE TABLE product_descriptions
        ( product_id             NUMBER(6)
        , language_id            VARCHAR2(3)
        , translated_name        NVARCHAR2(50)
    CONSTRAINT translated_name_nn NOT NULL
        , translated_description NVARCHAR2(2000)
    CONSTRAINT translated_desc_nn NOT NULL
    CREATE UNIQUE INDEX prd_desc_pk
    ON product_descriptions(product_id,language_id) ;
    ALTER TABLE product_descriptions
    ADD ( CONSTRAINT product_descriptions_pk
         PRIMARY KEY (product_id, language_id));
    ALTER TABLE orders
    ADD ( CONSTRAINT orders_sales_rep_fk
          FOREIGN KEY (sales_rep_id)
          REFERENCES hr.employees(employee_id)
          ON DELETE SET NULL
    ALTER TABLE orders
    ADD ( CONSTRAINT orders_customer_id_fk
          FOREIGN KEY (customer_id)
          REFERENCES customers(customer_id)
          ON DELETE SET NULL
    ALTER TABLE warehouses
    ADD ( CONSTRAINT warehouses_location_fk
          FOREIGN KEY (location_id)
          REFERENCES hr.locations(location_id)
          ON DELETE SET NULL
    ALTER TABLE customers
    ADD ( CONSTRAINT customers_account_manager_fk
          FOREIGN KEY (account_mgr_id)
          REFERENCES hr.employees(employee_id)
          ON DELETE SET NULL
    ALTER TABLE inventories
    ADD ( CONSTRAINT inventories_warehouses_fk
          FOREIGN KEY (warehouse_id)
          REFERENCES warehouses (warehouse_id)
          ENABLE NOVALIDATE
    ALTER TABLE inventories
    ADD ( CONSTRAINT inventories_product_id_fk
          FOREIGN KEY (product_id)
          REFERENCES product_information (product_id)
    ALTER TABLE order_items
    ADD ( CONSTRAINT order_items_order_id_fk
          FOREIGN KEY (order_id)
          REFERENCES orders(order_id)
          ON DELETE CASCADE
    enable novalidate
    ALTER TABLE order_items
    ADD ( CONSTRAINT order_items_product_id_fk
          FOREIGN KEY (product_id)
          REFERENCES product_information(product_id)
    ALTER TABLE product_descriptions
    ADD ( CONSTRAINT pd_product_id_fk
          FOREIGN KEY (product_id)
          REFERENCES product_information(product_id)
    REM ===========================================================================
    REM Create cross-schema synonyms
    REM ===========================================================================
    CREATE SYNONYM countries FOR hr.countries;
    CREATE SYNONYM locations FOR hr.locations;
    CREATE SYNONYM departments FOR hr.departments;
    CREATE SYNONYM jobs FOR hr.jobs;
    CREATE SYNONYM employees FOR hr.employees;
    CREATE SYNONYM job_history FOR hr.job_history;
    REM ===========================================================================
    REM Create sequences
    REM ===========================================================================
    CREATE SEQUENCE orders_seq
    START WITH     1000
    INCREMENT BY   1
    NOCACHE
    NOCYCLE;
    REM ===========================================================================
    REM Need commit for PO
    REM ===========================================================================
    COMMIT;And yes, you must install at least Oracle SE to get completely this sample schemas on your file system :(

  • Where to find sample WPF SQLite app

    I downloaded the file sqlite-netFx451-setup-bundle-x86-2013-1.0.96.0.exe found
    here, to use a SQLite database with my WPF app. Does anyone know where I can find a sample app, or instructions on how retrieve, add, delete records etc. via C# code, using the package? Please note I'm using Visual Studio 2013. Thank you.

    Hi PDoug,
    >>Does anyone know where I can find a sample app, or instructions on how retrieve, add, delete records etc. via C# code, using the package?
    I think you need to know how to use SQLite in any .Net application first, please refer to this link for details:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/2d4befa0-b09c-41fb-9907-e7d3464b1bea/sqlite-database-in-wpfapplication?forum=wpf
    You can also get some samples in the Internet, for exmple, using your favorite search engine with keywords: WPF Sqlite
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Where to find sample nicknames thesaurus file?

    Hi,
    I'm Reading 11g R2 Oracle® Text Application Developer's Guide, and I'm trying to follow sample code in chapter 9 "Using Oracle Text Name Search". According to comments,  file dr0thsnames.txt should be in $ORACLE_HOME/ctx/sample/thes directory, but I can't find it. I'm using Oracle 11 g R2. somebody knows where can I find it?
    Thanks in advance.

    You need to download the "Oracle Database 11g Release 2 Examples" for your platform, then follow the instructions to install it.
    It installs a number of other things that may or may not interest you, but there's no option to install "only" the Text thesaurus, knowledge base, and names files.
    Once the Examples are installed, you will still need to follow the instructions to load the thesaurus into your database.

  • Where to find companion cd or sample schemas?

    Hi
    I have Oracle 10g Express Edition intalled on Windows XP. I would like to test the sample schemas but I can only find the Human Resources installed. I read somewhere that they are available on the Oracle 10g companion CD, where can I find this? I have searched everywhere for the file but no luck! Thanks for any advice.
    Michael

    It is useless to try to find the Companion disk for XE, it doesn't exist. Oracle Companion disk is available only for the SE or EE editons, not for XE. XE only has included the HR schema. The reason is because the other schemas require options, such as partitioning, which are not available in XE.
    If you want to test the other schemas, then you must install the Oracle Enterprise Edition.
    ~ Madrid
    http://hrivera99.blogspot.com/

  • Where to download oe sample schema?

    I downloaded Oracle 10g database express edition (XE). It does not seem to include the oe sample schema, only the hr sample schema. Does anyone know where I can download the scripts to install the oe sample schema? Could not find these anywhere on oracle.com or on google amazingly. Thanks so much.

    /home/oracle/app/oracle/product/11.2.0/dbhome_2/inventory/Templates/demo
    /home/oracle/app/oracle/product/11.2.0/dbhome_2/inventory/Templates/demo/schema
    /home/oracle/app/oracle/product/11.2.0/dbhome_2/inventory/Templates/demo/schema/mk_dir.sql.sbs
    /home/oracle/app/oracle/product/11.2.0/dbhome_2/inventory/Templates/demo/schema/order_entry
    /home/oracle/app/oracle/product/11.2.0/dbhome_2/inventory/Templates/demo/schema/order_entry/createUser.sql
    /home/oracle/app/oracle/product/11.2.0/dbhome_2/inventory/Templates/rdbms/demo
    /home/oracle/app/oracle/product/11.2.0/dbhome_2/inventory/Templates/rdbms/demo/aqxml.conf

  • Where to download scripts for HR sample schema

    Hi,
    i installed Oracle11g on linux without sample schemas.
    now i want to manually install the sample schemas.
    and when i checked the folders under "../human_resources"
    i am not able to view the scripts to install HR schema.
    i tried a lot of google search but i am not able to find and download the scripts needed to create HR objects.
    Can someone guide me where i can find scripts that i can download and install all the sample schema objects
    Thanks,
    Philip.

    It's part of the Companion install

  • Where to find game sample code?

    Where to find game sample code?

    Try the iPhone Dev Center (and the developer forums there, when you've signed up):
    http://developer.apple.com/iphone/index.action

  • Where can I find the schema for config.xml file of jax-rpc

    For the xrpcc tool I need to create a config.xml file, does any body know where can I find the schema for it?

    http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXRPCxrpcc.html and all your questions will be answered... except maybe why aren't these pages linked from the main index anymore? (they were when 1.0 of the tutorial was released, but then there were no docs for wscompile or wsdeploy. The JAX-RPC release notes fixed the latter, but around 1.0_01 they broke the former.)

  • Where I can find sample to practice 10.1.3?

    I am beginning the 10.1.3
    where I can find sample souce for begninner?
    thanks

    User,
    Although you don't mention specifically what you would like to get started with (plain Java, ADF, BPEL, etc)...
    You can find pllenty of tutorials at http://www.oracle.com/technology/products/jdev/index.html
    Hope this helps,
    John

  • Where FIND electronic scheme of ibook?

    where can we find electronical scheme of ibook (G4)?
    Is it nobody who have this scheme?
    i've find iBookG4.pdf whit picture to open and repair G4 but i want description of electronic from logic board. I can open an ibook without this doc. I need logicboard doc.
    Thank you very much
    Fhano

    A very guarded secret is what you're after here, you'll have to either go to an apple store or call Apple Care [you should be able to get the number from your countries local toll-free directory assistance].

  • Could anyboody please tell me where could i find sample graphics swf files

    Hi  all
    I am trying to download some graphics swf file for applying skinning to my FLex components .
    But i cant find any free graphics swf  files .
    Could anyboody please tell me where could i find sample graphics swf files ??
    please guide me . Thanks

    Thank you very much .
    I like this below URL  Component very Much
    http://ntt.cc/ext/Themes-Skins-For-Adobe-Flex/demo/BlackBlue/BlackBlue.html#app=2370&dfb0- selectedIndex=0&aa12-selectedIndex=2
    how can i apply this skin to my components ??
    Thanks .

  • Where can I find XSQL Schema?

    I'm trying to find the schema definition for XSQL, any ideas where I can find it?
    I looked in the xdk folders but nothing jumps out as the right file.
    Any help would be greatly appreciated,
    Thanks,

    XSQL Elements are in the xmlns:xsql="urn:oracle-xsql" namespace.
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14252/adx_ref_xsql.htm

  • Oracle 9i Sample Schemas

    I looking for the sample schemas that should have been installed with 9i DB. I installed 9i Personal on Win 98, but can't find them (HR, OE, PM, etc). They were supposed to have uploaded to $ORACLE_HOME/demo/schema. Demo doesn't exists.
    I also tried to install the schemas on 8i according to the instructions and files that came with Oracle 9i JDev tutorial. The tables were not created, just lots of errors.
    Any ideas where to look in 9i or how to install them on 8i?
    Still, life's good
    Thanks

    Does your database have Oracle Intermedia installed?
    The other thing to check is whether your DBA has revoked execute on those objects from public. A couple of them served as vectors for DoS attacks against the database,
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

Maybe you are looking for

  • I have a simple movie clip/ button question

    I have a simple movie clip on my scene 1 frame 1.  Inside that movie clip I have another movie clip, with a button on top that controls that mc.  Also have another movie clip with a button on top that I would like to take me back to scene 1, frame xy

  • Dvd skipping over damaged area

    Hi, This is in reference to a MacBook Pro DVD issue: 13-inch, Early 2011 Processor: 2.3Ghz Intel Core i5 Memory 4GB 1333Mhz DDR3 Graphics: Intel HD Graphics 3000 384 MB Software: OS X 10.9.2 (13C64) After inserting the Prometheus DVD disk I get the m

  • MIxed Wifi and Powerline Network with Airport Express

    Can anyone help set up a network using both wifi and ethernet? I currently have a BT Home Hub ADSL router providing wifi throughout my house and 2 airport expresses to stream music from my iMac.  The problem is that the sound occasionally drops out. 

  • Md5 using high cpu!

    md5 using high cpu, even if I disable spotlight index. version: 10.10.3 (14D87h) $ uname  -a Darwin bing-s-macbook-pro.local 14.3.0 Darwin Kernel Version 14.3.0: Thu Feb 12 18:38:33 PST 2015; root:xnu-2782.20.34~3/RELEASE_X86_64 x86_64 sudo dtruss -s

  • Import for the eclipse

    Post Author: gzofera CA Forum: JAVA hello, how do I import the web intelligence for the eclipse? there is a file that makes this war?