Manual Creation Of Standalone Database
Hi all,
Many a times, DBCA which is a utility for the creation of database fails due to number of reasons.In such cases we need to create the database manually by performing all the steps which is automatically performed. Also Manual creation of database gives a better control over no. of parameters if properly understood.
The steps for manual creation of database are:
1) First create a init pfile to suit your requirements by setting appropriate parameters like db_name,instance_name,control_files,background_dump_dest etc…You can use the sample parameter file available %ORACLE_HOME%/database in windows or $ORACLE_HOME/database or you can use the pfile of existing database and modify the parameters according.
2) Create a password file for the sysdba to login to the instance from the command prompt
$ orapwd file=file path for password file generally at $ORACLE_HOME/dbs/PWD
3) Start SQL*PLUS and login as sysdba with the same password as defined in orapwd.
4) Startup the instance in nomount mode using pfile defined step 1
5) Execute the create database script to create the database as shown
CREATE DATABASE
CONTROLFILE REUSE
LOGFILE
GROUP 1 (’loc for logfile group 1 member 1 ‘,’loc for logfile group 1 member 2′) SIZE 50M,
GROUP 2 (’loc for logfile group 2 member 1 ‘,’loc for logfile group 2 member 2′) SIZE 50M
DATAFILE ‘loc of datafiles/system01.dbf’ size 50M AUTOEXTEND ON NEXT 30M MAXSIZE 150M
MAXLOGFILES 100
MAXDATAFILES 100
CHARACTERSET US7ASCII
EXIT;
The output of the script should be Database created. Incase of error s check the alert_log at the location specified BACKGROUND_DUMP_DEST to find the error
6) If database creation is sucessful mount the database at the SQL prompt as shown
SQL> alter database mount;
SQL> alter database open;
7) Now u have to create tablespace for data,temp segments and undo segments when database is sucessfullly opened.
8 ) Finally you have to run catalog.sql script followed by cataproc.sql to create data dictionary views and to create oracle supplied packages and procedures as shown
SQL> @$ORACLE_HOME/rdbms/admin/catalog.sql
This may tke some time to execute and complete
SQL>@$ORACLE_HOME/rdbms/admin/catproc.sql
This will also take time.