Oracle Database

 

+

Search Tips   |   Advanced Search

 

Contents

  1. Oracle9i Overview
  2. Oracle 9i Install
  3. SQL Overview
  4. SQL Examples
  5. Control Files
  6. MOD_PLSQL
  7. Regular Expressions
  8. Intelligent Agent
  9. Create a Database
  10. 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