Monday 7 November 2011

create database manually


Steps to Create Database Manually:
1)    Copy any existing Database Pfile to a new name. if no Database exists on this server, use Pfile of another Database which is residing on another server
2)    Open Pfile with vi editor and do necessary changes like changing Database name, dump locations etc and save it
3)    Create necessary directories as mentioned in Pfile
4)    Copy the Database creation script to the server and edit it to your need
5)    Export the SID
$ export ORACLE_SID=dev
6)    Start the instance in nomount phase using the Pfile
SQL> startup nomount;
7)    Execute create Database script
SQL> @db.sql
8)    Once Database is created , it will be opened automatically
9)    Execute the catalog.sql and catproc.sql scripts
SQL> @ $ORACLE_HOME/rdbms/admin/catalog.sql
SQL> @ $ORACLE_HOME/rdbms/admin/catproc.sql
10) Finally add this Database entry to oratab file
NOTE : Some times , we may get error  “ oracle instance terminated disconnection forced “ this is due to the reason that undo tablespace  name mentioned in Pfile is different from the one mentioned in Database creation script.

No comments:

Post a Comment