Creating database manualli in 9i - urgent...
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Creating database manualli in 9i - urgent...

  1. #1
    Join Date
    Jun 2002
    Posts
    88
    Hi,

    How to create database manually in Oracle9i.Pl. send
    the scripts.

    Thanks,
    Iyyappan.M

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    Hi

    The attached script will allow you to create a fairly straight forward database, you will however have to create your init.ora and directory structure.

    Just read through the script updating the values with what suits your environment.

    SET ECHO ON

    SPOOL $ORACLE_BASE/admin/$ORACLE_SID/create/crdb$ORACLE_SID.log

    REM *
    REM * Startup the database
    REM *
    CONNECT internal/oracle
    STARTUP NOMOUNT PFILE='$ORACLE_BASE/admin/$ORACLE_SID/pfile/init$ORACLE_SID.ora'
    CREATE DATABASE "$ORACLE_SID"
    CONTROLFILE REUSE
    MAXINSTANCES 8
    MAXLOGFILES 32
    MAXDATAFILES 254
    CHARACTER SET "WE8ISO8859P1"
    DATAFILE
    '/$FILE_ROOT/oradata/$ORACLE_SID/system01.dbf'
    SIZE 150M REUSE
    AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
    UNDO TABLESPACE "UNDOTBS" DATAFILE '/$FILE_ROOT/oradata/$ORACLE_SID/undotbs01.dbf'
    SIZE 100M REUSE
    AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED
    LOGFILE
    GROUP 1 ('$FILE_ROOT/oradata/$ORACLE_SID/redo01a.log',
    '$FILE_ROOT/oradata/$ORACLE_SID/redo01b.log') SIZE 10M,
    GROUP 2 ('$FILE_ROOT/oradata/$ORACLE_SID/redo02a.log',
    '$FILE_ROOT/oradata/$ORACLE_SID/redo02b.log') SIZE 10M,
    GROUP 3 ('$FILE_ROOT/oradata/$ORACLE_SID/redo03a.log',
    '$FILE_ROOT/oradata/$ORACLE_SID/redo03b.log') SIZE 1M;

    ALTER DATABASE OPEN;
    SPOOL OFF

    REM *
    REM * Install data dictionary views
    REM *
    SPOOL $ORACLE_BASE/admin/$ORACLE_SID/create/catalog$ORACLE_SID.log
    @$ORACLE_HOME/rdbms/admin/catalog.sql
    @$ORACLE_HOME/rdbms/admin/catexp7.sql
    @$ORACLE_HOME/rdbms/admin/catblock.sql
    @$ORACLE_HOME/rdbms/admin/catproc.sql
    @$ORACLE_HOME/rdbms/admin/catoctk.sql
    @$ORACLE_HOME/rdbms/admin/catobtk.sql
    @$ORACLE_HOME/rdbms/admin/caths.sql
    @$ORACLE_HOME/rdbms/admin/owminst.plb
    connect system/manager
    @$ORACLE_HOME/sqlplus/admin/pupbld.sql
    SPOOL OFF

    REM * If using replication uncomment next 3 lines

    REM SPOOL $ORACLE_BASE/admin/$ORACLE_SID/create/catrep$ORACLE_SID.log
    REM @$ORACLE_HOME/rdbms/admin/catrep.sql
    REM SPOOL OFF

    REM *
    REM * Create Tablespaces
    REM *
    SPOOL $ORACLE_BASE/admin/$ORACLE_SID/create/tablespace$ORACLE_SID.log
    CREATE TABLESPACE DRSYS
    LOGGING
    DATAFILE '$FILE_ROOT/oradata/$ORACLE_SID/drsys01.dbf'
    SIZE 20M REUSE
    AUTOEXTEND ON NEXT 1M MAXSIZE 50M
    EXTENT MANAGEMENT LOCAL;

    CREATE TEMPORARY TABLESPACE TEMP
    TEMPFILE '$FILE_ROOT/oradata/$ORACLE_SID/temp01.dbf' SIZE 100M
    AUTOEXTEND ON NEXT 1M MAXSIZE 200M
    EXTENT MANAGEMENT LOCAL;
    ALTER DATABASE DEFAULT TEMPORARY TABLESPACE "TEMP";

    CREATE TABLESPACE TOOLS
    DATAFILE '$FILE_ROOT/oradata/$ORACLE_SID/tools01.dbf' SIZE 20M
    AUTOEXTEND ON NEXT 1M MAXSIZE 50M;
    EXTENT MANAGEMENT LOCAL;

    CREATE TABLESPACE TABLES
    DATAFILE '$FILE_ROOT/oradata/$ORACLE_SID/tables01.dbf' SIZE 100M
    AUTOEXTEND ON NEXT 10M MAXSIZE 200M
    EXTENT MANAGEMENT LOCAL;

    CREATE TABLESPACE INDEXES
    DATAFILE '$FILE_ROOT/oradata/$ORACLE_SID/indexes01.dbf' SIZE 100M
    AUTOEXTEND ON NEXT 10M MAXSIZE 200M
    EXTENT MANAGEMENT LOCAL;

    CREATE TABLESPACE USERS
    DATAFILE '$FILE_ROOT/oradata/$ORACLE_SID/users01.dbf' SIZE 10M
    AUTOEXTEND ON NEXT 1M MAXSIZE 20M
    EXTENT MANAGEMENT LOCAL;
    SPOOL OFF

    REM *
    REM * Post creation steps
    REM *
    SPOOL $ORACLE_BASE/admin/$ORACLE_SID/create/post$ORACLE_SID.log
    ALTER USER SYS
    TEMPORARY TABLESPACE TEMP;

    ALTER USER SYSTEM
    DEFAULT TABLESPACE TOOLS
    TEMPORARY TABLESPACE TEMP;

    CREATE SPFILE='$ORACLE_HOME/dbs/spfile$ORACLE_SID.ora' FROM PFILE='$ORACLE_BASE/admin/$ORACLE_SID/pfile/init$ORACLE_SID.ora';

    CONNECT sys/change_on_install as SYSDBA
    shutdown;
    STARTUP NOMOUNT PFILE='$ORACLE_BASE/admin/$ORACLE_SID/pfile/init$ORACLE_SID.ora';
    ALTER DATABASE ARCHIVELOG;;
    ALTER DATABASE OPEN;;
    ALTER SYSTEM ARCHIVE LOG START;;
    SPOOL OFF

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  3. #3
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    Hello;
    You need no scripts to be send, because the database assistant is waiting for you to create an initial DB-CreateFile which you can modify after your oen demands.

    With win2K you can start it ... ( in YOUR OracleHome )

    E:\oracle\ora90\BIN\launch.exe E:\oracle\ora90\assistants\dbca dbca.cl

    Orca

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width