Oracle Database – How to create control files from scratch

Oracle Database – How to create control files from scratch

Below is an example the “Create Controlfile” commands”. 

CREATE CONTROLFILE REUSE DATABASE "TESTDB" RESETLOGS FORCE LOGGING ARCHIVELOG
 MAXLOGFILES 16
 MAXLOGMEMBERS 3
 MAXDATAFILES 100
 MAXINSTANCES 8
 MAXLOGHISTORY 292
LOGFILE
GROUP 1 ('/u01/app/oracle/oradata/testdb/redo1a.log','/u01/app/oracle/oradata/testdb/redo1b.log') SIZE 5M,
GROUP 2 ('/u01/app/oracle/oradata/testdb/redo2a.log','/u01/app/oracle/oradata/testdb/redo2b.log') SIZE 5M,
GROUP 3 ('/u01/app/oracle/oradata/testdb/redo3a.log','/u01/app/oracle/oradata/testdb/redo3b.log') SIZE 5M
DATAFILE
'/u01/app/oracle/oradata/testdb/system01.dbf',
'/u01/app/oracle/oradata/testdb/undotbs01.dbf',
'/u01/app/oracle/oradata/testdb/sysaux01.dbf',
'/u01/app/oracle/oradata/testdb/users01.dbf'
CHARACTER SET WE8ISO8859P1;

Do note the following though;

  • The database has lost the online redo logs
  • If ASM is used, change the path to “+ASM/../..” accordingly
  • The database have archive logging enabled
  • Character set of WE8ISO8859P1

Hope this helps.

Regards,
Wei Shan

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: