IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Administration Oracle Discussion :

Comment créer les schémas de DEMO d'oracle


Sujet :

Administration Oracle

  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    750
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 750
    Par défaut Comment créer les schémas de DEMO d'oracle
    Bonjour,

    j'ai une base locale qui ne contient pas les schémas de démo d'oracle. je souhaiterai les créer.

    Dans %ORACLE_HOME%\demo\schema il y'a un script mkplug.sql qui m'a l'air de faire l'affaire mais je ne vois pas trop ce qu'il faut mettre pour les paramètres suivants:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     
    PROMPT specify INPUT metadata import file as parameter 8:
    DEFINE imp_file            = &8
    PROMPT
    PROMPT specify INPUT database backup file for tablespace EXAMPLE as parameter 9:
    DEFINE data_file_backup    = &9
    PROMPT
    PROMPT specify OUTPUT database file for tablespace EXAMPLE as parameter 10:
    DEFINE data_file_name      = &10
    PROMPT 
    PROMPT specify OUTPUT log directory as parameter 11:
    DEFINE log_path            = &11
    merci de votre aide

  2. #2
    Membre Expert Avatar de fatsora
    Profil pro
    Inscrit en
    Février 2006
    Messages
    1 103
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 1 103

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    750
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 750
    Par défaut
    j'avais déjà regardé ça mais dans $ORACLE_HOME/demo/schema/human_resources je n'ai pas de script hr_main.sql j'ai juste un script nommé hr_code.sql qui ne contient que ça:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
     
    Rem
    Rem $Header: hr_code.sql 29-aug-2002.11:44:01 hyeh Exp $
    Rem
    Rem hr_code.sql
    Rem
    Rem Copyright (c) 2001, 2002, Oracle Corporation.  All rights reserved.  
    Rem
    Rem    NAME
    Rem      hr_code.sql - Create procedural objects for HR schema
    Rem
    Rem    DESCRIPTION
    Rem      Create a statement level trigger on EMPLOYEES
    Rem      to allow DML during business hours.
    Rem      Create a row level trigger on the EMPLOYEES table,
    Rem      after UPDATES on the department_id or job_id columns.
    Rem      Create a stored procedure to insert a row into the
    Rem      JOB_HISTORY table.  Have the above row level trigger
    Rem      row level trigger call this stored procedure. 
    Rem
    Rem    NOTES
    Rem
    Rem    CREATED by Nancy Greenberg - 06/01/00
    Rem
    Rem    MODIFIED   (MM/DD/YY)
    Rem    hyeh        08/29/02 - hyeh_mv_comschema_to_rdbms
    Rem    ahunold     05/11/01 - disable
    Rem    ahunold     03/03/01 - HR simplification, REGIONS table
    Rem    ahunold     02/20/01 - Created
    Rem
     
    SET FEEDBACK 1
    SET NUMWIDTH 10
    SET LINESIZE 80
    SET TRIMSPOOL ON
    SET TAB OFF
    SET PAGESIZE 100
    SET ECHO OFF
     
    REM **************************************************************************
     
    REM procedure and statement trigger to allow dmls during business hours:
    CREATE OR REPLACE PROCEDURE secure_dml
    IS
    BEGIN
      IF TO_CHAR (SYSDATE, 'HH24:MI') NOT BETWEEN '08:00' AND '18:00'
            OR TO_CHAR (SYSDATE, 'DY') IN ('SAT', 'SUN') THEN
    	RAISE_APPLICATION_ERROR (-20205, 
    		'You may only make changes during normal office hours');
      END IF;
    END secure_dml;
    /
     
    CREATE OR REPLACE TRIGGER secure_employees
      BEFORE INSERT OR UPDATE OR DELETE ON employees
    BEGIN
      secure_dml;
    END secure_employees;
    /
     
    ALTER TRIGGER secure_employees DISABLE;
     
    REM **************************************************************************
    REM procedure to add a row to the JOB_HISTORY table and row trigger 
    REM to call the procedure when data is updated in the job_id or 
    REM department_id columns in the EMPLOYEES table:
     
    CREATE OR REPLACE PROCEDURE add_job_history
      (  p_emp_id          job_history.employee_id%type
       , p_start_date      job_history.start_date%type
       , p_end_date        job_history.end_date%type
       , p_job_id          job_history.job_id%type
       , p_department_id   job_history.department_id%type 
       )
    IS
    BEGIN
      INSERT INTO job_history (employee_id, start_date, end_date, 
                               job_id, department_id)
        VALUES(p_emp_id, p_start_date, p_end_date, p_job_id, p_department_id);
    END add_job_history;
    /
     
    CREATE OR REPLACE TRIGGER update_job_history
      AFTER UPDATE OF job_id, department_id ON employees
      FOR EACH ROW
    BEGIN
      add_job_history(:old.employee_id, :old.hire_date, sysdate, 
                      :old.job_id, :old.department_id);
    END;
    /
     
    COMMIT;

  4. #4
    Membre Expert Avatar de fatsora
    Profil pro
    Inscrit en
    Février 2006
    Messages
    1 103
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 1 103
    Par défaut
    Il faut le COMPANION CD

    a telecharger chez OTN

    apres setup

    Et la mksample.sql est dans la liste.

    ...
    http://www.idevelopment.info/data/Or...0Scripts%2010g

  5. #5
    Membre éclairé
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    750
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 750
    Par défaut
    je ne trouve pas le companion Cd sur OTN

  6. #6
    Membre Expert Avatar de fatsora
    Profil pro
    Inscrit en
    Février 2006
    Messages
    1 103
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 1 103
    Par défaut
    je ne sais comment t'aider plus

    http://www.oracle.com/technology/sof...inx64soft.html

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
     
    Oracle Database 10g Release 2 (10.2.0.1.0)
    Enterprise/Standard Edition for Microsoft Windows (x64)
     
    You must accept the OTN License Agreement to download this software.
    Accept License Agreement | Decline License Agreement
    Thank you for accepting the OTN License Agreement; you may now download this software.
     
      	Download the Complete Files
      		102010_win64_x64_database.zip (697,852,295 bytes) (cksum - 42455351)
     
      	Directions
      	  	1. Installation guides and general Oracle Database 10g documentation can be found here.
      	  	2. Review the certification matrix for this product here.
     
     
    Oracle Database 10g Companion CD Release 2 (10.2.0.1.0) (cksum - 1803913749)
      		102010_win64_x64_companion.zip (357,754,749 bytes)
      		Download latest Oracle Application Express (formerly HTML DB)
     
    Oracle Database 10g Client Release 2 (10.2.0.1.0)
      		102010_win64_x64_client.zip (506,158,858 bytes) (cksum - 741504729)
     
    Oracle Clusterware Release 2 (10.2.0.1.0)
      		102010_win64_x64_clusterware.zip (232,897,225 bytes) (cksum - 2689896475)
    C'est un exemple parmi tant d'autres ...

  7. #7
    Membre habitué
    Inscrit en
    Juin 2007
    Messages
    10
    Détails du profil
    Informations forums :
    Inscription : Juin 2007
    Messages : 10
    Par défaut
    Je pense que le script suivant doit faire l'affaire

    http://krypton.fhda.edu/~lmeade/hr_main.sql

Discussions similaires

  1. exécuter les sql du dump pour créer les schéma
    Par elkamaro dans le forum Import/Export
    Réponses: 0
    Dernier message: 04/06/2009, 12h35
  2. Réponses: 9
    Dernier message: 31/05/2009, 03h59
  3. Comment créer les champs AUDIT
    Par artacus dans le forum JDeveloper
    Réponses: 0
    Dernier message: 31/03/2009, 22h15
  4. Comment créer les menu en flash?
    Par amiraa83 dans le forum Flash
    Réponses: 1
    Dernier message: 05/05/2008, 21h35
  5. Comment créer un schéma XSD ?
    Par will2taz dans le forum VB.NET
    Réponses: 1
    Dernier message: 28/08/2007, 11h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo