create database databasename
create database orclmaxinstances 1maxlogfiles 8datafile '$ORACLE_HOME/dbs/orcl_syst_01.dbf' size 40M reuselogfile'$ORACLE_HOME/dbs/orcl_redo_01.dbf' size 1M reuse,'$ORACLE_HOME/dbs/orcl_redo_02.dbf' size 1M reuse,'$ORACLE_HOME/dbs/orcl_redo_03.dbf' size 1M reuse; @$ORACLE_HOME/rdbms/admin/catalog.sql create tablespace rollbackdatafile '$ORACLE_HOME/dbs/orcl_roll_01.dbf' size 8.5M reuse; create tablespace tempdatafile '$ORACLE_HOME/dbs/orcl_temp_01.dbf' size 5M reuse temporary; create tablespace usersdatafile '$ORACLE_HOME/dbs/orcl_user_01.dbf' size 10M reuse; create rollback segment r1 tablespace rollbackstorage ( optimal 5M ); alter rollback segment r1 online; connect system/manager @$ORACLE_HOME/rdbms/admin/catdbsyn.sql connect internal @$ORACLE_HOME/rdbms/admin/catproc.sql connect system/manager @$ORACLE_HOME/sqlplus/admin/pupbld.sql spool off exit
There are two ways to create a new database: We can use the database configuration assistant (DBCA) tools to create a new database interactively. We can use the "create database" statement to create a database manually.