Home  Easy-Code   Forum    Updater 


Not signed in (Sign In)
    • CommentAuthorbrother2
    • CommentTimeApr 2nd 2012
     
    Do the following steps to create a database,
    1. create an init ora file and place it in ORACLE_HOME/dbs directory
    2. create appropriate directory structures for placing the control files, the redo log files and the data files
    3. Set the export in Unix and SET in windows and do login as sysdba
    export ORACLE_SID=<NAME OF THE DATABASE TO BE CREATED>
    sqlplus "/as sysdba"
    4. run the following command,
    create database <database_name>
    maxinstances 4
    maxlogfiles 16
    maxdatafiles 4096
    national character set <national_character_set_name>
    datafile '<path>\system_01_TRIAL.dbf' size 500M REUSE
    SYSAUX DATAFILE '<path>\sysaux_01_TRIAL.dbf' SIZE 500M
    DEFAULT TEMPORARY tablespace temp_tblspc tempfile '<path>\data_files\temp_tblspc_01_trial.dbf' size 300M
    undo tablespace undo_tblspc datafile '<path>\undo_tblspc_01_trial.dbf' size 300M REUSE
    logfile
    group 1 ( '<path>\redo_logs\log_1atrial.dbf') size 100M,
    group 2 ( '<path>\redo_logs\log_2atrial.dbf') size 100M,
    character set <character set name>;

    5. log in as sysdba, run the following files located in ORACLE_HOME/rdbms/admin directory
    1) catalog.sql
    2) catproc.sql

    6. log in as system, run the following files in ORACLE_HOME/sqlplus/admin directory
    1) pupbld.sql

    database is now created. Proceed on to create the tablespaces, tables and other database objects.