You can add a new redo log group to a database at any time using the ALTER DATABASE command. The following mouseover shows the syntax for adding a new log file group:
Creating new redo log file group
This is the opening screen that you will see after you start Storage Manager and connect to your database. Click the + sign next to the Database icon to expand the tree.
Click the Redo Log Groups folder to see the current list of redo log groups for the database.
Oracle will display a list of redo log groups currently in the database. In this case, there are currently five groups. To create a new group, begin by right-clicking on the Redo Log Groups folder.
Select Create from the fly-out menu.
Storage Manager will open the Create Redo Log Group window. Notice that Storage Manager has preselected both a size and a filename. You could edit those choices, but for this simulation, we will accept them. Go ahead and click the Create button to create the new group.
Storage Manager will display a dialog confirming that it has created the new redo log group.
To create a fifth log file group for the COIN database, assuming that you have four to start with, you could issue a command like this:
ALTER DATABASE
ADD LOGFILE GROUP 5
('D:\ORACLE\ORADATA\COIN\REDOCOIN05A',
'E:\ORACLE\ORADATA\COIN\REDOCOIN05B') SIZE 10m;
Oracle also allows you to add log file members to an existing group.
To do that, use this form of theALTER DATABASE command:
Add Logfile Member
To add a member to group 5, the group that we just created, you could issue a command like this:
ALTER DATABASE
ADD LOGFILE MEMBER
'G:\ORACLE\ORADATA\COIN\REDOCOIN05C'
TO GROUP 5;
You do not need to specify a size when creating a new member. Oracle will create the file sized to match the existing group members. Note that in this example, the group was identified by number. That's the easiest approach to take. Identifying a group by listing all the member filenames is a very tedious and error-prone process.
Note: Your ability to create new members in a log
file group is limited by the value that you specified forMAXLOGMEMBERS when you first created the database. Your ability to create new groups is limited by the value specified forMAXLOGFILES.
Simulation
You can use Enterprise Manager's Storage Manager application to create redo log groups. This simulation shows you how:
This is the opening screen that you will see after you start Storage Manager and connect to your database. Click the + sign next to the Database icon to expand the tree.
DatabasePlusSign
Click the Redo Log Groups folder to see the current list of redo log groups for the database.
ClickRedoLogGroups
Oracle will display a list of redo log groups currently in the database. In this case, there are currently five groups. To create a new group, begin by right-clicking on the Redo Log Groups folder.
RightClick RedoLogGroups
Select Create from the fly-out menu.
SelectCreate
Storage Manager will open the Create Redo Log Group window. Notice that Storage Manager has preselected both a size and a filename. You could edit those choices, but for this simulation, we'll accept them. Go ahead and click the Create button to create the new group.
ClickCreateButton
Storage Manager will display a dialog confirming that it has created the new redo log group. This is the end of the simulation. Click the Exit button.
Creating new redo log file group
This is the opening screen that you will see after you start Storage Manager and connect to your database. Click the + sign next to the Database icon to expand the tree.
Click the Redo Log Groups folder to see the current list of redo log groups for the database.
Oracle will display a list of redo log groups currently in the database. In this case, there are currently five groups. To create a new group, begin by right-clicking on the Redo Log Groups folder.
Select Create from the fly-out menu.
Storage Manager will open the Create Redo Log Group window. Notice that Storage Manager has preselected both a size and a filename. You could edit those choices, but for this simulation, we will accept them. Go ahead and click the Create button to create the new group.
Storage Manager will display a dialog confirming that it has created the new redo log group.
In the next lesson, you will learn how to drop redo log files.