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

Oracle Discussion :

[8i] Création de base


Sujet :

Oracle

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Rédacteur

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    2 320
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 2 320
    Par défaut [8i] Création de base
    Bonjour je chercher un script type de création de base pour une 8i

    Merci

    Jaouad

  2. #2
    Membre éclairé

    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Mars 2003
    Messages
    701
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2003
    Messages : 701
    Billets dans le blog
    1
    Par défaut
    salut jaouad

    ci-joint les scripts que j' utilise pour creer mes bases sous windows2000


    crdb.sql :

    spool d:\maew\log\crdbmaew.log
    set echo on
    connect INTERNAL/oracle
    startup nomount
    CREATE DATABASE maew
    LOGFILE
    group 1 ( 'd:\maew\oradata\maewlog11.log', 'e:\maew\oradata\maewlog12.log' ) SIZE 5M ,
    group 2 ( 'd:\maew\oradata\maewlog21.log', 'e:\maew\oradata\maewlog22.log' ) SIZE 5M ,
    group 3 ( 'd:\maew\oradata\maewlog31.log', 'e:\maew\oradata\maewlog32.log' ) SIZE 5M
    MAXLOGFILES 4
    MAXLOGMEMBERS 3
    MAXLOGHISTORY 1
    DATAFILE 'e:\maew\oradata\maewsyst' SIZE 80M autoextend on next 10M maxsize 200M
    MAXDATAFILES 254
    MAXINSTANCES 1
    CHARACTER SET WE8ISO8859P15
    NATIONAL CHARACTER SET WE8ISO8859P15;
    spool off

    crdb2.sql
    SPOOL d:\maew\log\CreateTS_maew.log
    CONNECT INTERNAL/oracle
    @d:\oracle\ora81\rdbms\admin\catalog.sql
    @d:\oracle\ora81\rdbms\admin\catproc.sql
    @d:\oracle\ora81\Rdbms\admin\caths.sql
    @d:\oracle\ora81\rdbms\admin\catexp7.sql
    @d:\oracle\ora81\rdbms\admin\catrep.sql
    CONNECT SYSTEM/MANAGER
    @d:\oracle\ora81\sqlplus\admin\pupbld.sql
    CREATE PUBLIC ROLLBACK SEGMENT RBSYST;
    ALTER ROLLBACK SEGMENT RBSYST ONLINE;

    CREATE TABLESPACE MAELISDON
    DATAFILE 'E:\maew\oradata\DON1MAEW.TBS' SIZE 600M
    AUTOEXTEND ON NEXT 50M maxsize 1500M
    DEFAULT STORAGE( INITIAL 50K
    NEXT 50K
    MINEXTENTS 1
    MAXEXTENTS 149
    PCTINCREASE 0)
    ONLINE;

    CREATE TABLESPACE MAELISIND
    DATAFILE 'E:\maeW\oradata\ind1maew.TBS' SIZE 500M
    AUTOEXTEND ON NEXT 50M maxsize 1500M
    DEFAULT STORAGE( INITIAL 50K
    NEXT 50K
    MINEXTENTS 1
    MAXEXTENTS 149
    PCTINCREASE 0)
    ONLINE;


    CREATE TABLESPACE RBS
    DATAFILE 'E:\maew\oradata\maewrbs01.TBL' SIZE 100M
    AUTOEXTEND ON NEXT 10M maxsize 300M
    DEFAULT STORAGE (INITIAL 1M
    NEXT 1M
    MINEXTENTS 2
    MAXEXTENTS 50
    PCTINCREASE 0)
    ONLINE;

    CREATE TABLESPACE TEMP
    DATAFILE 'E:\maew\oradata\maewtemp01.TBL' SIZE 80M
    AUTOEXTEND ON NEXT 10M MAXSIZE 300M
    TEMPORARY
    ONLINE;


    CREATE PUBLIC ROLLBACK SEGMENT RB01
    STORAGE(INITIAL 2M NEXT 2M MINEXTENTS 3 OPTIMAL 6M) TABLESPACE RBS;
    CREATE PUBLIC ROLLBACK SEGMENT RB02
    STORAGE(INITIAL 2M NEXT 2M MINEXTENTS 3 OPTIMAL 6M) TABLESPACE RBS;
    CREATE PUBLIC ROLLBACK SEGMENT RB03
    STORAGE(INITIAL 2M NEXT 2M MINEXTENTS 3 OPTIMAL 6M) TABLESPACE RBS;
    CREATE PUBLIC ROLLBACK SEGMENT RB04
    STORAGE(INITIAL 2M NEXT 2M MINEXTENTS 3 OPTIMAL 6M) TABLESPACE RBS;
    CREATE PUBLIC ROLLBACK SEGMENT RB05
    STORAGE(INITIAL 2M NEXT 2M MINEXTENTS 3 OPTIMAL 6M) TABLESPACE RBS;
    CREATE PUBLIC ROLLBACK SEGMENT RB06
    STORAGE(INITIAL 2M NEXT 2M MINEXTENTS 3 OPTIMAL 6M) TABLESPACE RBS;
    CREATE PUBLIC ROLLBACK SEGMENT RB07
    STORAGE(INITIAL 2M NEXT 2M MINEXTENTS 3 OPTIMAL 6M) TABLESPACE RBS;
    CREATE PUBLIC ROLLBACK SEGMENT RB08
    STORAGE(INITIAL 2M NEXT 2M MINEXTENTS 3 OPTIMAL 6M) TABLESPACE RBS;
    CREATE PUBLIC ROLLBACK SEGMENT RB09
    STORAGE(INITIAL 2M NEXT 2M MINEXTENTS 3 OPTIMAL 6M) TABLESPACE RBS;

    ALTER ROLLBACK SEGMENT RB01 ONLINE;
    ALTER ROLLBACK SEGMENT RB02 ONLINE;
    ALTER ROLLBACK SEGMENT RB03 ONLINE;
    ALTER ROLLBACK SEGMENT RB04 ONLINE;
    ALTER ROLLBACK SEGMENT RB05 ONLINE;
    ALTER ROLLBACK SEGMENT RB06 ONLINE;
    ALTER ROLLBACK SEGMENT RB07 ONLINE;
    ALTER ROLLBACK SEGMENT RB08 ONLINE;
    ALTER ROLLBACK SEGMENT RB09 ONLINE;
    ALTER ROLLBACK SEGMENT RBSYST OFFLINE;


    SPOOL OFF
    EXIT

    cdlt


  3. #3
    Rédacteur

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    2 320
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 2 320
    Par défaut
    Merci Ducho , je suis en train de faire des scripts SH pour une création automatique
    Pourquoi n'incorpore tu pas ce script à la création :

    @$ORACLE_HOME/rdbms/admin/catrep.sql
    jaouad

  4. #4
    Membre éclairé

    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Mars 2003
    Messages
    701
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2003
    Messages : 701
    Billets dans le blog
    1
    Par défaut
    dans l' exemple cité, il y est !!!

    normalement je ne l' insére que dans les bases succeptibles d' être
    repliquées, sinon il n' est pas utile .

  5. #5
    Membre éclairé

    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Mars 2003
    Messages
    701
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2003
    Messages : 701
    Billets dans le blog
    1
    Par défaut
    Autre script sous unix emprunté à un collegue !



    svrmgrl mode=line <<END1
    spool /oracle/oracle8/oradata/BANDES/crebase.log

    connect internal
    startup nomount pfile=$ORACLE_HOME/dbs/initBANDES.ora

    CREATE DATABASE BANDES
    CONTROLFILE REUSE
    ARCHIVELOG
    MAXINSTANCES 8
    MAXLOGFILES 32
    datafile
    '/oracle/oracle8/oradata/BANDES/system.dbf' SIZE 80M
    MAXDATAFILES 254
    logfile
    group 1
    '/oracle/oracle8/oradata/BANDES/log11bandes.log' SIZE 1M,
    '/oracle/oracle8/oradata/BANDES/log12bandes.log' SIZE 1M,
    '/oracle/oracle8/oradata/BANDES/log13bandes.log' SIZE 1M
    CHARACTER SET WE8ISO8859P15;

    @/oracle/oracle8/app/oracle/product/817/rdbms/admin/catalog.sql
    @/oracle/oracle8/app/oracle/product/817/rdbms/admin/catproc.sql
    @/oracle/oracle8/app/oracle/product/817/rdbms/admin/catexp7.sql
    @/oracle/oracle8/app/oracle/product/817/rdbms/admin/caths.sql

    ALTER TABLESPACE SYSTEM
    DEFAULT STORAGE (INITIAL 64K NEXT 64K MINEXTENTS 1 MAXEXTENTS 254 PCTINCREASE 20);

    create rollback segment RBSTEMP tablespace SYSTEM
    storage (initial 16k next 16k minextents 2 maxextents 20);

    CREATE TABLESPACE bandes datafile
    '/oracle/oracle8/oradata/BANDES/bandes.dbf' SIZE 2M
    DEFAULT STORAGE (INITIAL 128K NEXT 128K MINEXTENTS 1 MAXEXTENTS 100
    PCTINCREASE 0);

    CREATE TABLESPACE tools datafile
    '/oracle/oracle8/oradata/BANDES/tools01.dbf' SIZE 5M
    DEFAULT STRORAGE (INITIAL 128K NEXT 128K MINEXTENTS 1 MAXEXTENTS 100
    PCTINCREASE 0);

    CREATE TABLESPACE temp datafile
    '/oracle/oracle8/oradata/BANDES/temp01.dbf' SIZE 20M
    DEFAULT STORAGE (INITIAL 128K NEXT 128K MINEXTENTS 1 MAXEXTENTS 100
    PCTINCREASE 0);

    CREATE TABLESPACE index datafile
    '/oracle/oracle8/oradata/BANDES/index01.dbf' SIZE 2M
    DEFAULT STORAGE (INITIAL 128K NEXT 128K MINEXTENTS 1 MAXEXTENTS 100
    PCTINCREASE 0);

    CREATE TABLESPACE rbs datafile
    '/oracle/oracle8/oradata/BANDES/bandes_rbs.dbf' SIZE 10M
    MINIMUM EXTENT 512K
    DEFAULT STORAGE (INITIAL 512K NEXT 512K MINEXTENTS 8 MAXEXTENTS 4096
    PCTINCREASE 10);

    create public rollback segment rbs1 tablespace rbs
    storage (optimal 4096K);

    create public rollback segment rbs2 tablespace rbs
    storage (optimal 4096K);

    alter rollback segment rbs1 online;
    alter rollback segment rbs2 online;

    alter user sys temporary tablespace TEMP;
    alter user system temporary tablespace TEMP;

    connect system/manager
    @/oracle/oracle8/app/oracle/product/817/sqlplus/admin/pupbld.sql

    spool off
    exit

    END1

  6. #6
    Rédacteur

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    2 320
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 2 320
    Par défaut
    excuse moi mauvais copier/coller

    je voulais parler de catblock , mais n'est il pas inclut dans catalog ?

    je vais voir

    Jaouad

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. création de base mySQL avec python
    Par preacher_man dans le forum Bibliothèques tierces
    Réponses: 7
    Dernier message: 23/06/2006, 19h38
  2. Script de création de base
    Par andlio dans le forum Oracle
    Réponses: 20
    Dernier message: 20/07/2005, 13h39
  3. [MFC][DataBase]Création de base Access
    Par Nicolas Bauland dans le forum MFC
    Réponses: 5
    Dernier message: 20/04/2005, 21h04
  4. Réponses: 1
    Dernier message: 17/06/2004, 17h44
  5. Réponses: 3
    Dernier message: 24/10/2003, 21h46

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