10g Sample Schema code missing

Hi...On installation of 10g db (10.1.0.2.0), the expected sample schemas are not provided.
I have tried multiple installs in order to try and extract the sql scripts.
e.g. hr_main.sql, oe_main.sql and bi_main.sql.
These sample schemas are not the same as the 9i sample schemas, which can be accessed in text format in existing documentation for 9i.
Does anyone know where the actual scripts can be accessed other than from installation CDs and dowloaded installation...as neither provide the necessary scripts for the sample schemas?
Thanks,
Tony

i am also having same problem.
some one will provide the right info for you but you can try this too:
SQL> ALTER USER HR IDENTIFIED BY <password> account unlock;
User altered.
SQL> connect hr/<password>@<connection string/SID>;
Connected.
SQL> desc employees;
Name                                      Null?    Type
EMPLOYEE_ID                               NOT NULL NUMBER(6)
FIRST_NAME                                         VARCHAR2(20)
LAST_NAME                                 NOT NULL VARCHAR2(25)
EMAIL                                     NOT NULL VARCHAR2(25)
PHONE_NUMBER                                       VARCHAR2(20)
HIRE_DATE                                 NOT NULL DATE
JOB_ID                                    NOT NULL VARCHAR2(10)
SALARY                                             NUMBER(8,2)
COMMISSION_PCT                                     NUMBER(2,2)
MANAGER_ID                                         NUMBER(6)
DEPARTMENT_ID                                      NUMBER(4)
SQL> select * from employees;
EMPLOYEE_ID FIRST_NAME           LAST_NAME
EMAIL                     PHONE_NUMBER         HIRE_DATE JOB_ID         SALARY
COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
        198 Donald               OConnell
DOCONNEL                  650.507.9833         21-JUN-99 SH_CLERK         2600
                      124            50
        199 Douglas              Grant
DGRANT                    650.507.9844         13-JAN-00 SH_CLERK         2600
                      124            50
        200 Jennifer             Whalen
JWHALEN                   515.123.4444         17-SEP-87 AD_ASST          4400
                      101            10
        201 Michael              Hartstein
MHARTSTE                  515.123.5555         17-FEB-96 MK_MAN          13000
                      100            20
        202 Pat                  Fay
PFAY                      603.123.6666         17-AUG-97 MK_REP           6000
                      201            20
        203 Susan                Mavris
SMAVRIS                   515.123.7777         07-JUN-94 HR_REP           6500
                      101            40
        204 Hermann              Baer
HBAER                     515.123.8888         07-JUN-94 PR_REP          10000
                      101            70
        205 Shelley              Higgins
SHIGGINS                  515.123.8080         07-JUN-94 AC_MGR          12000
                      101           110
        206 William              Gietz
WGIETZ                    515.123.8181         07-JUN-94 AC_ACCOUNT       8300
                      205           110
        100 Steven               King
SKING                     515.123.4567         17-JUN-87 AD_PRES         24000
                                     90
        101 Neena                Kochhar
NKOCHHAR                  515.123.4568         21-SEP-89 AD_VP           17000
                      100            90
        102 Lex                  De Haan
LDEHAAN                   515.123.4569         13-JAN-93 AD_VP           17000
                      100            90
        103 Alexander            Hunold
AHUNOLD                   590.423.4567         03-JAN-90 IT_PROG          9000
                      102            60
        104 Bruce                Ernst
BERNST                    590.423.4568         21-MAY-91 IT_PROG          6000
                      103            60
        105 David                Austin
DAUSTIN                   590.423.4569         25-JUN-97 IT_PROG          4800
                      103            60
        106 Valli                Pataballa
VPATABAL                  590.423.4560         05-FEB-98 IT_PROG          4800
                      103            60
        107 Diana                Lorentz
DLORENTZ                  590.423.5567         07-FEB-99 IT_PROG          4200
                      103            60
        108 Nancy                Greenberg
NGREENBE                  515.124.4569         17-AUG-94 FI_MGR          12000
                      101           100
        109 Daniel               Faviet
DFAVIET                   515.124.4169         16-AUG-94 FI_ACCOUNT       9000
                      108           100
        110 John                 Chen
JCHEN                     515.124.4269         28-SEP-97 FI_ACCOUNT       8200
                      108           100
        111 Ismael               Sciarra
ISCIARRA                  515.124.4369         30-SEP-97 FI_ACCOUNT       7700
                      108           100
        112 Jose Manuel          Urman
JMURMAN                   515.124.4469         07-MAR-98 FI_ACCOUNT       7800
                      108           100
        113 Luis                 Popp
LPOPP                     515.124.4567         07-DEC-99 FI_ACCOUNT       6900
                      108           100
        114 Den                  Raphaely
