Can we use online redo log to recover lost datafile in NOARCHIVE mode?
I am working on OCA exam and confued about these 2 sample questions. (similar questions with totally different answer)
Please give me hint about the different between these 2 questions.
** If the database is in NOARCHIVELOG mode, and one of the datafile for tablespace USERS is lost, what kind of recovery is possible? (answer: B)
A. All transactions except those in the USERS tablespace are recoverable up to the loss of the datafile.
B. Recovery is possible only up to the point in time of the last full database backup.
C. The USERS tablespace is recoverable from the online redo log file as long as none of the redo log files have been reused since the last backup.
D. Tablespace point in time recovery is available as long as a full backup of the USERS tablespace exists.
** The database of your company is running in the NOARCHIVELOG mode. You perform a complete backup of the database every night. On Monday morning, you lose the USER1.dbf file belonging to the USERS tablespace. Your database has four redo log groups, and there have been two log switches since Sunday night's backup.
Which is true (answer: B)
A. The database cannot be recovered.
B. The database can be recovered up to the last commit.
C. The database can be recovered only up to the last completed backup.
D. The database can be recovered by performing an incomplete recovery.
E. The database can be recovered by restoring only the USER!.dbf datafile from the most recent backup.
I think Gaurav is correct, you can recover to the last commit even in NOARCHIVELOG, as long as all the changes in the redo logs have not been overwritten. So answer should be B for question 2.
Here is my test:
SQL> select log_mode from v$database;
LOG_MODE
NOARCHIVELOG
SQL> select tablespace_name, file_name from dba_data_files;
TABLESPACE_NAME
FILE_NAME
USERS
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\USERS01.DBF
SYSAUX
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\SYSAUX01.DBF
UNDOTBS1
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\UNDOTBS01.DBF
SYSTEM
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\SYSTEM01.DBF
DATA
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\DATA01.DBF
SQL> create table names
2 ( name varchar(16))
3 tablespace users;
Table created.
so this segment 'names' is created in the datafile users01.
At this point I shut down and mount the DB, then:
RMAN> backup database;
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:29
Finished backup at 06-OCT-07
SQL>alter database open
SQL> insert into names values ('pippo');
1 row created.
SQL> commit;
Commit complete.
SQL>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
At this point I delete datafile users01 and restart:
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1247900 bytes
Variable Size 67110244 bytes
Database Buffers 96468992 bytes
Redo Buffers 2945024 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\USERS01.DBF'
restoring the backup taken before inserting the value 'pippo' in table names:
RMAN> restore database;
Starting restore at 06-OCT-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\SYSTEM01.D
BF
restoring datafile 00002 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\UNDOTBS01.
DBF
restoring datafile 00003 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\SYSAUX01.D
BF
restoring datafile 00004 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\USERS01.DB
F
restoring datafile 00005 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\DATA01.DBF
channel ORA_DISK_1: reading from backup piece C:\ORACLE\PRODUCT\10.2.0\DB_1\DATA
BASE\0AITR52K_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\0AITR52K_1_1 tag=TAG20071006
T181337
channel ORA_DISK_1: restore complete, elapsed time: 00:02:07
Finished restore at 06-OCT-07
RMAN> recover database;
Starting recover at 06-OCT-07
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:05
Finished recover at 06-OCT-07
SQL> alter database open;
Database altered.
SQL> select * from names;
NAME
pippo
SQL>
enrico
Similar Messages
-
Recover when Online Redo Log lost.
Hi,all.
How do I recover the db while all the online redo log files were lost.
The database is running in archive mode and all the archived redo log files were saved well.
But since last hot backup,I have done some table inserting with nologging.
Now the database can not be opened.
Who can tell me how to recover the db to the recent state.
I remember the db was shutdown immediate.
(Do it make any difference to online redo log file between shutdown immediate and abort?)
Thanks.
wy.I find out if I shutdown immediate and remove all the redo log files,I can recover the database as below:
SQL> startup
ORACLE instance started.
Total System Global Area 109164572 bytes
Fixed Size 75804 bytes
Variable Size 59498496 bytes
Database Buffers 49512448 bytes
Redo Buffers 77824 bytes
Database mounted.
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'D:\ORACLE\ORADATA\ORCL\REDO03.LOG'
SQL> recover database until cancel
Media recovery complete.
SQL> alter database open resetlogs;
Database altered.
but if I shutdown abort,I can not recover the database.
SQL> startup
ORACLE instance started.
Total System Global Area 109164572 bytes
Fixed Size 75804 bytes
Variable Size 59498496 bytes
Database Buffers 49512448 bytes
Redo Buffers 77824 bytes
Database mounted.
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'D:\ORACLE\ORADATA\ORCL\REDO03.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) O5M3UR2;5=V86(5DND<~!#
SQL> recover database until cancel
ORA-00279: change 690879 generated at 08/09/2004 16:34:04 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\ORCL\ARCHIVE\ORCLT001S00002.ARC
ORA-00280: change 690879 for thread 1 is in sequence #2
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 690963 generated at 08/09/2004 16:34:08 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\ORCL\ARCHIVE\ORCLT001S00003.ARC
ORA-00280: change 690963 for thread 1 is in sequence #3
ORA-00278: log file 'D:\ORACLE\ORADATA\ORCL\ARCHIVE\ORCLT001S00002.ARC' no
longer needed for this recovery
ORA-00308: cannot open archived log
'D:\ORACLE\ORADATA\ORCL\ARCHIVE\ORCLT001S00003.ARC'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) O5M3UR2;5=V86(5DND<~!#
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\ORADATA\ORCL\SYSTEM01.DBF'
SQL> recover database until cancel
ORA-00279: change 690963 generated at 08/09/2004 16:34:08 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\ORCL\ARCHIVE\ORCLT001S00003.ARC
ORA-00280: change 690963 for thread 1 is in sequence #3
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\ORADATA\ORCL\SYSTEM01.DBF'
ORA-01112: media recovery not started
SQL> ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE OPEN RESETLOGS
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'D:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF'
So How to recover the database when the db shutdown abort and all the online redo log were lost? -
Multiplexing Online redo logs, archive logs, and control files.
Currently I am only multiplexing my control files and online redo logs, My archive logs are only going to the FRA and then being backed up to tape.
We have to replace disks that hold the FRA data. HP says there is a chance we will have to rebuild the FRA.
As my archive logs are going to the FRA now, can I multiplex them to another disk group? And if all of the control files, online redo logs and archive logs are multiplexed to another disk group, when ASM dismounts the FRA disk group due to insufficient number of disks, will the database remain open and on line.
If so then I will just need to rebuild the ASM volumes, and the FRA disk group and bring it to the mount state, correct?
Thanks!You can save your online redo logs and archive logs anywhere you want by making use of of init params create_online_log_dest and log_archive_dest_n. You will have to create new redo log groups in the new location and drop the ones in the FRA. The archive logs will simply land wherever you designate with log_archive_dest_n parameters. Moving the control files off FRA is a little trickier because you will need to restore your controlfile to a non-FRA destination and then shutdown your instance, edit the control file param to reflect changes and restart.
I think you will be happier if you move everything off the FRA diskgroup before dismounting it, and not expecting the db to automagically recover from the loss of files on the FRA. -
Online Redo logs instead of Standby Redo logs
RDBMS Version: 11.2.0.3/Platform : RHEL 6.3
To migrate a 3TB Database to a new DB server , we are going to use RMAN DUPLICATE.
Step1. Take full backup of DB + Standby Control file at primary site and transfer the Bkp files to Standby site
Step2. At standy site, we will run the RMAN duplicate target database for standby
After the above step, we don't want to create the standby redo logs because the newly restored DB in standby server is going to be the new Prod DB which application will be pointing to.
So, Can I skip the Standby Redo log creation part and create Online redo logs instead ?
As mentioned earlier, Our objective is not to create a proper Dataguard Standby DB setup. We just want to clone our DB to another server using RMAN Duplicate.Tom wrote:
RDBMS Version: 11.2.0.3/Platform : RHEL 6.3
To migrate a 3TB Database to a new DB server , we are going to use RMAN DUPLICATE.
Step1. Take full backup of DB + Standby Control file at primary site and transfer the Bkp files to Standby site
Step2. At standy site, we will run the RMAN duplicate target database for standby
After the above step, we don't want to create the standby redo logs because the newly restored DB in standby server is going to be the new Prod DB which application will be pointing to.
So, Can I skip the Standby Redo log creation part and create Online redo logs instead ?
As mentioned earlier, Our objective is not to create a proper Dataguard Standby DB setup. We just want to clone our DB to another server using RMAN Duplicate.
Hi,
Take full backup of DB + Standby Control
We just want to clone our DB to another server using RMAN Duplicate
If you want only clone database of production, why you are take Standby controlfile?
If you don't want create standby database then, why you using DUPLICATE command with FOR STANDBY option.
You can use DUPLICATE command for clone database, without for standby option.
If you say no, we want create standby database and we will perform swithover,
then yes, you can use online redo logs for max performance mode.
and you can create standby redo logs on all database, but this redo logs will use by database when database role
is standby.
Regards
Mahir M. Quluzade -
can u we take online redo log backups using RMAN.....in 1og
'Backup' solution for online redo logs is multiplexing (members of a group on different independent drives).
Werner -
When occurs crash recovery,why use active online redo log not archived log?
If current redo log had archived, but it's still 'ACTIVE'. As we all know, archived log is just an archived copy of the current redo log which is still 'ACTIVE', they have the same data. But why use active online redo log not archived log for crash recovery?(I think, if crash recovery can use archived log, then whether the online redo log is 'ACTIVE' or not, it can be overwritten)
Quote:
Re: v$log : How redo log file can have a status ACTIVE and be already archived?
Hemant K Chitale
If your instance crashes, Oracle attempts Instance Recovery -- reading from the Online Redo Logs. It doesn't need ArchiveLogs for Instance Recovery.
TanelPoder
Whether the log is already archived or not doesn't matter here, when the instance crashes, Oracle needs some blocks from that redolog. Archivelog is just an archived copy of the redolog, so you could use either the online or achive log for the recovery, it's the same data in there (Oracle reads the log/archivelog file header when it tries to use it for recovery and validates whether it contains the changes (RBA range) in it what it needs).Aman.... wrote:
John,
Are you sure that the instance recovery (not the media recovery) would be using the archived redo logs? Since the only thing that would be lost is the isntance, there wouldn't be any archived redo log generated from the Current redo log and the previous archived redo logs, would be already checkpointed to the data file, IMHO archived redo logs won't participate in the instance recovery process. Yep, shall watch the video but tomorrow .
Regards
Aman....
That's what I said. Or meant to say. If Oracle used archivelogs for instance recovery, it would not be possible to recover in noarchive log mode. So recovery relies exclusively on the online log.
Sorry I wasted your time, I'll try to be less ambiguous in future -
Asynch Hot Log mode does not use hot (online) redo logs
Version 10.2
We have just set up a test of the Asynch Hot Log replication according to Chap 16 of the Data Warehousing guide.
We can see data put into the change table. However, it seems that data gets written to the change table ONLY after a log switch. This would suggest that the capture process is not reading the online logs, but is only reading the archived logs.
I don't think this can be correct behavior because the docs indicate that Oracle "seamlessly switches" between the online and the archived redo logs.
Is there a flag or something to set to cause the online logs to be available to the capture process? Or is this a bug? Has anyone else observed this behavior?
Thanks for any insight.
-- Chris CurzonAccording to the 10g Dataguard docs, section 2.5.1:
"Physical standby databases do not use an online redo log, because physical standby databases are not opened for read/write I/O."yes, those are used when database is open.
You should not perform any changes in Standby. Even if those exist online redo log files, whats the difficulty you have seen?
These will be used whenever you performed switchover/failover. So nothing to worry on this.
Is this a case of the STANDBY needing at least a notion of where the REDO logs will need to be should a failover occur, and if the files are already there, the standby database CONTROLFILE will hold onto them, as they are not doing any harm anyway?Then oracle functionality itself harm if you think in that way. When they not used in open then what the harm with that?
Standby_File_management --> for example if you add any datafile, those information will be in archives/redos once they applied on standby those will be added automatically when it is set to AUTO if its manual, then it creates a unnamed file in $ORACLE_HOME/dbs location later you have to rename that file and recovery need to perform .
check this http://docs.oracle.com/cd/B14117_01/server.101/b10755/initparams206.htm
HTH. -
Open database if an active online redo log is missing
Hi,
Sorry for the rather long post, but I specified all the steps I performed and couldn't make it shorter :-(
I need an advice on how to open the database if an active online redo log is missing.
For test purposes I intentionally performed a shutdown abort when the redo log group 1 was in active state and then renamed its only member (REDO01.LOG) so that the database couldn't perform crash recovery using it. Then upon startup I obviously got the message:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'H:\ORADATA\TESTDB\REDO01.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.Ok, so I checked the state of the logs:
{noformat}
SQL>SELECT a.GROUP#, first_change#, SEQUENCE#, a.status, SUBSTR(b.MEMBER, 1, 40) MEMBER, b.status mem_status, a.archived
2 FROM v$log a, v$logfile b
3 WHERE a.GROUP# = b.GROUP#
4 ORDER BY a.GROUP#, b.MEMBER;
GROUP# FIRST_CHANGE# SEQUENCE# STATUS MEMBER MEM_STA ARC
1 592134 29 ACTIVE H:\ORADATA\TESTDB\REDO01.LOG YES
2 592268 30 CURRENT C:\ORADATA\TESTDB\REDO02.LOG NO
3 592129 28 ACTIVE C:\ORADATA\TESTDB\REDO03.LOG YES
{noformat}Since opening the database to perform a log switch and thus change the status of the redo log group 1 from ACTIVE to INACTIVE to recreate the member isn't possible, I performed database recovery.
SQL>recover database until cancel;
ORA-00279: change 592129 generated at 02/04/2009 10:31:15 needed for thread 1
ORA-00289: suggestion : C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\TESTDB\ARCHIVELOG\2009_02_04\O1_MF_1_28_%U_.ARC
ORA-00280: change 592129 for thread 1 is in sequence #28
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00279: change 592134 generated at 02/04/2009 10:31:28 needed for thread 1
ORA-00289: suggestion : C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\TESTDB\ARCHIVELOG\2009_02_04\O1_MF_1_29_%U_.ARC
ORA-00280: change 592134 for thread 1 is in sequence #29
ORA-00278: log file 'C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\TESTDB\ARCHIVELOG\2009_02_04\O1_MF_1_28_4RLR3JS9_.ARC' no longer needed for this rec
overy
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
'C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\TESTDB\ARCHIVELOG\2009_02_04\O1_MF_1_29_4RLR4MF3_.ARC'
ORA-00279: change 592268 generated at 02/04/2009 10:32:03 needed for thread 1
ORA-00289: suggestion : C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\TESTDB\ARCHIVELOG\2009_02_04\O1_MF_1_30_%U_.ARC
ORA-00280: change 592268 for thread 1 is in sequence #30
ORA-00278: log file 'C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\TESTDB\ARCHIVELOG\2009_02_04\O1_MF_1_29_4RLR4MF3_.ARC' no longer needed for this rec
overy
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
'C:\ORADATA\TESTDB\REDO02.LOG'
Log applied.
Media recovery complete.
SQL>So for log sequence #28 I accepted the proposed archived redo log in the FRA, for sequence #29 (that's the online redo log that is missing!) I manually specified its archived copy, and for sequence #30 I specified the CURRENT online redo log. And as it seems the media recovery was successful.
Next I tried to open the database but again got the error:
SQL>alter database open noresetlogs;
alter database open noresetlogs
ERROR at line 1:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'H:\ORADATA\TESTDB\REDO01.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
The status of the log groups and its members is exactly as it was in the first query I wrote above, i.e. the redo log group 1 is still ACTIVE, so it's needed for crash recovery (which I had already done manually if I understand correctly how Oracle works!). I also checked if the datafiles are inconsistent (described in metalink doc id 1015544.102):
SQL>SELECT DISTINCT CHECKPOINT_CHANGE#, FUZZY FROM V$DATAFILE_HEADER;
CHECKPOINT_CHANGE# FUZ
592269 NOSo, everything seems ok as far as datafile consistency is concerned.
My question is: how can I rename/drop/clear/whatever the member of redo log group 1 to open the database?
I tried to rename the log file member, to add another member to it, to open the database with resetlogs, to clear the logfile group 1, but all without success:
1)
SQL>alter database clear logfile group 1;
alter database clear logfile group 1
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of instance testdb (thread 1)
ORA-00312: online log 1 thread 1: 'H:\ORADATA\TESTDB\REDO01.LOG'
2)
SQL>alter database open resetlogs;
alter database open resetlogs
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
3)
SQL>alter database rename file 'H:\ORADATA\TESTDB\REDO01.LOG' to 'C:\ORADATA\TESTDB\REDO01.LOG';
alter database rename file 'H:\ORADATA\TESTDB\REDO01.LOG' to 'C:\ORADATA\TESTDB\REDO01.LOG'
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01512: error renaming log file H:\ORADATA\TESTDB\REDO01.LOG - new file C:\ORADATA\TESTDB\REDO01.LOG not found
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
4)
SQL>alter database add logfile member 'C:\ORADATA\TESTDB\REDO01.LOG' to group 1;
alter database add logfile member 'C:\ORADATA\TESTDB\REDO01.LOG' to group 1
ERROR at line 1:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'H:\ORADATA\TESTDB\REDO01.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.Sorry again for the long post and thank you in advance for any suggestion.
Regards,
JureYou could check if the recovery was complete by (re)creating the controlfile with the resetlogs option.
<CREATE CONTROLFILE REUSE DATABASE define_db_name RESETLOGS NOARCHIVELOG
...>Thanks for the hint. If possible, could you only check if the steps I'm going to perform are ok.
I did an "alter database backup controlfile to trace;" and then extracted the create controlfile definition part. So in essence I should run the following statements:
CREATE CONTROLFILE REUSE DATABASE "TESTDB" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'C:\ORADATA\TESTDB\REDO01.LOG' SIZE 20M,
GROUP 2 'C:\ORADATA\TESTDB\REDO02.LOG' SIZE 20M,
GROUP 3 'C:\ORADATA\TESTDB\REDO03.LOG' SIZE 20M
-- STANDBY LOGFILE
DATAFILE
'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\SYSTEM01.DBF',
'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\UNDOTBS01.DBF',
'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\SYSAUX01.DBF',
'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\USERS01.DBF'
CHARACTER SET EE8MSWIN1250
ALTER DATABASE OPEN RESETLOGS;
ALTER TABLESPACE TEMP ADD TEMPFILE 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\TEMP01.DBF' REUSE;Is that correct?
About the RMAN backups: Wouldn't a 'CATALOG RECOVERY AREA' populate the controlfile with backup information again (I'm not using a recovery catalog in this case)?
Thanks for the help!
Regards,
Jure -
Accidently Deleted Online Redo Log Files
Dear friends
Just to give a try, I deleted online redo log files from the disk after clearn shutdown (In Test Environment Not A Production Database), then i started the dabase, I know we need atleast two online redo files for database to work properly. now my point of question is how can i create new online redo files ?
I have 2 redo logfile groups each with one member. In group 2 i have added new member for the deleted one using add logfile member ....... to group 2. but when i try todo the same to add logfile member to group1 I am not abale to do so. because its saying that this is the current logfile member. then I tried manual log switching to use next logfile member but database is not allowing as the database is just mounted not opened. plsease if any body helps me out to sort out this problem it will be a great help.
Anandkumar S.M
Oracle DBA
rC6Exv3hello ur instruction u have is some what bit rite. but i was not able to solve the problem
finally i solved the problem with these commands after database is mounted
recover database until cancel Enter
then I select the cancel option when it provide the user with the options
after cancelling the recover i issued the following command
alter database open resetlogs;
this method sorted out my problem
anyway very very thanks for ur root hints from where i got the Idea to recover online redo logfiles
Thank u very much -
Online redo log files being removed physically
Grid Infra version: 11.2.0.4
RDBMS Version: 11.2.0.4
Although this is a RAC DB, this is not a RAC-specific question. Hence posting it here.
Few months back, I remember issuing a command similair to below (DROP LOGFILE GROUP ...) and the redo log files were still physically present in the diskgroup.
If I remember correctly, the file is not deleted physical so that we can use the REUSE functionality (ALTER DATABASE ADD LOGFILE MEMBER '+REDO/orcl/onlinelog/redo1b.log' reuse to group 11; ) ie. you can use the REUSE command to add the logfile of the same name which is physically present in OS Filesystem/Diksgroup to redo log group.
But today, after I issued the below command, I checked the diskgroup location from ASMCMD
SQL> alter database drop logfile group 31;
Database altered.
From ASMCMD, I can that the file has disappeared physically. Is this a new feature with 11.2.0.4 or am I missing something here ?
ASMCMD> ls +DATA/msblprd/onlinelog/group_31.548.833154995
ASMCMD-8002: entry 'group_31.548.833154995' does not exist in directory '+DATA/msblprd/onlinelog/'Just to add to what Aman has said.
It is a bad practice not to let OMF decide the placement of Online redo logs because of this issue especially when you use ASM.
Executing rm command in Linux/Unix is easy but Dropping ASM aliases in the disk group can be a hassle.
This is documented.
"When a redo log member is dropped from the database, the operating system file is not deleted from disk. Rather, the control files of the associated database are updated to drop the member from the database structure. After dropping a redo log file, ensure that the drop completed successfully, and then use the appropriate operating system command to delete the dropped redo log file."
http://docs.oracle.com/cd/E11882_01/server.112/e25494/onlineredo.htm#ADMIN11324
BTW . You don't even need to set db_create_online_log_dest_n to enable OMF for ORLs.
SQL> show parameter log_dest
NAME TYPE VALUE
db_create_online_log_dest_1 string
db_create_online_log_dest_2 string
db_create_online_log_dest_3 string
db_create_online_log_dest_4 string
db_create_online_log_dest_5 string
SQL> show parameter db_create_file_dest
NAME TYPE VALUE
db_create_file_dest string +MBL_DATA
alter database add logfile thread 4
group 31 ('+MBL_DATA','+MBL_FRA') size 4096M,
group 32 ('+MBL_DATA','+MBL_FRA') size 4096M,
group 33 ('+MBL_DATA','+MBL_FRA') size 4096M,
group 34 ('+MBL_DATA','+MBL_FRA') size 4096M ;
Database altered.
And redo logs will be neatly placed as shown below
INST GROUP# MEMBER STATUS ARC
4 31 +MBL_DATA/bsblprd/onlinelog/group_31.276.832605441 UNUSED YES
+MBL_FRA/bsblprd/onlinelog/group_31.297.832605445 UNUSED YES
32 +MBL_DATA/bsblprd/onlinelog/group_32.547.832605451 UNUSED YES
+MBL_FRA/bsblprd/onlinelog/group_32.372.832605457 UNUSED YES
33 +MBL_DATA/bsblprd/onlinelog/group_33.548.832605463 UNUSED YES
+MBL_FRA/bsblprd/onlinelog/group_33.284.832605469 UNUSED YES
34 +MBL_DATA/bsblprd/onlinelog/group_34.549.832605475 UNUSED YES
+MBL_FRA/bsblprd/onlinelog/group_34.359.832605481 UNUSED YES -
Physical Standby Online Redo log files,
Hi,
I'm trying to create a physical standby database (10.2.0.3). I'm a little confused about the requirement for online redo logs on the standby.
in my standby alert log I get the following when I issue:
SQL> alter database recover managed standby database disconnect from session
"ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/appl/oradata/prod/prod_1_redo_01_02.log'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3"
/appl/oradata/prod/prod_1_redo_01_02.log is the path to the location of the online redo logs on the production system. This file does not exist on the standby filesystem so the error is correct.
I assume that it gets this information from the standby control file I created on the production system and copied over to the standby.
Do I need to copy the online redo logs from the primary over to the standby site or do I need to create online redo logs on the standby?
Does the standby need to have redo log files?
I'm not talking about 'standby log files' of the type created using 'alter database add standby log file'. I've not got that far yet.
I just need to establish if a physical standby requires online redo log files?
Thanks in advance,
user234564I wanted to update this thread since I've been dealing with the exact same errors. The basic question is: "does a physical standby need the online redo logs?"
Answer: Not really, until one wants to switchover or failover (and become a primary database). Furthermore, whenever the MRP process is started, Oracle prepares for a possible switchover/failover by "clearing" the online redo logs (MetaLink note# 352879.1). It is not a big deal, since Oracle will build the actual redo files when the "alter database open resetlogs" is accomplished during a "role transition."
In our situation, we have decided to use our standby for nightly exports. We stop MRP, open the database read-only, then restart MRP. We built these standby DBs with RMAN. The RMAN duplicate process will not build the online redo log files until the database is opened for read/write (with resetlogs). However, we haven't had a need for read/write (i.e. a switchover).
Thus, every morning we have been getting the same errors that "user234564" posted above. At first the errors seemed scary, then we realized they were just a nusiance. In order to clean things up, all I did was just "cp" our stanby redo logs (SRL) into our online redo directories ensuring the names matched what was in v$logfile. When I restarted MRP, the alert log clearly showed Oracle clearing these "newly found" online redo logs. -
The file structure online redo log, archived redo log and standby redo log
I have read some Oracle documentation for file structure and settings in Data Guard environment. But I still have some doubts. What is the best file structure or settings in Oracle 10.2.0.4 on UNIX for a data guard environment with 4 primary databases and 4 physical standby databases. Based on Oracle documents, there are 3 redo logs. They are: online redo logs, archived redo logs and standby redo logs. The basic settings are:
1. Online redo logs --- This redo log must be on Primary database and logical standby database. But it is not necessary to be on physical standby database because physical standby is not open. It doesn't generate redo log. However, if don't set up online redo log on physical standby, when primary failover and switch standby as primary. How can standby perform without online redo logs? In my standby databases, online redo logs have been set up.
2. Archived redo logs --- It is obviously that primary database, logical and physical standby database all need to have this log file being set up. Primary use it to archive log files and ship to standby. Standby use it to receive data from archived log and apply to database.
3. Standby redo logs --- In the document, it says A standby redo log is similar to an online redo log, except that a standby redo log is used to store redo data received from another database. A standby redo log is required if you want to implement: The maximum protection and maximum availability levels of data protection and Real-time apply as well as Cascaded destinations. So it seems that this standby redo log only should be set up on standby database, not on primary database. Am my understanding correct? Because I review current redo log settings on my environment, I have found that Standby redo log directory and files have been set up on both primary and standby databases. I would like to get more information and education from experts. What is the best setting or structure on primary and standby database?FZheng:
Thanks for your input. It is clear that we need 3 type of redo logs on both databases. You answer my question.
But I have another one. In oracle ducument, it says If you have configured a standby redo log on one or more standby databases in the configuration, ensure the size of the current standby redo log file on each standby database exactly matches the size of the current online redo log file on the primary database. It says: At log switch time, if there are no available standby redo log files that match the size of the new current online redo log file on the primary database. The primary database will shut down
My current one data gurard envirnment setting is: On primary DB, online redo log group size is 512M and standby redo log group size is 500M. On the standby DB, online redo log group size is 500M and standby redo log group size is 750M.
This was setup by someone I don't know. Is this setting OK? or I should change Standby Redo Log on standby DB to 512M to exactly meatch with redo log size on primary?
Edited by: 853153 on Jun 22, 2011 9:42 AM -
Online redo logs on a physical standby?
A question on REDO logs on physical standby databases. (10.2.0.4 db on Windows 32bit)
My PRIMARY has 3 ONLINE REDO groups, 2 members each, in ..ORADATA\LOCP10G
My PHYSICAL STANDBY has 4 STANDBY REDO groups, 2 members each, in ..ORADATA\SBY10G
I have shipping occurring from the primary in LGWR, ASYNC mode - max availablility
However I notice the STANDBY also has ONLINE REDO logs, same as the PRIMARY, in the ..ORADATA\SBY10G folder
According to the 10g Dataguard docs, section 2.5.1:
"Physical standby databases do not use an online redo log, because physical standby databases are not opened for read/write I/O."
I have tried to drop these on the STANDBY when not in apply mode, but I get the following:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Database altered.
SQL> ALTER DATABASE DROP LOGFILE GROUP 3;
ALTER DATABASE DROP LOGFILE GROUP 3
ERROR at line 1:
ORA-01275: Operation DROP LOGFILE is not allowed if standby file management is
automatic.
I also deleted them while the STANDBY instance was idle, but it recreated them when moved to MOUNT mode.
So my question is why is my PHYSICAL recreating and using these, if the docs say the shouldn't?
I saw the same error mentioned here: prob. with DataGuard
Is this a case of the STANDBY needing at least a notion of where the REDO logs will need to be should a failover occur, and if the files are already there, the standby database CONTROLFILE will hold onto them, as they are not doing any harm anyway?
Or, is this a prooduct of having management=AUTOMATIC - i.e. the database will create these 'automatically'
Ta
btAccording to the 10g Dataguard docs, section 2.5.1:
"Physical standby databases do not use an online redo log, because physical standby databases are not opened for read/write I/O."yes, those are used when database is open.
You should not perform any changes in Standby. Even if those exist online redo log files, whats the difficulty you have seen?
These will be used whenever you performed switchover/failover. So nothing to worry on this.
Is this a case of the STANDBY needing at least a notion of where the REDO logs will need to be should a failover occur, and if the files are already there, the standby database CONTROLFILE will hold onto them, as they are not doing any harm anyway?Then oracle functionality itself harm if you think in that way. When they not used in open then what the harm with that?
Standby_File_management --> for example if you add any datafile, those information will be in archives/redos once they applied on standby those will be added automatically when it is set to AUTO if its manual, then it creates a unnamed file in $ORACLE_HOME/dbs location later you have to rename that file and recovery need to perform .
check this http://docs.oracle.com/cd/B14117_01/server.101/b10755/initparams206.htm
HTH. -
Commit Completes although current online redo log file have been removed.
Although i have removed current online redo log file in linux os (Oracle Linux),when i type "commit" it says that "commit complete".
Is this fair for this princip?*:" if Only when all redo records associated with a given transaction are safely on disk in the online logs is the user process notified that the transaction has been committed."*
I think that it can lead to loss of data in some cases..I'm using Oracle 11g R2 on OEL (x64)..
Can anyone explain me ? I'm getting stuck in this situation..
P.S : I haven't multiplexed current ORL group files...Javid wrote:
Although i have removed current online redo log file in linux os (Oracle Linux),when i type "commit" it says that "commit complete".
Is this fair for this princip?*:" if Only when all redo records associated with a given transaction are safely on disk in the online logs is the user process notified that the transaction has been committed."*
I think that it can lead to loss of data in some cases..I'm using Oracle 11g R2 on OEL (x64)..
Can anyone explain me ? I'm getting stuck in this situation..
In *nix, a file that is open by a process isn't really deleted until the process that has it completes. So even though you 'deleted' a redo log, oracle is still holding it. As soon as you stop your database (maybe even as soon as the db does a log switch) the redo will really be gone and no longer available. consider the implications for archive logging.
P.S : I haven't multiplexed current ORL group files...You need to fix that. the online logs are the achilles heel of the database. That's why it is standard practice to multiplex them. -
Application of online redo logs
Dear all,
In my organisation recently standby database has been configured. Now my task is to restore a full online+redo backup which is created in primary database in the standby database. Once it is over I have to apply the newly created redo logs generated after the online backup.
I am planning to restore the online+redo backup using the following command
brrestore -b "BRBACKUP log file" -m full. Once it is done I have to apply the online redo logs. I am confused how to apply manually the newly created redo logs. Is there any document regarding it. I searched and found many information in net but nothing seems to be very convincing as this is a critical activity.
Best Regards,
TapanHello Tapan,
> brrestore -b "BRBACKUP log file" -m full. Once it is done I have to apply the online redo logs.
Bad idea, you need a standby controlfile and not a backup controlfile on the standby site.
> I am confused how to apply manually the newly created redo logs. Is there any document regarding it.
You can do this manually by your own or by Oracle Dataguard.
I would suggest that you get a training on Oracle Dataguard and then you will understand the concepts and will be able to setup a DR solution. It makes not much sense to explain you all the steps and the functions, because of in a critical moment you should know what to do and why.
If you really want to try it by your own - so start with this:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/toc.htm
http://download.oracle.com/docs/cd/B19306_01/server.102/b14230/toc.htm
Regards
Stefan
Maybe you are looking for
-
Why animated gifs disappear in slideshow widget?
I opened my project with new version of Muse 2014 but animated gifs on the slideshow widget disappear. They are already visible in previous version of Muse. I made a new slideshow and add some animated gif but there is a blank page when i preview th
-
I restored an iPhone backup that has my old Apple ID
I restored my iPhone 5s today with an old backup that was associated with my old Apple ID and now it is asking for the password to an Apple ID I no longer have. I can't use iCloud on my iPhone now and the phone keeps telling me the password is wrong
-
My latest pano photo have missing landscape. Some of the photos are merged into one. I can provide the examples. What could cause this problem on a new 5C?
-
Show in Answers date of end aggregation made in an essbase ASOcube....
Hallo all, maybe somebody has desided a problem i have: i need to show in a report, made in Answers Oracle BI EE for a multidimensional essbase ASO cube, a date of end last aggregation in a cube. I dont have any idea about possibilities: firstly get
-
Compiling for solaris 9 on solaris 8 machine
Hi, is it possible to use a solaris 8 machine with workshop, to compile binary for solaris 9. I need to compile user-mode app as well as kernel modules both for 64/32 bit environments. The modules are all dynamically linked. If this is possible, what