Skip to main content

How to Modifying the Size of Redo Logs

How to Modifying the Size of Redo Logs


To change the size of your redo logs, you must drop them and then re-create them. You can do this online without shutting down the database.
Steps:
1. Make sure the logfile you wish to change is not the current or Active logfile.
2. Drop the logfile group you wish to change.
3. Re-create the logfile group, resizing it as required.

SQL> select group#, status from v$log;
    GROUP# STATUS
---------- ----------------
         1 INACTIVE
         2 INACTIVE
 3 CURRENT
Suppose as per the above case, we want to replace log group 3, which is CURRENT so we need to make it INACTIVE first. To do this we need to force log switch wait for the archive generated.

SQL> Alter system switch logfile;
A CURRENT status indicates that the resulting dirty block that are associated with the redo in the logfile have not yet
been check pointed which is required before we drop the logfile.

SQL> Alter system switch logfile;
Checkpoint the system. This will remove the log file we want to drop from a possible active status.

Alter system checkpoint;
Now check the status of logfile again the status of group 3 is 'INACTIVE' now

SQL> select group#, status from v$log;
    GROUP# STATUS
---------- ----------------
         1 CURRENT
         2 INACTIVE
         3 INACTIVE
Once the checkpoint is complete, we drop the online redo log group, and re-create it defining a new size for the redo log files.
Note that we use the REUSE keyword also to indicate that we are reusing the files that already exist there and Oracle will resize them accordingly.

SQL> Alter database drop logfile group 3;
Now, add the logfile group with the new sizing information.

SQL> alter database add logfile group 3
  ('D:\ORACLE9I\ORADATA\ORAC\redo03a.log',
   'D:\ORACLE9I\ORADATA\ORAC\redo03b.log') size 100m REUSE;

Comments

Popular posts from this blog

How to Use ALTERNATE archive destination

How to Use ALTERNATE archive destination We can define an archive destination with value ‘ALTERNATE’, which will take over if primary destination is full. As per Oracle documentation “An archiving destination can have a maximum of one alternate destination specified. An alternate destination is used when the transmission of an online redo log from the primary site to the standby site fails”. In fact this is the concept of data guard, but can also be applied on standalone system. SQL> show parameter recovery NAME TYPE VALUE ------------------------- ----------- ------ db_recovery_file_dest string +fradg SQL> show parameter LOG_ARCHIVE_DEST_1 NAME TYPE VALUE ------------------- ----------- ------------------------------ log_archive_dest_1 string location=use_db_recovery_file_dest SQL> show parameter log_archive_dest_state_1 NAME TYPE VALUE -------------------------- ----------- ------- log_archive_dest_state_1 string enable SQL> alter system set...

RMAN Different errors and their Solution

RMAN Different errors and their Solution Backup Fails with Invalid RECID Error: RMAN-20035, RMAN-6038 When you attempt a backup and receive the following error messages: RMAN-3014: Implicit resync of recovery catalog failed RMAN-6038: Recovery catalog package detected an error RMAN-20035: Invalid high RECID error It indicates the control file and the recovery catalog is not synchronized. RMAN detects that the control file currently in use is older than the control file previously used to resynchronize. Cause: This due to any of the scenario you are restore a backup controlfile through a non-oracle mechanism and then open the database through Resetlogs option or making a copy of control file through operating system utility and trying the restore on new system through RNAN. You do not use catalog so RMAN does not get any information regarding this process.  The recovery catalog indicates that the highest RECID is 100, but the control file indicates that the highe...

How to Remove Oracle services from Windows

How to Remove Oracle services from Windows If you have uninstall the Oracle software from your system, but, the services are not removed. This resulted, when you are trying to install oracle back and trying to configure your Instance as old name is not allowed. Method1: To remove OracleService , go to the command prompt and type: oradim -delete -sid <SID> where SID is the sid of your database, as it appears when you type net start | more (you should get an "OracleServiceSID") Method2: If you have the resource kit, you can use delsrv.exe to remove the listener service. If you don't have the resource kit, you can download delsrv.exe from Microsoft Support: http://www.microsoft.com/windows2000/tec… Method3: Go to Registry (Type regedit on RUN) Take a backup of Registry. (For the backup Click on file menu on Registry and export your registry backup any location so whenever required you can import your old registry.) Now go to registry HKEY_L...