How to recreate HR sample schema

I installed my sample HR schema the first time during installation itself.
Now, I have lost data of the tables.
How can I re-create the HR schema without going through a new installation process and end up installing one more instance of oracle.
Thanks!

Pl post database version. Pl see the instructions in the Docs - http://download.oracle.com/docs/cd/E11882_01/server.112/e10831/toc.htm
HTH
Srini

Similar Messages

  • How could I generate sample schema's after 11g r2 installation

    Hi,
    I appreciate if anybody let me know that how could I generate sample schema's after database installation (11g r2).
    Regards,

    hello
    you can download the script in the this link
    http://www.oracle.com/technology/obe/obe1013jdev/common/files/sample_schema_scripts.zip
    or
    sqlplus /nolog
    conn / as sysdba
    @mksample.sql
    regards
    zekeriya

  • 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

  • How to recreate scott schema?

    I created customized database ,version of 11g r2 .And when I try to practice the sql performance analyzer experiment,the scott schema is just an username,no data under the schema.
    How to recreate the scott schema with the original data?

    http://www.orafaq.com/wiki/Scott

  • Installing sample schema

    Hi, Everyone,
    I would like to know how to install a sample schema in oracle 11g database.
    I have already installed oracle 11.1.0.6 on my server without the sample schema. Now i want to install the sample schemas in my database. Can anyone provide me with the steps on how to install it.
    i am following this document
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28328/installation.htm#I6806
    but the files it is mentioning .sql files for example in the hr folder i dont have this file...
    'hr_main.sql'
    i have only 'hr_code.sql'
    so i feel that something is missing somewhere.. so could you people help me in this?
    Thanks & Regards

    Can't find oe_main.sql and HR_main.sql
    HTH...

  • 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

  • How to recreate sample basic

    Hi
    We deleted sample basic after we installed Essbase (11.1.1.3). Now some users want to have sample basic available to practice. Do anyone know how to recreate sample basic in Essbase?
    Thanks

    opening the zip file it looks like all of the files are there. So from EAS create the Sample application (BSO non unicode) and then create the database Basic. Stop the application then copy all of the files in the zip into the basic directory on the server (pathing may vary based on what version you are using) but there should be an app\sample\basic directory. Then start the app and you should be good to go

  • How to recreate MDSYS schema.

    We installed Oracle Xe 10.2 on Windows Xp (850 client). Mdsys schema was dropped after Xe install. How to recreate MDSYS schemas without reinstall XE?

    I ran this script successfully with some error. But there was some invalid objects. After create mdsys I tested two sql. First sql wasn't ran. Second sql was ran successfully. I thing this method incorrect. I think, I will re-install XE edition.
    Thank you your support...
    SELECT c.IL_ADI, SDO_GEOM.SDO_CENTROID(c.geoloc, m.diminfo)
    FROM il_v113 c, user_sdo_geom_metadata m
    WHERE m.table_name = 'IL_V113';
    SELECT M.* FROM IL_V113 M WHERE SDO_RELATE(M.GEOLOC, sdo_geometry(2001,8307,sdo_point_type(28.8110549178336,41.1581182896854,null),null,null), 'mask=ANYINTERACT') = 'TRUE'

  • Problems creating a db in 11g with Sample Schemas

    For a demo I'm doing I need the sample schemas.
    I have tried to add it to my existing database using dbca, as well as creating a new database with the sample schemas. In both cases I run into a problem with insuficient priveleges. If I do not include the sample schemas I can create the db just nice with dbca, however since it is the sample schemas I need that does not help me a lot.
    below the fist part of sampleSchema.log showing up til and including the first ORA-01031: insufficient privileges just ignoring it will lead to a lot more of them showing up.
    Any suggestion how to fix this?
    TEMP
    specify password for SYSTEM as parameter 1:
    specify password for SYS as parameter 2:
    specify password for HR as parameter 3:
    specify password for OE as parameter 4:
    specify password for PM as parameter 5:
    specify password for IX as parameter 6:
    specify password for SH as parameter 7:
    specify password for BI as parameter 8:
    specify default tablespace as parameter 9:
    specify temporary tablespace as parameter 10:
    specify log file directory (including trailing delimiter) as parameter 11:
    Sample Schemas are being created ...
    DROP USER hr CASCADE
    ERROR at line 1:
    ORA-01918: user 'HR' does not exist
    DROP USER oe CASCADE
    ERROR at line 1:
    ORA-01918: user 'OE' does not exist
    DROP USER pm CASCADE
    ERROR at line 1:
    ORA-01918: user 'PM' does not exist
    DROP USER ix CASCADE
    ERROR at line 1:
    ORA-01918: user 'IX' does not exist
    DROP USER sh CASCADE
    ERROR at line 1:
    ORA-01918: user 'SH' does not exist
    DROP USER bi CASCADE
    ERROR at line 1:
    ORA-01918: user 'BI' does not exist
    specify password for HR as parameter 1:
    specify default tablespeace for HR as parameter 2:
    specify temporary tablespace for HR as parameter 3:
    specify password for SYS as parameter 4:
    specify log path as parameter 5:
    DROP USER hr CASCADE
    ERROR at line 1:
    ORA-01918: user 'HR' does not exist
    old 1: CREATE USER hr IDENTIFIED BY &pass
    new 1: CREATE USER hr IDENTIFIED BY password
    User created.
    old 1: ALTER USER hr DEFAULT TABLESPACE &tbs
    new 1: ALTER USER hr DEFAULT TABLESPACE EXAMPLE
    old 2: QUOTA UNLIMITED ON &tbs
    new 2: QUOTA UNLIMITED ON EXAMPLE
    User altered.
    old 1: ALTER USER hr TEMPORARY TABLESPACE &ttbs
    new 1: ALTER USER hr TEMPORARY TABLESPACE TEMP
    User altered.
    Grant succeeded.
    Grant succeeded.
    ERROR:
    ORA-01031: insufficient privileges
    Warning: You are no longer connected to ORACLE.
    SP2-0640: Not connected

    Hi;
    please check Note:Is It Possible To Recreate The Example Schemas Hr And Oe? [ID 752140.1]
    Hope it helps
    Regard
    Helios

  • 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 install the sample shema (HR)

    Hi,
    I'm begining to study the class about the introduction to PL/SQL and I need the shema HR for it. But I lost it during a 'cleaning' of my PC to retrieve some place. So I created a new database named 'HR' and I tried to run the hr_* scripts that I found in .../demo/shema/human_resources/ but I can do anything ! Do you know how I can reinstall the HR schema quickly with the objets ?
    Thank you for your help, I'm very frustrated....

    You will be able to find that information here too.
    Sample Schemas Contents / Search / / PDF
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96539.pdf
    Joel P�rez

  • 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/

  • 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....

  • 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.

Maybe you are looking for