ALTER DATABASE – Managing Redo logs
Before commiting data into database Oracle changes and stores the changed data in redo log files. Every oracle database needs redo log files. When for some reason some datafile becomes unavailable then these redo log files can be used to rollback changes to the data.
The following command can be used to add a new redo log group to an existing database:
ALTER DATABASE testdb
ADD LOGFILE
GROUP 1 (‘/u01/oradata/testdb/redo1a.log’,'/u02/oradata/testdb/redo1b.log’) SIZE 100M;
This command will add a redo log group (Group 1) to the database testdb. The log file group will have two members which are located on two different disks uo1 and uo2.
In Oracle the Group number must be unique. So before creating the group it is vital that you check the existing group number and then increment that number by 1 to get your new group number.
It is possible to add further log members to redo groups.
The command below will add a member to GROUP 1.
ALTER DATABASE testdb
ADD LOGFILE MEMBER
‘/u03/oradata/testdb/redo1c.log’
TO GROUP 1;
Recent Comments