Tuesday, February 2, 2010

Create Control File when they are lost

# Creating Controlfiles when all db files & redolog files are available

1. open database in nomount stage
2. then execute following 'create controlfile' as sysdba: (temp tablespace should be crated separately)

CREATE CONTROLFILE
reuse database "db_name"
datafile '$ORACLE_HOME/dbf/system01.dbf',
'$ORACLE_HOME/dbf/tools01.dbf',
'$ORACLE_HOME/dbf/rbs01.dbf',
'$ORACLE_HOME/dbf/indx01.dbf',
'$ORACLE_HOME/dbf/users.dbf',
logfile group 1 ('$ORACLE_HOME/log/redo01a.log','$ORACLE_HOME/log/redo01b.log') SIZE 100M,
group 2 ('$ORACLE_HOME/redo02a.log','$ORACLE_HOME/log/redo02b.log') SIZE 100M,
group 3 ('$ORACLE_HOME/log/redo03a.log','$ORACLE_HOME/log/redo03b.log') SIZE 100M
MAXDATAFILES 100
MAXLOGFILES 32
NORESETLOGS;
3. Temp datafile should be created separately using 'alter database add tempfile …' command

No comments:

Post a Comment

Your Comments on blog are strongly welcomed..