Wednesday, 4 December 2013

How to Creating Redo Log Groups in Oracle

Goal:

Creating Redo Log Groups

Description:

To create a new group of redo log files, use the SQL statement ALTER DATABASE with the ADD LOGFILE clause.

The following statement adds a new group of redo logs to the database:

ALTER DATABASE
  ADD LOGFILE ('/oracledb/oradata/itbl/log1c.rdo', '/oracledb/oradata/itbl/log2c.rdo') SIZE 4M;
Note:

Use fully specify filenames of new log members to indicate where the operating system file should be created. Otherwise, the files will be created in either the default or current directory of the database server, depending upon your operating system.
You can also specify the number that identifies the group using the GROUP clause:

ALTER DATABASE 
  ADD LOGFILE GROUP 10 ('/oracledb/oradata/itbl/log1c.rdo', '/oracledb/oradata/itbl/log2c.rdo')
      SIZE 4M;

Using group numbers can make administering redo log groups easier. However, the group number must be between 1 and MAXLOGFILES. Do not skip redo log file group numbers (that is, do not number your groups 10, 20, 30, and so on), or you will consume unnecessary space in the control files of the database.

No comments:

Post a Comment