Creating database in oracle
June 23, 2011 1 Comment
In oracle, database creation can be done in two ways. We can create database automatically along with the installation and the other way is to create the database Manually. Automatic creation is the easiest way.Because all files and folders are maintained under the ORACLE_HOME directory,But for administrating all the things as a adminstrator most of the people prefer to create database by manaually.Let me explain, how to create the database manaully.
Here are the steps to create database manually,
1)Create a folder with the name of database name.
2)Create five folder under the database folder as pfile, bdump, udump,cdump, control.
3)Create a file name called init.ora in the pfile folder.
4) Create init.ora file using the following paramter and also don’t forget to save along with its extension.
5)Connect to the sql prompt using sqlplus.
SQL> Conn sys/sys as sysdba.
6)Before creating the database.Intilize the memory using the pfile at no mount stage using
SQL>startup pfile='<drive>:\<foldername>\pfile\init<dbname>.ora’ nomount.
7)And then Create the database using this statements.Edit the statement according to your creation diretory.
CREATE DATABASE <SID>
CHARACTER SET WE8ISO8859P15
NATIONAL CHARACTER SET UTF8
DATAFILE ‘<drive>:\oradata\<SID>\system01.dbf’ SIZE 2000M
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE ‘<drive>:\oradata\<SID>\sysaux01.dbf’ SIZE 120M
LOGFILE GROUP 1 (‘<drive>:\oradata\<SID>\redo01.log’) SIZE 100M,
GROUP 2 (‘<drive>:\oradata\<SID>\redo02.log’) SIZE 100M,
GROUP 3 (‘<drive>:\oradata\<SID>\redo03.log’) SIZE 100M;
It will automatically comes to the open state once when the creation gets completed.Check with the below query to conform it.
SQL> Select open_mode from v$database.
It show that the database is in read-write mode.
I hope it will be more useful to create database manaually .