EMPLOYEE_ID FIRST_NAME           LAST_NAME
EMAIL                     PHONE_NUMBER         HIRE_DATE JOB_ID         SALARY
COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
DRAPHEAL                  515.127.4561         07-DEC-94 PU_MAN          11000
                      100            30
        115 Alexander            Khoo
AKHOO                     515.127.4562         18-MAY-95 PU_CLERK         3100
                      114            30
        116 Shelli               Baida
SBAIDA                    515.127.4563         24-DEC-97 PU_CLERK         2900
                      114            30
        117 Sigal                Tobias
STOBIAS                   515.127.4564         24-JUL-97 PU_CLERK         2800
                      114            30
        118 Guy                  Himuro
GHIMURO                   515.127.4565         15-NOV-98 PU_CLERK         2600
                      114            30
        119 Karen                Colmenares
KCOLMENA                  515.127.4566         10-AUG-99 PU_CLERK         2500
                      114            30
        120 Matthew              Weiss
MWEISS                    650.123.1234         18-JUL-96 ST_MAN           8000
                      100            50
        121 Adam                 Fripp
AFRIPP                    650.123.2234         10-APR-97 ST_MAN           8200
                      100            50
        122 Payam                Kaufling
PKAUFLIN                  650.123.3234         01-MAY-95 ST_MAN           7900
                      100            50
        123 Shanta               Vollman
SVOLLMAN                  650.123.4234         10-OCT-97 ST_MAN           6500
                      100            50
        124 Kevin                Mourgos
KMOURGOS                  650.123.5234         16-NOV-99 ST_MAN           5800
                      100            50
        125 Julia                Nayer
JNAYER                    650.124.1214         16-JUL-97 ST_CLERK         3200
                      120            50
        126 Irene                Mikkilineni
IMIKKILI                  650.124.1224         28-SEP-98 ST_CLERK         2700
                      120            50
        127 James                Landry
JLANDRY                   650.124.1334         14-JAN-99 ST_CLERK         2400
                      120            50
        128 Steven               Markle
SMARKLE                   650.124.1434         08-MAR-00 ST_CLERK         2200
                      120            50
        129 Laura                Bissot
LBISSOT                   650.124.5234         20-AUG-97 ST_CLERK         3300
                      121            50
        130 Mozhe                Atkinson
MATKINSO                  650.124.6234         30-OCT-97 ST_CLERK         2800
                      121            50
        131 James                Marlow
JAMRLOW                   650.124.7234         16-FEB-97 ST_CLERK         2500
                      121            50
        132 TJ                   Olson
TJOLSON                   650.124.8234         10-APR-99 ST_CLERK         2100
                      121            50
        133 Jason                Mallin
JMALLIN                   650.127.1934         14-JUN-96 ST_CLERK         3300
                      122            50
        134 Michael              Rogers
MROGERS                   650.127.1834         26-AUG-98 ST_CLERK         2900
                      122            50
        135 Ki                   Gee
KGEE                      650.127.1734         12-DEC-99 ST_CLERK         2400
                      122            50
        136 Hazel                Philtanker
HPHILTAN                  650.127.1634         06-FEB-00 ST_CLERK         2200
                      122            50
        137 Renske               Ladwig
RLADWIG                   650.121.1234         14-JUL-95 ST_CLERK         3600
EMPLOYEE_ID FIRST_NAME           LAST_NAME
EMAIL                     PHONE_NUMBER         HIRE_DATE JOB_ID         SALARY
COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
                      123            50
        138 Stephen              Stiles
SSTILES                   650.121.2034         26-OCT-97 ST_CLERK         3200
                      123            50
        139 John                 Seo
JSEO                      650.121.2019         12-FEB-98 ST_CLERK         2700
                      123            50
        140 Joshua               Patel
JPATEL                    650.121.1834         06-APR-98 ST_CLERK         2500
                      123            50
        141 Trenna               Rajs
TRAJS                     650.121.8009         17-OCT-95 ST_CLERK         3500
                      124            50
        142 Curtis               Davies
CDAVIES                   650.121.2994         29-JAN-97 ST_CLERK         3100
                      124            50
        143 Randall              Matos
RMATOS                    650.121.2874         15-MAR-98 ST_CLERK         2600
                      124            50
        144 Peter                Vargas
PVARGAS                   650.121.2004         09-JUL-98 ST_CLERK         2500
                      124            50
        145 John                 Russell
JRUSSEL                   011.44.1344.429268   01-OCT-96 SA_MAN          14000
            .4        100            80
        146 Karen                Partners
KPARTNER                  011.44.1344.467268   05-JAN-97 SA_MAN          13500
            .3        100            80
        147 Alberto              Errazuriz
AERRAZUR                  011.44.1344.429278   10-MAR-97 SA_MAN          12000
            .3        100            80
        148 Gerald               Cambrault
GCAMBRAU                  011.44.1344.619268   15-OCT-99 SA_MAN          11000
            .3        100            80
        149 Eleni                Zlotkey
