Oracle Database

 

+

Search Tips   |   Advanced Search

 

Contents

  1. Overview
  2. SQL Overview
  3. SQL Examples
  4. Control Files
  5. MOD_PLSQL
  6. Regular Expressions
  7. Intelligent Agent
  8. Create a Database
  9. DDL Generation

 


 

Create a Database

The following is an example of how to create a database called "intra".

  1. Set ORACLE_SID

    ORACLE_SID=intra
    export ORACLE_SID
  2. Put the following init file in $ORACLE_HOME/dbs:

    initintra.ora
  3. Edit initintra.ora:

    • Change directory paths to reflect your directory paths

    • Comment out the line that contains:
      rollback_segments=(r01, r02, r03, r04)
  4. Edit cr_intra.sql and crdb2intra.sql, changing directory paths to reflect your directory paths

  5. Log on to Oracle:

    sqlplus /nolog
    connect / as sysdba;

  6. Create the database:

    @cr_intra.sql

  7. Create packages and other objects:

    @crdb2intra.sql

  8. Shutdown database

    shutdown

  9. Edit initintra.ora, uncommenting the "rollback_segment..." line

  10. Restart database

    sqlplus /nolog
    startup


 

 

DDL Generation

You can use cre_all.sql to generate DDL from current running Oracle instances. In order to use, first have loaded the pkg_support package:

sqlplus acme/acme_d @/home/oracle/sql/cre_all.sql

Files are written to:

/home/oracle/ddl/dev/tbl
                      /trg
                      /pky
                      /seq
                      /view


 

Home