Friday, 28 December 2012

Creting DB Manually

Hi

For Creating db manually.we need to know the first the three different modes to bring db up.
NOMOUNTbackground processes are started based on reading the spfile
MOUNTcontrol files are opened and read
OPENdata files are opened

NOMOUNTbackground processes are started based on reading the spfile
MOUNTcontrol files are opened and read
OPENdata files are opened


NOMOUNTbackground processes are started based on reading the spfile
MOUNTcontrol files are opened and read
OPENdata files are opened

NOMOUNTbackground processes are started based on reading the spfile
MOUNTcontrol files are opened and read
OPENdata files are opened
NOMOUNTbackground processes are started based on reading the spfile
MOUNTcontrol files are opened and read
OPENdata files are opened
Nomount state -- backgroup process wll be started up based on pfile/spfile
Mount state     -- control files are opened and read
open mode      -- datafiles should be open

syntax:
********************
startup nomount
startup mount
startup
********************
alter database mount;
alter database open;
alter database open read only;


Steps to create a database manually:
___________________________

1. Create a pfile initSID.ora and copy to the location $ORACLE_HOME/dbs/initSID.ora
        cp initsid.ora $ORACLE_HOME/dbs/initsid.ora

2. we nned to create a passwd file before starting up the db
$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/pwd<sid>.ora password=oracle entries=

3. sqlplus / as sysdba
        SQL> startup nomount;

4. now we have to issue the create database comand

create database test
logfile group 1 ('/path/to/redo1.log') size 100M,
            group 2 ('/path/to/redo2.log') size 100M,
            group 3 ('/path/to/redo3.log') size 100M
character set WE8ISO8859P1
national character set utf8
datafile '/path/to/system.dbf' size 500M autoextend on next 10M maxsize unlimited extent management local
sysaux datafile '/path/to/sysaux.dbf' size 100M autoextend on next 10M maxsize unlimited
undo tablespace undotbs1 datafile '/path/to/undotbs1.dbf' size 100M
default temporary tablespace temp tempfile '/path/to/temp01.dbf' size 100M;

Note: there's some other things you can do here, like "ARCHIVELOG" "SET TIME_ZONE =" and "USER SYS IDENTIFIED BY password" and "USER SYSTEM IDENTIFIED BY password"

Link:
http://www.dba-oracle.com/oracle_create_database.htm

No comments:

Post a Comment