EZLOTKEY                  011.44.1344.429018   29-JAN-00 SA_MAN          10500
            .2        100            80
        150 Peter                Tucker
PTUCKER                   011.44.1344.129268   30-JAN-97 SA_REP          10000
            .3        145            80
        151 David                Bernstein
DBERNSTE                  011.44.1344.345268   24-MAR-97 SA_REP           9500
           .25        145            80
        152 Peter                Hall
PHALL                     011.44.1344.478968   20-AUG-97 SA_REP           9000
           .25        145            80
        153 Christopher          Olsen
COLSEN                    011.44.1344.498718   30-MAR-98 SA_REP           8000
            .2        145            80
        154 Nanette              Cambrault
NCAMBRAU                  011.44.1344.987668   09-DEC-98 SA_REP           7500
            .2        145            80
        155 Oliver               Tuvault
OTUVAULT                  011.44.1344.486508   23-NOV-99 SA_REP           7000
           .15        145            80
        156 Janette              King
JKING                     011.44.1345.429268   30-JAN-96 SA_REP          10000
           .35        146            80
        157 Patrick              Sully
PSULLY                    011.44.1345.929268   04-MAR-96 SA_REP           9500
           .35        146            80
        158 Allan                McEwen
AMCEWEN                   011.44.1345.829268   01-AUG-96 SA_REP           9000
           .35        146            80
        159 Lindsey              Smith
LSMITH                    011.44.1345.729268   10-MAR-97 SA_REP           8000
            .3        146            80
        160 Louise               Doran
LDORAN                    011.44.1345.629268   15-DEC-97 SA_REP           7500
            .3        146            80
EMPLOYEE_ID FIRST_NAME           LAST_NAME
EMAIL                     PHONE_NUMBER         HIRE_DATE JOB_ID         SALARY
COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
        161 Sarath               Sewall
SSEWALL                   011.44.1345.529268   03-NOV-98 SA_REP           7000
           .25        146            80
        162 Clara                Vishney
CVISHNEY                  011.44.1346.129268   11-NOV-97 SA_REP          10500
           .25        147            80
        163 Danielle             Greene
DGREENE                   011.44.1346.229268   19-MAR-99 SA_REP           9500
           .15        147            80
        164 Mattea               Marvins
MMARVINS                  011.44.1346.329268   24-JAN-00 SA_REP           7200
            .1        147            80
        165 David                Lee
DLEE                      011.44.1346.529268   23-FEB-00 SA_REP           6800
            .1        147            80
        166 Sundar               Ande
SANDE                     011.44.1346.629268   24-MAR-00 SA_REP           6400
            .1        147            80
        167 Amit                 Banda
ABANDA                    011.44.1346.729268   21-APR-00 SA_REP           6200
            .1        147            80
        168 Lisa                 Ozer
LOZER                     011.44.1343.929268   11-MAR-97 SA_REP          11500
           .25        148            80
        169 Harrison             Bloom
HBLOOM                    011.44.1343.829268   23-MAR-98 SA_REP          10000
            .2        148            80
        170 Tayler               Fox
TFOX                      011.44.1343.729268   24-JAN-98 SA_REP           9600
            .2        148            80
        171 William              Smith
WSMITH                    011.44.1343.629268   23-FEB-99 SA_REP           7400
           .15        148            80
        172 Elizabeth            Bates
EBATES                    011.44.1343.529268   24-MAR-99 SA_REP           7300
           .15        148            80
        173 Sundita              Kumar
SKUMAR                    011.44.1343.329268   21-APR-00 SA_REP           6100
            .1        148            80
        174 Ellen                Abel
EABEL                     011.44.1644.429267   11-MAY-96 SA_REP          11000
            .3        149            80
        175 Alyssa               Hutton
AHUTTON                   011.44.1644.429266   19-MAR-97 SA_REP           8800
           .25        149            80
        176 Jonathon             Taylor
JTAYLOR                   011.44.1644.429265   24-MAR-98 SA_REP           8600
            .2        149            80
        177 Jack                 Livingston
JLIVINGS                  011.44.1644.429264   23-APR-98 SA_REP           8400
            .2        149            80
        178 Kimberely            Grant
KGRANT                    011.44.1644.429263   24-MAY-99 SA_REP           7000
           .15        149
        179 Charles              Johnson
CJOHNSON                  011.44.1644.429262   04-JAN-00 SA_REP           6200
            .1        149            80
        180 Winston              Taylor
WTAYLOR                   650.507.9876         24-JAN-98 SH_CLERK         3200
                      120            50
        181 Jean                 Fleaur
JFLEAUR                   650.507.9877         23-FEB-98 SH_CLERK         3100
                      120            50
        182 Martha               Sullivan
MSULLIVA                  650.507.9878         21-JUN-99 SH_CLERK         2500
                      120            50
        183 Girard               Geoni
GGEONI                    650.507.9879         03-FEB-00 SH_CLERK         2800
                      120            50
EMPLOYEE_ID FIRST_NAME           LAST_NAME
EMAIL                     PHONE_NUMBER         HIRE_DATE JOB_ID         SALARY
COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
        184 Nandita              Sarchand
NSARCHAN                  650.509.1876         27-JAN-96 SH_CLERK         4200
                      121            50
        185 Alexis               Bull
ABULL                     650.509.2876         20-FEB-97 SH_CLERK         4100
                      121            50
        186 Julia                Dellinger
JDELLING                  650.509.3876         24-JUN-98 SH_CLERK         3400
                      121            50
        187 Anthony              Cabrio
ACABRIO                   650.509.4876         07-FEB-99 SH_CLERK         3000
                      121            50
        188 Kelly                Chung
KCHUNG                    650.505.1876         14-JUN-97 SH_CLERK         3800
                      122            50
        189 Jennifer             Dilly
JDILLY                    650.505.2876         13-AUG-97 SH_CLERK         3600
                      122            50
        190 Timothy              Gates
TGATES                    650.505.3876         11-JUL-98 SH_CLERK         2900
                      122            50
        191 Randall              Perkins
RPERKINS                  650.505.4876         19-DEC-99 SH_CLERK         2500
                      122            50
        192 Sarah                Bell
SBELL                     650.501.1876         04-FEB-96 SH_CLERK         4000
                      123            50
        193 Britney              Everett
BEVERETT                  650.501.2876         03-MAR-97 SH_CLERK         3900
                      123            50
        194 Samuel               McCain
SMCCAIN                   650.501.3876         01-JUL-98 SH_CLERK         3200
                      123            50
        195 Vance                Jones
VJONES                    650.501.4876         17-MAR-99 SH_CLERK         2800
                      123            50
        196 Alana                Walsh
AWALSH                    650.507.9811         24-APR-98 SH_CLERK         3100
                      124            50
        197 Kevin                Feeney
KFEENEY                   650.507.9822         23-MAY-98 SH_CLERK         3000
                      124            50
107 rows selected.
SQL> you if you want to give access permission to SYS or System do:
SQL> grant select on employees to system;
Grant succeeded.
SQL> grant select on employees to sys;
Grant succeeded.
SQL> Its just worked for me.
HTH
Edited by: sayantan chakraborty on Aug 20, 2009 12:31 PM

Similar Messages

  • Sample schemas scripts are missing from 10g (10.2.0.1.0)  on Win XP Pro(32

    Hi All!
    Sample schemas (HR, OE, PM, QS, and SH) scripts are missing from 10g (10.2.0.1.0) on Win XP Pro(32-bit)
    I have checked $ORACLE_HOME/demo/schema directory: There is subdirectory for each schema.
    The scripts are not there or only some of them scripts are installed.
    The list of correct scripts is hear:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14198/scripts.htm#sthref77
    Where to get scripts to rebuild sample schemas manually?
    Thank you

    Welcome to the forums !
    The scripts should be available in the companion directory of the CD
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14198/installation.htm#I4367
    HTH
    Srini

  • Missing Oracle Sample Schemas - How Download complete Files

    Dear DBA's
    I appreciate if someone could tell me how setup the ORACLE SAMPLE SCHEMAS, because all my demo folders in 10g and 11G
    $ORACLE_HOME/demo/schema/hr or oe or any other chema there are fiesl missing,
    for instnace looking at the Procedure in doc
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28328.pdf
    it says to run "hr_main.sql" script in folder $ORACLE_HOME/demo/schema/human_resources
    But I can't find any file"hr_main"
    then for PM Schema it's supposed to have a file pm_main.sql !!!! I can't find .....
    The same for SH (Sales History) they say to run the "sh_main.sql" but i can't find anything like "Main"
    Can you please help me to compltely setup the sample schemas ?
    Txs

    I am having the same problem.
    I am running XE and the only sample schema that exists there is HR.
    OE and SH...are not there
    I downloaded companion CD 10 minutes ago from
    http://www.oracle.com/technetwork/database/10201winsoft-095341.html
    and searched through the whole companion and no
    files like :
    sh_main.sql
    mksample
    nothing!
    User Steve Callan placed a data pump file on
    http://www.dbasupport.com/oracle/ora11g/Installing-Oracle-Database-Sample-Schemas-using-Data-Pump.shtml
    but he created it without version parameter, so people who are running data pum from older versions cannot import it.
    I made a comment on the article he posted .
    user13106173 pointed out a link where you can get OE and HR, but I need SH sample schema as well
    So please can somebody direct me to anyplace I can get ALL THE Sample schemas

  • Oracle 11g Rel2 Sample Schemas Missing

    I installed Oracle 11g Release 2 and created a database using DBCA. In one screen there is an option to create sample schema but it was greyed out so I could not select it.
    I searched the dbhome\demo\schema\human_resources directory but there is only one file in it -hr_code.sql(It created triggers in hr schema).
    There is no sql to create hr schema or populate schema tables. I searched the net to download the scripts but no idea where to get them. Can you help me

    josephj1989 wrote:
    I installed Oracle 11g Release 2 and created a database using DBCA. In one screen there is an option to create sample schema but it was greyed out so I could not select it.
    I searched the dbhome\demo\schema\human_resources directory but there is only one file in it -hr_code.sql(It created triggers in hr schema).
    There is no sql to create hr schema or populate schema tables. I searched the net to download the scripts but no idea where to get them. Can you help meHi,
    There are some earlier threads on this topic, see Re: MISSING ORACLE DATAUSER "HR"
    HtH
    Johan

  • Missing Type Definitions on the SAmple Schema Script

    Hi Gurus,
    The following is the script taken from Oracle 9i Sample schemas page. Here the scripts for some types ORDSYS.ORDImage, ORDSYS.ORDImageSignature,ORDSYS.ORDVideo,ORDSYS.ORDAudio,ORDSYS.ORDDoc are not given.
    Can you help me in getting those.
    CREATE TABLE online_media
    ( product_id NUMBER(6)
    , product_photo ORDSYS.ORDImage
    , product_photo_signature ORDSYS.ORDImageSignature
    , product_thumbnail ORDSYS.ORDImage
    , product_video ORDSYS.ORDVideo
    , product_audio ORDSYS.ORDAudio
    , product_text CLOB
    , product_testimonials ORDSYS.ORDDoc
    ) ;

    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/

  • Installing the sample schemas

    Hi I am new to sqlOracle
    I was trying to follow some Oracle tutorial,but i needed to install the sample schemas (OE-order entry) first
    http://www.oracle.com/technology/obe/obe1013jdev/common/OBEConnection.htm
    1. First i download the sample_schema_scripts.zip and extracted into the folder
    c:\schema that i created
    2. I start database from my database OracleEX10g
    3. go to the C:\schema that have the sql script (oe8_main.sql)
    4.use sqlplus
    5. login as system and put the password
    6. run the scripts oe8_main.sql with no problems
    7. it asked me for " specify password for oe8 as parameter 1:
    and i need to enter value for 1: which is i dont know
    8. i need to fil this value til parameter 6
    9. so i typed the value &1 for parameter 1 and &2 for parameter 2...til parameter 6
    10. it showned error:
    ERROR at line 1:
    ora-00988 : missing or invalid passwords(s)
    and user or role 'OE8" does not exist and
    ask me to enter value for database_name: which i dont know
    11. anyone can help to solve the problem and how can i know what are the passwords for 6 parameters
    12. Do i need to create my new user because i used system as a user
    13. this is the content of oe8_main.sql file attached:
    SET ECHO OFF
    PROMPT
    PROMPT specify password for oe8 as parameter 1:
    DEFINE pass = &1
    PROMPT
    PROMPT specify default tablespeace for oe8 as parameter 2:
    DEFINE tbs = &2
    PROMPT
    PROMPT specify temporary tablespace for oe8 as parameter 3:
    DEFINE ttbs = &3
    PROMPT
    PROMPT specify password for HR as parameter 4:
    DEFINE passhr = &4
    PROMPT
    PROMPT specify password for SYS as parameter 5:
    DEFINE pass_sys = &5
    PROMPT
    PROMPT specify path for log files as parameter 6:
    DEFINE log_path = &6
    PROMPT
    -- The first dot in the spool command below is
    -- the SQL*Plus concatenation character
    DEFINE spool_file = &log_path.oe8_main.log
    SPOOL &spool_file
    -- Dropping the user with all its objects
    DROP USER oe8 CASCADE;
    REM =======================================================
    REM create user
    REM
    REM The user is assigned tablespaces and quota in separate
    REM ALTER USER statements so that the CREATE USER statement
    REM will succeed even if the demo and temp tablespaces do
    REM not exist.
    REM =======================================================
    CREATE USER oe8 IDENTIFIED BY &pass;
    ALTER USER oe8 DEFAULT TABLESPACE &tbs QUOTA UNLIMITED ON &tbs;
    ALTER USER oe8 TEMPORARY TABLESPACE &ttbs;
    GRANT CONNECT TO oe8;
    GRANT RESOURCE TO oe8;
    GRANT CREATE MATERIALIZED VIEW TO oe8;
    GRANT QUERY REWRITE TO oe8;
    REM =======================================================
    REM grants from sys schema
    REM =======================================================
    rem KM: 01Aug02 - remove "AS SYSDBA" clause - NOT needed FOR GRANT
    CONNECT sys/&pass_sys&&database_name
    GRANT execute ON sys.dbms_stats TO oe8;
    REM =======================================================
    REM grants from hr8 schema
    REM =======================================================
    CONNECT hr8/&passhr&&database_name;
    GRANT REFERENCES, SELECT ON employees TO oe8;
    GRANT REFERENCES, SELECT ON countries TO oe8;
    GRANT REFERENCES, SELECT ON locations TO oe8;
    GRANT SELECT ON jobs TO oe8;
    GRANT SELECT ON job_history TO oe8;
    GRANT SELECT ON departments TO oe8;
    REM =======================================================
    REM create oe8 schema (order entry)
    REM =======================================================
    CONNECT oe8/&pass&&database_name
    ALTER SESSION SET NLS_LANGUAGE=American;
    ALTER SESSION SET NLS_TERRITORY=America;
    @@oe8_cre
    @@oe8_p_pi
    @@oe8_p_pd
    @@oe8_p_whs
    @@oe8_p_cus
    @@oe8_p_ord
    @@oe8_p_itm
    @@oe8_p_inv
    @@oe8_views
    @@oe8_comnt
    @@oe8_idx
    @@oe8_analz
    spool off

    Hi,
    HR sample schema already comes with Oracle XE, so you don't need to re-install it. Anyways ...
    C:\>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jun 22 12:58:20 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SYS@XE> @C:\oraclexe\app\oracle\product\10.2.0\server\demo\schema\human_resources\hr_main.sql;
    specify password for HR as parameter 1:
    Enter value for 1: HR -- put here some password
    specify default tablespeace for HR as parameter 2:
    Enter value for 2: USERS
    specify temporary tablespace for HR as parameter 3:
    Enter value for 3: TEMP
    specify password for SYS as parameter 4:
    Enter value for 4: MANAGER -- password that you defined at Oracle XE installation
    specify log path as parameter 5:
    Enter value for 5: C:\
    User dropped.
    old   1: CREATE USER hr IDENTIFIED BY &pass
    new   1: CREATE USER hr IDENTIFIED BY hr
    User created.
    old   1: ALTER USER hr DEFAULT TABLESPACE &tbs
    new   1: ALTER USER hr DEFAULT TABLESPACE users
    old   2:               QUOTA UNLIMITED ON &tbs
    new   2:               QUOTA UNLIMITED ON users
    User altered.
    old   1: ALTER USER hr TEMPORARY TABLESPACE &ttbs
    new   1: ALTER USER hr TEMPORARY TABLESPACE temp
    User altered.
    Grant succeeded.
    Grant succeeded.
    Connected.
    Grant succeeded.
    Connected.
    Session altered.
    Session altered.
    ******  Creating REGIONS table ....
    Table created.
    Index created.
    Table altered.
    ******  Creating COUNTRIES table ....
    Table created.
    Table altered.
    ******  Creating LOCATIONS table ....
    Table created.
    Index created.
    Table altered.
    Sequence created.
    ******  Creating DEPARTMENTS table ....
    Table created.
    Index created.
    Table altered.
    Sequence created.
    ******  Creating JOBS table ....
    Table created.
    Index created.
    Table altered.
    ******  Creating EMPLOYEES table ....
    Table created.
    Index created.
    Table altered.
    Table altered.
    Sequence created.
    ******  Creating JOB_HISTORY table ....
    Table created.
    Index created.
    Table altered.
    ******  Creating EMP_DETAILS_VIEW view ...
    View created.
    Commit complete.
    Session altered.
    ******  Populating REGIONS table ....
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    ******  Populating COUNTIRES table ....
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    ******  Populating LOCATIONS table ....
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    ******  Populating DEPARTMENTS table ....
    Table altered.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    ******  Populating JOBS table ....
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    ******  Populating EMPLOYEES table ....
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    ******  Populating JOB_HISTORY table ....
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    1 row created.
    Table altered.
    Commit complete.
    Index created.
    Index created.
    Index created.
    Index created.
    Index created.
    Index created.
    Index created.
    Index created.
    Index created.
    Index created.
    Index created.
    Commit complete.
    Procedure created.
    Trigger created.
    Trigger altered.
    Procedure created.
    Trigger created.
    Commit complete.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Comment created.
    Commit complete.
    PL/SQL procedure successfully completed.Cheers
    Legatti

  • Sample schema oe_main.sql

    Hi...Ive installed 10g db, Personal Edition and attempting to add the sample schemas HR/OE. I can find the hr_main.sql in the $ORACLE_HOME/.../demo folder. I now need the oe_main.sql to finish install of sample schemas for my purposes...
    Does anyone have a copy or know where I can get the oe_main.sql for 10g and JDeveloper sample schemas?
    Hopefully,
    TC

    Hi Lisa,
    I cant be sure that they are the same as I dont have them to compare. I do know that when running the 9i version of hr_main.sql, we are prompted with multiple parameter entries, but when using 10g version we receive no parameter entries, just successful completion. In some of the called proceudres, there have been updates e.g hr_code.sql. This is from comparison of the hr code...have no idea with the oe code. Ive since tried reinstallations of 10g and now all the expected code cant be found...
    There must be a source other than through the installation, where we can copy the same code from...similar to the 9i documentation which contained the full code in text...but then thats not Jdev but RDBMS docs...
    Thanks,
    Tony

  • Queries on samples schemas (HR, OE, SH ...)

    Hi,
    I want to measure performance of database using Oracle sample schema. But I don't have many time to create queries which take some time on CPU and so on. Is there any script (or webpage) which contain sample queries on this schemas? I will be appreciative if someone help me with it.
    Best.

    The sample schemas are intended to allow practicing and exercising specific features of the database. The purpose of each schema is described in the 'Oracle® Database Sample Schemas' manual for your database version at http://tahiti.oracle.com. (See 'Master Book list' or 'All books'.)
    Many of the examples of `how to use a feature`using these schemas will be found in the documentation (http://tahiti.oracle.com) related to the feature. For example, base queries will be found in the SQL Language Reference manual. Spatial features will be found in the Spatial Users Referrence manual. And so on.
    Other than that, many of the samples found at htp://otn.oracle.com > Sample Code assume that the samples are installed.
    Oracle university database language courses also assume the schemas are loaded. However, their sample code is not available for obvious reasons.
    In all cases the samples are not performance oriented examples, simply because Oracle's cost-based optimizer can not provide consistent performance if size or statistics change.

  • How to create 9i db without sample schema?

    I have (finally) gotten 9iR2 installed on RH 7.3.
    During installation I created sample database instance TEST.
    I then used dbca to create a second instance JSDB.
    I did not see (but may have missed) dbca questions regarding wether or not to create/load sample database schema.
    How best to create a database without the sample database schema?
    If it can not be done, how best to expunge the sample database schema and all related litter?
    There seems to be tables for SCOTT, HR, OE, SH, PM.
    Thanks
    R.Parr
    Temporal Arts

    To drop SCOTT schema, run the batch file/shell script:
    ORACLE_HOME\BIN\DEMODROP
    To drop HR schema, run SQL script:
    ORACLE_HOME\DEMO\SCHEMA\HUMAN_RESOURCES\HR_DROP.SQL
    There are a number of other sample schema scripts to drop the other schemas installed with Oracle9i. If you can't find them easily, read the Sample Schema Guide on http://tahiti.oracle.com/.
    Alison

  • 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 :(

  • Help with sample schema

    Hello. I am reading a self teaching guide called databases demystified by andy oppel. In the book it says that a sample hr schema is used to demonstrate sql. It then leads the reader to download a free trial version of oracle personal edition from otn.oracle.com. In the sample the release that is being used is 9.2.0.10 it says that once opend to go to orahome92............I am a novice user and tried to download this and it did not work. I have tried to install this many times. Is there something that I am misssing. I read something about metalink. I do not have access to that so how can I use the sample download. Im sure that he would not put that download in the book if it was not readily availible to all to use. Could someone please help me with this. Do I need something special on my computer to make it work properly? Im using a reg household computer to study with and it is running one xp. Thanks

    First of all, metalink is a paid oracle support site. Unless you dont have support from oracle, you can't access it.
    Secondly, you can simply download the oracle software either 9i or 10g from the following link.
    http://www.oracle.com/technology/software/products/database/oracle10g/index.html
    Once you install oracle software and then create database (if you are creating database through wizard, using database configuration assistant, you will have all example schemas, like HR and other). You can also find scripts to create sample schema on the following directory structure:
    oracle\ora92\demo\schema
    Jaffar

  • Script to create Sample Schemas

    Hi,
    I'd like to create sample schemas in my Oracle 11g DB.
    1) I tried to use the DBCA, but it didn't give me any option to create them for my existing db.
    2) I tried to see the scripts under \demo folder, but HR folder contained hr_code.sql script. No script for creating the tables and data.
    3) I searched the companion CD (in 10g), and couldn't know how to obtain the script from there.
    Any help is appreciated.

    Pavan,
    This script mksample.sql is not in 11g(atleast in my system).
    D:\oracle\product\11.1.0\db_1\demo\schema>dir mk*
    Volume in drive D is VAIO
    Volume Serial Number is 7476-8930
    Directory of D:\oracle\product\11.1.0\db_1\demo\schema
    06/30/2007  10:35 PM            28,262 mkplug.sql
    02/09/2008  05:34 PM             1,775 mk_dir.sql
    02/09/2008  05:34 PM             1,775 mk_dir.sql.ouibak
    08/16/2006  10:10 AM             1,648 mk_dir.sql.sbs
                   4 File(s)         33,460 bytes
                   0 Dir(s)  12,980,768,768 bytes freeI have seen it in 10g but Ahmed is using 11g.
    Cheers
    Aman....

  • Error ERR-1082 Error in executing authorization scheme code.

    Hi,
    i imported my application from test to prod environment
    when run application i received the error (on login page)
    ORA-06550: line 13, column 19: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line 12, column 13: PL/SQL: SQL Statement ignored ORA-06550: line 16, column 18: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 16, column 4: PL/SQL: Statement ignored ORA-06550: line 17, column 14: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 17, column 4: PL/SQL: Statement ignored ORA-06550: line 25, column 19: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line
    Error      ERR-1082 Error in executing authorization scheme code.
    Any help?
    Thanks in advance
    Costantino

    Hi Scott,
    Thank you for the quick reply.
    What I did was to install APEX 3.1 to 11g db, and installed packaged application which called Software Management. It is working fine to log into the application and other operations, but I got the same error which reported on this thread once I applied the existing authorization schemes. So I thought if I missed to import the apex_access_setup and apex_access_control tables. I am looking for the solution to enable the default authorizations...
    I would appreciate if you could give me any suggestions.
    Thanks,
    Rui

  • All Oracle Sample Schemas and all Oracle Built-in Packages in XE?

    Hi,
    I am trying to install Oracle 10g on my home system to improve my knowledge of PL/SQL. Because I'm doing it at home, I have to solve DBA issues I'm somewhat clueless about.
    I would like to install Oracle 10g Express Edition and include the built-in packages (DBMS_OUTPUT, UTL_FILE, DBMS_UTILITY, DBMS_JOB, DBMS_JAVA, DBMS_RANDOM, etc.) as well as the Oracle sample schemas (HR, OE, PM, SH, and IX). None of these, except HR, is included in the express edition.
    If necessary, I'd like to be able to install these things after installing the express edition. How can I do this?
    Thanks,
    Mike

    Hi Mike,
    checking the documentation is always helpful:
    http://www.oracle.com/pls/xe102/homepage
    http://download-uk.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25108/xedev_programs.htm#i2432
    You can always do a quick search on the documentation homepage, e.g. for utl_file:
    http://www.oracle.com/pls/xe102/search?remark=advanced_search&word=utl_file&format=ranked&book=&preference=
    There shouldn't be a need to install any packages. They should come preinstalled already.
    If not, you can find them here:
    C:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN
    Just be very careful before trying to install something into the data dictionary. If you are not experienced, you might mess up your database.
    For example, utl_file is installed but invisible to most users, e.g. HR.
    Look at this example:
    SQL> conn hr/oracle1
    Connect durchgef³hrt.
    SQL> desc utl_file;
    ERROR:
    ORA-04043: Objekt "SYS"."UTL_FILE" ist nicht vorhanden
    SQL> conn sys@XE as sysdba
    Kennwort eingeben:
    Connect durchgef³hrt.
    SQL> desc utl_file;
    PROCEDURE FCLOSE
    Argument Name                  Typ                     In/Out Defaultwert?
    FILE                           RECORD                  IN/OUT
       ID                           BINARY_INTEGER          IN/OUT
       DATATYPE                     BINARY_INTEGER          IN/OUT
       BYTE_MODE                    BOOLEAN                 IN/OUT
    PROCEDURE FCLOSE_ALL
    SQL> grant execute  on utl_file to HR;
    Benutzerzugriff (Grant) wurde erteilt.
    SQL> conn hr/oracle1
    Connect durchgef³hrt.
    SQL> desc utl_file;
    PROCEDURE FCLOSE
    Argument Name                  Typ                     In/Out Defaultwert?
    FILE                           RECORD                  IN/OUT
       ID                           BINARY_INTEGER          IN/OUT
       DATATYPE                     BINARY_INTEGER          IN/OUT
       BYTE_MODE                    BOOLEAN                 IN/OUT
    PROCEDURE FCLOSE_ALL
    PROCEDURE FCOPY
    ...So, after granting execute privileges on utl_file to HR, the user HR can now access utl_file. No need to install it.
    The default packages are installed in the schema SYS.
    Regards,
    ~Dietmar.

  • Sample Schema Scripts

    I have installed 10g application server and jdeveloper - but cannot find any of the scripts to create the sample schema. From searching the OTN forums it seams that the onl way of obtaing these scripts is to install the database or companion disk and run from the demo folder.
    This seems a bit over the top - i had intended to use the infrastructure database, (my system dosn't have enough resources to install a seperate database), can any helpful person email the scripts, perhaps someone from oracle might be able to make this easier there seems to be a fair bit of interest in this on the forums.
    Many thanks Terry Bennett

    Hi Terry,
    When you installed Oracle 10g, the demo tables should have been installed under the scott schema. Try select * from scott.emp and see if you get any results. Incase you are looking for the script for the demo tables, its in $ORACLE_HOME/rdbms/admin/utlsampl.sql (in my case its in C:\oracle\product\10.1.0\Db_1\RDBMS\ADMIN).
    Hope that helps.
    -Raj

Maybe you are looking for