How does LGWR write redo log files, I am puzzled!
The document says:
The LGWR concurrently writes the same information to all online redo log files in a group.
my undestandint of the sentence is following for example
group a includes file(a1, a2)
group b includes file(b1, b2)
LGWR write file sequence: write a1, a2 concurrently; afterwards write b1, b2 concurrently.
my question is following:
1、 my understanding is right?
2、 if my understanding is right, I think that separate log file in a group should save in different disk. if not, it cann't guarantee correctly recovery.
my opinion is right?
thanks everyone!
Hi,
>>That is multplexing...you should always have members of a log file in more than 1 disk
Exactly. You can keep multiple copies of the online redo log file to safeguard against damage to these files. When multiplexing online redo log files, LGWR concurrently writes the same redo log information to multiple identical online redo log files, thereby eliminating a single point of redo log failure. In addition, when multiplexing redo log files, it is preferable to keep the members of a group on different disks, so that one disk failure will not affect the continuing operation of the database. If LGWR can write to at least one member of the group, database operation proceeds as normal.
Cheers
Legatti
Similar Messages
-
Hi Experts,
I want to remove a wrong redo log file from 10G R2 database in window.
how to do that without loss data?
my steps as
1. alter system switch logfile;
2. select * from v$log;
which ARC and sataus do I can drop redo log file based on above SQL
no archive and active status?
ALso Which account should I do above action?
fExamp, system account added redo log file, i only
can drop by system? how about sys?
Thanks help in detail steps
Jim
Edited by: user589812 on Dec 23, 2008 4:35 PMJim,
Check this link out for how to drop a redo log file
Make sure a redo log group is archived (if archiving is enabled) before dropping it. To see whether this has happened, use the V$LOG view.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/onlineredo.htm#i1006489
SELECT GROUP#, ARCHIVED, STATUS FROM V$LOG;
GROUP# ARC STATUS
1 YES ACTIVE
2 NO CURRENT
3 YES INACTIVE
4 YES INACTIVE
Drop a redo log group with the SQL statement ALTER DATABASE with the DROP LOGFILE clause.
The following statement drops redo log group number 3:
ALTER DATABASE DROP LOGFILE GROUP 3; -
How to change the redo log file location.... ?
I want all my redo log files to be created in \u10 instead of current /u01?
How to do it? NOARCHIVELOG mode database on Oracle 10g R2.
Thank you,
SmirhHi..
I want all my redo log files to be created in \u10 instead of current /u01?I think it should be /u10 :)...
Anand
Edited by: Anand... on Nov 5, 2009 5:32 AM Removed the misinformation about downtime -
Dear All,
In am using oracle 10.2.0.4.0 in RHEL 4.
In my current set we had two node RAC (tims1,tims2) db_name (tims).
One of the node has failed(hard disk),Failed node information has been remove from OCR(all the cluster component like...ons,vip,listener,instance).
My Question IS:After Removing All the Cluster Component does it remove redo log files associate with the failed instance.
Redo logfile Before Node Delete:
SQL> select member from v$logfile;
MEMBER
/database/tims/redo02.log
/database/tims/redo01.log
/database/tims/redo03.log
/database/tims/redo04.log
Redo Logfile After Node Delete
SQL> select member from v$logfile;
MEMBER
/database/tims/redo02.log
/database/tims/redo01.log
/database/tims/redo03.log
/database/tims/redo04.log
It means redo logfile has not been removed.
Please help me what are the redo thread i will have to remove.
SQL> select group#,sequence#,thread# from v$log;
GROUP# SEQUENCE# THREAD#
1 28868 1
2 28867 1
3 29327 2
4 29328 2
Thanks &Regards
Monoj Dasmonoj wrote:
Dear All
SQL> select group#,sequence#,thread# from v$log;
GROUP# SEQUENCE# THREAD#
1 28868 1
2 28867 1
3 29327 2
4 29328 2
According to my above query, thread# for group 1,2 is showing as 1 but the thread has been remove from cluster is there any use of those redo log.
Thanks and Regards
Monoj Das
Please leave your theories aside and read the replies given in the thread. The logs are going to stay as they are (should be) on the shared storage. Why you are hard-bent to remove these log files anyways? Are you not willing to add the other instance? RAC db with just one instance is really not of much use.
Aman.... -
Hi Guys,
How can i Resize redo log files, do I need to recreate control file?
Regards
AnshumanThat would mean
alter database add logfile group
and
alter database drop logfile group.
You might need to
alter system switch logfile
in between, as the logfile group might be in use.
Could you please try to be more accurate? The OP might think you can just rm the logfiles!!!
Sybrand Bakker
Senior Oracle DBA -
How to disable write to redo log file in oracle7.3.4
in oracle 8, alter table no logged in redo log file like: alter table tablename nologging;
how to do this in oracle 7.3.4?
thanks.user652965 wrote:
Thanks very much for your help guys. I appreciate it. unfortunately none of these commands worked for me. I kept getting error on clearing logs that redo log is needed to perform recovery so it can't be cleared. So I ended up restoring from earlier snapshot of my db volume. Database is now open.
Thanks again for your input.And now, as a follow-up, at a minimum you should make sure that all redo log groups have at least 3 members. Then, if you lose a single redo log file, all you have to do is shutdown the db and copy one of the good members (of the same group as the lost member) over the lost member.
And as an additional follow-up, if you value your data you will run in archivelog mode and take regular backups of the database and archivelogs. If you fail to do this you are saying that your data is not worth saving. -
How to increase the size of Redo log files?
Hi All,
I have 10g R2 RAC on RHEL. As of now, i have 3 redo log files of 50MB size. i have used redo log size advisor by setting fast_start_mttr_target=1800 to check the optimal size of the redologs, it is showing 400MB. Now, i want to increase the size of redo log files. how to increase it?
If we are supposed to do it on production, how to do?
I found the following in one of the article....
"The size of the redo log files can influence performance, because the behavior of the database writer and archiver processes depend on the redo log sizes. Generally, larger redo log files provide better performance, however it must balanced out with the expected recovery time.Undersized log files increase checkpoint activity and increase CPU usage."
I did not understand the the point however it must balanced out with the expected recovery time in the above given paragraph.
Can anybody help me?
Thanks,
Praveen.You dont have to shutdown the database before dropping redo log group but make sure you have atleast two other redo log groups. Also note that you cannot drop active redo log group.
Here is nice link,
http://www.idevelopment.info/data/Oracle/DBA_tips/Database_Administration/DBA_34.shtml
And make sure you test this in test database first. Production should be touched only after you are really comfortable with this procedure. -
Filled redo log files are available to LGWR for reuse
Hi,
Oracle version:
Oracle Database 10g Release 10.2.0.4.0 -
OS:Windows XP
In oracle documentation it is mentioned that:
Filled redo log files are available to LGWR for reuse depending on whether archiving is enabled.
*> If archiving is disabled (the database is in NOARCHIVELOG mode), a filled redo log file is available after the changes recorded in it have been written to the datafiles*.
Link for Documentation is:
http://docs.oracle.com/cd/B28359_01/server.111/b28310/onlineredo001.htm
My doubt is:
Redo Records are written to datafiles also??user12141893 wrote:
Does it mean:
Suppose:
Online redo log files contains some redo entries and database buffer cache contains some data and this data belong to redo entries of redo log files.
Now this redo log file can't be reused until those (related) blocks of database buffer cache are written into datafiles.
This is sort of correct. If the log file would be filled up , LGWR would switch over to the next log group and would initiate a Log Switch which would further trigger DBWR to start checkpointing the content protected by this log group to the data file. By the time this operation would be going on, the Log group's members would have the status of Active and once it would be complete, the status would be marked to Inactive which means that this log group and its members can be reused by LGWR.
HTH
Aman.... -
Question about how Oracle manages Redo Log Files
Good morning,
Assuming a configuration that consists of 2 redo log groups (Group A and B), each group consisting of 2 disks (Disks A1 & A2 for Group A and Disks B1 and B2 for group B). Further, let's assume that each redo log file resides by itself in a disk storage device and that the device is dedicated to it. Therefore in the above scenario, there are 4 disks, one for each redo log file and, each disk contains nothing else other than a redo log file. Furthermore, let's assume that the database is in ARCHIVELOG mode and that the archive files are stored on yet another different set of devices.
sort of graphically:
GROUP A GROUP B
A1 B1
A2 B2The question is: When the disks that comprise Group A are filled and Oracle switches to the disks in Group B, can the disks in Group A be taken offline, maybe even physically removed from the system if necessary, without affecting the proper operation of the database ? Can the Archiver process be temporarily delayed until the disks (that were removed) are brought back online or is the DBA forced to wait until the Archiver process has finished creating a copy of the redo log file into the archive ?
Thank you for your help,
John.Hello,
Dropping Log Groups
To drop an online redo log group, you must have the ALTER DATABASE system privilege. Before dropping an online redo log group, consider the following restrictions and precautions:
* An instance requires at least two groups of online redo log files, regardless of the number of members in the groups. (A group is one or more members.)
* You can drop an online redo log group only if it is inactive. If you need to drop the current group, first force a log switch to occur.
* Make sure an online redo log group is archived (if archiving is enabled) before dropping it. To see whether this has happened, use the V$LOG view.
SELECT GROUP#, ARCHIVED, STATUS FROM V$LOG;
GROUP# ARC STATUS
1 YES ACTIVE
2 NO CURRENT
3 YES INACTIVE
4 YES INACTIVE
Drop an online redo log group with the SQL statement ALTER DATABASE with the DROP LOGFILE clause.
The following statement drops redo log group number 3:
ALTER DATABASE DROP LOGFILE GROUP 3;
When an online redo log group is dropped from the database, and you are not using the Oracle Managed Files feature, the operating system files are not deleted from disk. Rather, the control files of the associated database are updated to drop the members of the group from the database structure. After dropping an online redo log group, make sure that the drop completed successfully, and then use the appropriate operating system command to delete the dropped online redo log files.
When using Oracle-managed files, the cleanup of operating systems files is done automatically for you.
Your Database wont be affected as you can operate with 2 redo log files in each group as The minimum number of redo log files required in a database is two because the LGWR (log writer) process writes to the redo log files in a circular manner. so the process will hang becuase you are having 2 only groups if you want to remove 1 add a third one and make it the current group then remove the one you want to be offline.
Please refer to:
http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/onlineredo.htm#7438
Kind regards
Mohamed
Oracle DBA -
How to recover from one corrupted redo log file in NOARCHIVE mode?
Oracle 10.2.1.
The redo log file was corrupted and Oracle can't work.
When I use STARTUP mount, I got no error msg.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1652555776 bytes
Fixed Size 1251680 bytes
Variable Size 301991584 bytes
Database Buffers 1342177280 bytes
Redo Buffers 7135232 bytes
Database mounted.
But I have some applications which are depended on Oracle can't be started.
So, I tried STARTUP open. But I got error msg.
SQL> startup open
ORACLE instance started.
Total System Global Area 1652555776 bytes
Fixed Size 1251680 bytes
Variable Size 301991584 bytes
Database Buffers 1342177280 bytes
Redo Buffers 7135232 bytes
Database mounted.
ORA-00368: checksum error in redo log block
ORA-00353: log corruption near block 497019 change 42069302 time 11/07/2007
23:43:09
ORA-00312: online log 4 thread 1:
'G:\ORACLE\PRODUCT\10.2.0\ORADATA\NMDATA\REDO04.LOG'
So, how can I restore and recover my database?
If use RMAN, how to do that?
Any help will be appreciated.
Thanks.Hi, Yingkuan,
Thanks for the helps.
Actually, I have 10 redo log files exists. All of them are here.
I tried your suggestion:
alter database clear unarchived logfile group 4;
The error msg I got is the same as before:
SQL> alter database clear unarchived logfile group 4;
alter database clear unarchived logfile group 4
ERROR at line 1:
ORA-01624: log 4 needed for crash recovery of instance nmdata (thread 1)
ORA-00312: online log 4 thread 1:
'G:\ORACLE\PRODUCT\10.2.0\ORADATA\NMDATA\REDO04.LOG'
Compared to losing all the data, it is OK for me lose some of them.
I have more than 1 TB data stored and 99.9% of them are raster images.
The loading of these data were the headache. If I can save them, I can bear the lost.
I want to grasp the last straw.
But I don't know how set the parameter: allowresetlogs_corruption
I got the error msg:
SQL> set allowresetlogs_corruption=true;
SP2-0735: unknown SET option beginning "_allow_res..."
I have run the command:
Recover database until cancel
Alter database open resetlogs
The error msg I got is the following:
SQL> recover database until cancel
ORA-00279: change 41902930 generated at 11/05/2007 22:01:48 needed for thread 1
ORA-00289: suggestion :
D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\NMDATA\ARCHIVELOG\2007_11_09\O1_MF_
1_1274_%U_.ARC
ORA-00280: change 41902930 for thread 1 is in sequence #1274
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\NMDATA\SYSTEM01.DBF'
ORA-01112: media recovery not started
SQL>
From the log file, I got the following:
ALTER DATABASE RECOVER database until cancel
Fri Nov 09 00:12:48 2007
Media Recovery Start
parallel recovery started with 2 processes
ORA-279 signalled during: ALTER DATABASE RECOVER database until cancel ...
Fri Nov 09 00:13:20 2007
ALTER DATABASE RECOVER CANCEL
Fri Nov 09 00:13:21 2007
ORA-1547 signalled during: ALTER DATABASE RECOVER CANCEL ...
Fri Nov 09 00:13:21 2007
ALTER DATABASE RECOVER CANCEL
ORA-1112 signalled during: ALTER DATABASE RECOVER CANCEL ...
Thank you very much. and I am looking forward to your followup input. -
How to clean redo log file?
Hi, guys:
I need to migrate data from external tables to normal tables. But the connection is always frozen half the way of executing script. The error message is ORA-00257. it looks redo log file is full. I tried to delete redo log file with RMAN, but I got this error message:
delete archivelog until time 'trunc(sysdate)';
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=43 device type=DISK
specification does not match any archived log in the repository
Any suggestion would be appreciated.
Samlxiscas wrote:
Hi, guys:
I need to migrate data from external tables to normal tables. But the connection is always frozen half the way of executing script. The error message is ORA-00257. it looks redo log file is full. I tried to delete redo log file with RMAN, but I got this error message:
Sounds like you are confusing (online) redo logs with "archivelogs" (archived redo logs).
You don't delete redo logs at all. You can delete archivelogs with rman, which is what your command is trying to do. Do you ever backup the archivelogs? A proper backup/recovery policy would backup the archivelogs on at least a daily (if not more often) basis, and delete them after they are backed up. That will keep the archivelog destination from filling up in all but the most extreme circumstances.
delete archivelog until time 'trunc(sysdate)';
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=43 device type=DISK
specification does not match any archived log in the repository
Any suggestion would be appreciated.
Sam -
Private strand flush not complete how to find optimal size of redo log file
hi,
i am using oracle 10.2.0 on unix system and getting Private strand flush not complete in the alert log file. i know this is due to check point is not completed.
I need to increase the size of redo log files or add new group to the database. i have log file switch (checkpoint incomplete) in the top 5 wait event.
i can't change any parameter of database. i have three redo log group and log files are of 250MB size. i want to know the suitable size to avoid problem.
select * from v$instance_recovery;
RECOVERY_ESTIMATED_IOS ACTUAL_REDO_BLKS TARGET_REDO_BLKS LOG_FILE_SIZE_REDO_BLKS LOG_CHKPT_TIMEOUT_REDO_BLKS LOG_CHKPT_INTERVAL_REDO_BLKS FAST_START_IO_TARGET_REDO_BLKS TARGET_MTTR ESTIMATED_MTTR CKPT_BLOCK_WRITES OPTIMAL_LOGFILE_SIZE ESTD_CLUSTER_AVAILABLE_TIME WRITES_MTTR WRITES_LOGFILE_SIZE WRITES_LOG_CHECKPOINT_SETTINGS WRITES_OTHER_SETTINGS WRITES_AUTOTUNE WRITES_FULL_THREAD_CKPT
625 9286 9999 921600 9999 0 9 112166207 0 0 219270206 0 3331591 5707793please suggest me or tell me the way how to find out suitable size to avoid problem.
thanks
umeshHow often should a database archive its logs
Re: Redo log size increase and performance
Please read the above thread and great replies by HJR sir. I think if you wish to get concept knowledge, you should add in your notes.
"If the FAST_START_MTTR_TARGET parameter is set to limit the instance recovery time, Oracle automatically tries to checkpoint as frequently as necessary. Under this condition, the size of the log files should be large enough to avoid additional checkpointing due to under sized log files. The optimal size can be obtained by querying the OPTIMAL_LOGFILE_SIZE column from the V$INSTANCE_RECOVERY view. You can also obtain sizing advice on the Redo Log Groups page of Oracle Enterprise Manager Database Control."
Source:http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10752/build_db.htm#19559
Pl also see ML Doc 274264.1 (REDO LOGS SIZING ADVISORY) on tips to calculate the optimal size for redo logs in 10g databases
Source:Re: Redo Log Size in R12
HTH
Girish Sharma -
How do look if i have Standby Redo Log files
How do look if i have Standby Redo Log files
example of creating them..To check existence of Standby Redo Log Files:
SQL> v$standby_log
Name Null? Type
----------------------------------------- -------- ---------------------------- GROUP# NUMBER
DBID VARCHAR2(40)
THREAD# NUMBER
SEQUENCE# NUMBER
BYTES NUMBER
USED NUMBER
ARCHIVED VARCHAR2(3)
STATUS VARCHAR2(10)
FIRST_CHANGE# NUMBER
FIRST_TIME DATE
LAST_CHANGE# NUMBER
LAST_TIME DATE
SQL> select * from v$standby_log;
no rows selected
SQL>To Create a Standby Redo Log file:
SQL> alter database add standby logfile group 11 ('/u01/app/test.log') size 5m;
Database altered.
SQL> set line 10000
SQL> select * from v$standby_log;
GROUP# DBID THREAD# SEQUENCE# BYTES USED ARC STATUS FIRST_CHANGE# FIRST_TIM LAST_CHANGE# LAST_TIME
11 UNASSIGNED 0 0 5242880 512 YES UNASSIGNED 0 0
SQL>and this is how you drop:
SQL> alter database drop standby logfile group 11;
Database altered.
SQL> ! rm /u01/app/test.log
SQL>Asif Momen
http://momendba.blogspot.com
Edited by: Asif Momen on Mar 16, 2010 1:32 PM
Included DROP example -
How to find the configuration status of REDO logs files?
I am in the process of moving the redo log files.
Before that I want to find out whether it is set up as duplex or any other configurations.
How to find the REDO log configurations.
Oracle 10g R2
Thank you,
SmithExample:
Not duplexed redo log - if number of member is 1, then it is not duplexed:
SQL> select group#, members from v$log;
GROUP# MEMBERS
1 1
2 1
3 1
SQL> select group#, member from v$logfile;
GROUP# MEMBER
1 /u01/app/oracle/oradata/db1/redo01.log
2 /u01/app/oracle/oradata/db1/redo02.log
3 /u01/app/oracle/oradata/db1/redo03.log
SQL> alter database add logfile member '/u01/app/oracle/oradata/db1/redo01_2.log' to group 1;
Database altered.
SQL> alter database add logfile member '/u01/app/oracle/oradata/db1/redo02_2.log' to group 2;
Database altered.
SQL> alter database add logfile member '/u01/app/oracle/oradata/db1/redo03_2.log' to group 3;
Database altered.Duplexed redolog
SQL> select group#, members from v$log;
GROUP# MEMBERS
1 2
2 2
3 2
SQL> select group#, member from v$logfile;
GROUP# MEMBER
1 /u01/app/oracle/oradata/db1/redo01.log
2 /u01/app/oracle/oradata/db1/redo02.log
3 /u01/app/oracle/oradata/db1/redo03.log
1 /u01/app/oracle/oradata/db1/redo01_2.log
2 /u01/app/oracle/oradata/db1/redo02_2.log
3 /u01/app/oracle/oradata/db1/redo03_2.log -
How to recover from corrupt redo log file in non-archived 10g db
Hello Friends,
I don't know much about recovering databases. I have a 10.2.0.2 database with corrupt redo file and I am getting following error on startup. (db is non archived and no backup) Thanks very much for any help.
Database mounted.
ORA-00368: checksum error in redo log block
ORA-00353: log corruption near block 6464 change 9979452011066 time 06/27/2009
15:46:47
ORA-00312: online log 1 thread 1: '/dbfiles/data_files/log3.dbf'
====
SQL> select Group#,members,status from v$log;
GROUP# MEMBERS STATUS
1 1 CURRENT
3 1 UNUSED
2 1 INACTIVE
==
I have tried this so far but no luck
I have tried following commands but no help.
SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 3;
Database altered.
SQL> alter database open resetlogs;
alter database open resetlogs
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
SQL> alter database open;
alter database open
ERROR at line 1:
ORA-00368: checksum error in redo log block
ORA-00353: log corruption near block 6464 change 9979452011066 time 06/27/2009
15:46:47
ORA-00312: online log 1 thread 1: '/dbfiles/data_files/log3.dbf'user652965 wrote:
Thanks very much for your help guys. I appreciate it. unfortunately none of these commands worked for me. I kept getting error on clearing logs that redo log is needed to perform recovery so it can't be cleared. So I ended up restoring from earlier snapshot of my db volume. Database is now open.
Thanks again for your input.And now, as a follow-up, at a minimum you should make sure that all redo log groups have at least 3 members. Then, if you lose a single redo log file, all you have to do is shutdown the db and copy one of the good members (of the same group as the lost member) over the lost member.
And as an additional follow-up, if you value your data you will run in archivelog mode and take regular backups of the database and archivelogs. If you fail to do this you are saying that your data is not worth saving.
Maybe you are looking for
-
Finalizer Thread - java.lang.rOperating System
Can anyone please help me understand what is being conveyed by the finalizer portion of a thread dump: "Finalizer" (TID:0x1669320, sys_thread_t:0x592180, state:CW, native ID:0xe6) prio=8 at java.lang.Object.wait(Native Method) at java.lang.
-
Can I build a checklist app with Siena?
I would like to have an app that allows me to check a selection of data field types and, when done, produces a fillable/printable specification form for commercial furniture. For example: the app would present the following data field choices: 1. Ma
-
Problem starting the server WLS after installing OIM11g
Failed to restart weblogic server after installing Oracle Identity Manager 11g. Weblogic server log Part: ####<Dec 23, 2010 4:15:19 PM PST> <Info> <Deployer> <IAM11G> <oim_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (sel
-
Why does Firefox attempting to change things on my hard drive every time I open it?
I have never needed to change my hard drive when I log into firefox except for an updated version. Why is this happening?
-
Hello, I have installed on my Microsoft SBS 2003 server: 1. MSSQL server 2008 R2 We use this SQL server services: SQL Server (ACRONIS) (Acronis backup software) SQL Server (MSSQLSERVER) 2. Microsoft SQL server desktop engine (service SBSMONITORIN