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.
Sam
lxiscas 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
Similar Messages
-
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 -
CAn some one tell me documentation for this?
or if you can guide me with how to ?
AshishSee http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/logminer.htm
-
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. -
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 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 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. -
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 -
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. -
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 -
How to reduce the size of redo log files
Hi,
I am using Oracle Database 9.2.0.1.0. My present redo log files are of 100 MB each
(redo01.log,redo02.log,redo03.log) which tooks more time to swicth the logs.
I want to change the size to 20MB each so that log switcjing will be faster.
Please let me know the exact step to resize the redo log files so that Ican change it.
Regards,
IndraneelTechnical questions cannot be answered here. Please, post in the right forum :
General Database Discussions -
Hoping for a quick response : EXP and Archived REDO log files
I apologize in advance if this question has been asked and answered 100 times. I admit I didn't search, I don't have time. I'm leaving on vacation tomorrow, and I need to know if I'm correct about something to do with backup / restore.
we have 10g R2 running a single instance on a single server. The application vendor has "embedded" oracle with their application. The vendor's backup is a batch file using EXP - thus:
exp system/xpwdxx@db full=y file=D:\Orant\admin\db\EXP\db_full.dmp log=D:\Orant\admin\db\EXP\db_full.txt direct=y compress=y
This command is executed nightly at midnight. The files are then backed up by our nightly backup to offsite storage media.
Te database is running in autoarchive mode. The problem is, the archived redo files filled the drive they were being stored on, and it is the drive the database is on. I used OS commands to move 136G of archived redo logs onto other storage media to free the drive.
My question: Since the EXP runs at midnight, when there is likely NO activity, do I need to run in AutoArchive Mode? From what I have read, you cannot even apply archived redo log files to this type of backup strategy (IMP) Is that true? We are ok losing changes since our last EXP. I have read a lot of stuff about restoring consistent vs. inconsistent, and just need to know: If my disk fails, and I have to start with a clean install of Oracle and nothing else, can I IMP this EXP and get back up and running as of the last EXP? Or do I need the autoarchived redo log files back to July 2009 (136G of them).
Hoping for a quick response
Best Regards, and thanks in advance
Bruce DavisBruce Davis wrote:
Amardeep Sidhu
Thank you for your quick reply. I am reading in the other responses that since I am using EXP without consistent=y, I might not even have a backup. The application vendor said that with this dmp file they can restore us to the most recent backup. I don't really care for this strategy as it is untested. I asked them to verify that they could restore us and they said they tested the dmp file and it was OK.
Thank you for taking the time to reply.
Best Regards
BruceThe dump file is probably ok in the sense it is not corrupted and can be used in an imp operation. That doesn't mean the data in it is transactionally consistent. And to use it at all, you have to have a database up and running. If the database is physically corrupted, you'll have to rebuild a new database from scratch before you can even think about using your dmp file.
Vendors never understand databases. I once had a vendor tell me that Oracle's performance would be intolerable if there were more than 5 concurrent connections. Well, maybe in HIS product ..... Discussions terminated quickly after he made that statement.
Maybe you are looking for
-
I have an scenerio where I need to traverse through an xml file , and for each node of XML I need to loop with certain operation in BPM . e.g xml as per the XSD --> Loop through each node --> with in each loop BPM will call a different webservice t
-
Hi everyone! I've been planning to replace my PowerBook G4 with a new MacBook Pro and was planning to do this over the summer, maybe as late as fall. I'm concerned about a change in the recently released MacBook Pros in that they all (except the 17")
-
Official Lumia 720 price in Spain?
I want to know the official price of the Lumia 720 in Spain so I can have a reference when Im going to buy it in the near future. Thanks! Solved! Go to Solution.
-
How to center a new- opened window page?
let's say i have 2 jsp files. i have a hyperlink in page 1, if i click that hyperlink, a pop up window will appear, how will i let that pop up window appear in center? thanks
-
How can I fix this. I have restarted computer and that did not work.