Oracle Database
Contents
- Overview
- SQL Overview
- SQL Examples
- Control Files
- MOD_PLSQL
- Regular Expressions
- Intelligent Agent
- Create a Database
- DDL Generation
Create a Database
The following is an example of how to create a database called "intra".
- Set ORACLE_SID
ORACLE_SID=intra
export ORACLE_SID- Put the following init file in $ORACLE_HOME/dbs:
initintra.ora- Edit initintra.ora:
- Change directory paths to reflect your directory paths
- Comment out the line that contains:
rollback_segments=(r01, r02, r03, r04)- Edit cr_intra.sql and crdb2intra.sql, changing directory paths to reflect your directory paths
- Log on to Oracle:
sqlplus /nolog
connect / as sysdba;- Create the database:
@cr_intra.sql- Create packages and other objects:
@crdb2intra.sql- Shutdown database
shutdown- Edit initintra.ora, uncommenting the "rollback_segment..." line
- 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.sqlFiles are written to:
/home/oracle/ddl/dev/tbl /trg /pky /seq /view
Home