CREATE DATA BASE

CREATE DATA BASE

(1) you must be logged in as SYS with SYSDBA privilege invoked.

(2) you must have edited initmynewdb.ora file to spawn an oracle instance

(3) and you started the oracle instance in nomount mode.

(4) after the database is created you are also to create the medata and plsql packages

Example

connect / as sysdba

startup nomount pfile=$ORACLE_HOME/dbs/initmynewdb.ora

CREATE DATABASE mynewdb

USER SYS IDENTIFIED BY pz6r58

USER SYSTEM IDENTIFIED BY y1tz5p

LOGFILE GROUP 1 ('/u01/oracle/oradata/mynewdb/redo01.log') SIZE 100M,

GROUP 2 ('/u01/oracle/oradata/mynewdb/redo02.log') SIZE 100M,

GROUP 3 ('/u01/oracle/oradata/mynewdb/redo03.log') SIZE 100M

MAXLOGFILES 5

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 100

MAXINSTANCES 1

CHARACTER SET US7ASCII

NATIONAL CHARACTER SET AL16UTF16

DATAFILE '/u01/oracle/oradata/mynewdb/system01.dbf' SIZE 325M REUSE

EXTENT MANAGEMENT LOCAL

SYSAUX DATAFILE '/u01/oracle/oradata/mynewdb/sysaux01.dbf' SIZE 325M REUSE

DEFAULT TABLESPACE tbs_1 datafile '/u01/oracle/oradata/mynewdb/tbs_1_01.dbf' SIZE 325M REUSE

DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE '/u01/oracle/oradata/mynewdb/temp01.dbf' SIZE 20M REUSE

UNDO TABLESPACE undotbs DATAFILE '/u01/oracle/oradata/mynewdb/undotbs01.dbf'SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

@?/rdbms/admin/catalog.sql

@?/rdbms/admin/catproc.sql

--- then create the required tablespaces

--- then create users and assign quotas on the tablespaces to all those users.

Related Posts: