Manual Creation Of Standalone Database

On April 30, 2007, in oracle, by admin

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.ora password=password for sys entries=no. of members with sysdba priviledge

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.

 

Hi All,

In Oracle 10g flashback logs are generated in flash recovery area which can be used to go back in time in the database. This feature can be used to recover dropped table or even data from tables which might changing with time such as in OLTP applications.
These Flashback logs are designed in such a way that if there is space pressure in flash recovery area the flashback logs should be automatically deleted relieving the space.
But due to certain oracle 10g BUG flashback logs do not get automatically deleted even when space in flash recovery area is 100% full and hence to delete flashback logs the following method can be used.

1) shutdown the database using shutdown immediate

2) startup the database in mount stage

3) then fire the command

SQL> alter database flashback off;

4) Now if will see that all the flashback logs are being deleted .

If u dont need this feature u can be keep the flashback permanently off. But u need the faeture in mount stage itself you have to give
SQL> alter database flashback on;

In case of RAC to enable the flashback feature all the other instance except from the other instances from which the flashback should be enabled should be shutdown.

This will enable the flashback feature again.