Applying Archive logs after restore by RMAN
We user RMAN for our backup. I wanted to restore the database and apply all the archive logs.
After I use
RMAN> Restore database ( from last night backup)
RMAN> Recover database
And now I want to apply all the archive logs from which were generated from last night backup say 11:00 pm till 10:00 am today morning.
How can I apply the archive logs.
Thanks
I have the RMAN backup on tape , and I have the archive logs on the disk , as the archive logs would be backed up only the following night.
i.e i want to restore a 10th night backup , and apply the logs from 10th night 11:00 pm to 10:00 am 11th morning. As the archive logs would still be on the disk , how can I apply them..
Thanks
Similar Messages
-
RMAN: How to apply Archive Logs after recoverying of all physical files
Hi;
I am using RMAN Oracle10g; my test database has being corrupted. I have already taken 0 level backup through this command
run {
allocate channel c1 type disk;
backup incremental level 0 tag = Test_Weekly_database format 'O:\rman\backup\Full_Weekly_%d_%s_%p_%t'(database);
release channel c1;
configure controlfile autobackup format for device type disk to 'O:\rman\backup\Auto_Ctrl_weekly_%F';
allocate channel c1 type disk;
sql 'alter system archive log current';
BACKUP tag = Test_Weekly_Arch ARCHIVELOG UNTIL TIME 'SYSDATE-7' format 'O:\rman\backup\Archive_weekly_%d_%s_%p_%t';
DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
release channel c1;
After backing up I inserted few records in TEST123 table. And switch current log file.
Then my database has been corrupted. Now I have last 0 level backup (RMAN) and archive logs files on OS level.
I am recovering my database with the following commands; but archive logs have not being applied. And my inserted records were not presented in TEST123 table.
Kindly guide me
SQL> startup nomount
CMD> RMAN target=/
RMAN>set DBID 1168995671
RMAN>RUN {
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'O:\rman\backup\Auto_Ctrl_weekly_%F';
RESTORE CONTROLFILE from autobackup;
RMAN> ALTER DATABASE MOUNT;
RMAN> RESTORE DATABASE CHECK READONLY;
RMAN> RECOVER DATABASE NOREDO;
RMAN> restore archivelog all;
SQL> startup mount
SQL> alter database backup controlfile to trace;
SQL> shut immediate
SQL> startup nomount
SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG................;
SQL> alter database open resetlogs
---Database altered.
SQL> select * from TEST123;
Not record found
regards;
AsimDear Khurram;
Kindly advise where i m worrg???????
C:\>RMAN target=/
RMAN> set DBID 1168995671
executing command: SET DBID
RMAN> RUN {
2> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'O:\rman\backup\Auto_Ctrl_weekly_%F';
3> RESTORE CONTROLFILE from autobackup;
4> }
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 27-DEC-07
using channel ORA_DISK_1
recovery area destination: O:\rman\backup
database name (or database unique name) used for search: ORCL
channel ORA_DISK_1: no autobackups found in the recovery area
channel ORA_DISK_1: looking for autobackup on day: 20071227
channel ORA_DISK_1: autobackup found: O:\rman\backup\Auto_Ctrl_weekly_c-11689956
71-20071227-04
channel ORA_DISK_1: control file restore from autobackup complete
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL
Finished restore at 27-DEC-07
RMAN> ALTER DATABASE MOUNT;
database mounted
released channel: ORA_DISK_1
RMAN> RESTORE DATABASE CHECK READONLY;
Starting restore at 27-DEC-07
Starting implicit crosscheck backup at 27-DEC-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=154 devtype=DISK
Crosschecked 9 objects
Finished implicit crosscheck backup at 27-DEC-07
Starting implicit crosscheck copy at 27-DEC-07
using channel ORA_DISK_1
using channel ORA_DISK_2
Finished implicit crosscheck copy at 27-DEC-07
searching for all files in the recovery area
cataloging files...
no files cataloged
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
restoring datafile 00002 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
restoring datafile 00003 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
restoring datafile 00004 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
restoring datafile 00005 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEST.DBF
restoring datafile 00006 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEST2
channel ORA_DISK_1: reading from backup piece O:\RMAN\BACKUP\FULL_WEEKLY_ORCL_3_
1_642420573
channel ORA_DISK_1: restored backup piece 1
piece handle=O:\RMAN\BACKUP\FULL_WEEKLY_ORCL_3_1_642420573 tag=Test_WEEKLY_DATAB
ASE
channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
Finished restore at 27-DEC-07
RMAN> restore archivelog all;
archive log thread 1 sequence 1 is already on disk as file O:\ARCHIVE\ARC00001_0642356125.001
archive log thread 1 sequence 2 is already on disk as file O:\ARCHIVE\ARC00002_0642356125.001
archive log thread 1 sequence 3 is already on disk as file O:\ARCHIVE\ARC00003_0642356125.001
archive log thread 1 sequence 4 is already on disk as file O:\ARCHIVE\ARC00004_0642356125.001
archive log thread 1 sequence 5 is already on disk as file O:\ARCHIVE\ARC00005_0642356125.001
archive log thread 1 sequence 6 is already on disk as file O:\ARCHIVE\ARC00006_0642356125.001
archive log thread 1 sequence 7 is already on disk as file O:\ARCHIVE\ARC00007_0642356125.001
archive log thread 1 sequence 8 is already on disk as file O:\ARCHIVE\ARC00008_0642356125.001
archive log thread 1 sequence 9 is already on disk as file O:\ARCHIVE\ARC00009_0642356125.001
archive log thread 1 sequence 10 is already on disk as file O:\ARCHIVE\ARC00010_0642356125.001
archive log thread 1 sequence 11 is already on disk as file O:\ARCHIVE\ARC00011_0642356125.001
archive log thread 1 sequence 12 is already on disk as file O:\ARCHIVE\ARC00012_0642356125.001
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=15
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=16
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=17
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=18
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=19
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=20
channel ORA_DISK_1: reading from backup piece O:\RMAN\BACKUP\ARCHIVE_WEEKLY_ORCL_5_1_642420630
channel ORA_DISK_1: restored backup piece 1
piece handle=O:\RMAN\BACKUP\ARCHIVE_WEEKLY_ORCL_5_1_642420630 tag=Test_WEEKLY_ARCH
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
Finished restore at 27-DEC-07
RMAN> ALTER DATABASE OPEN;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 12/27/2007 10:27:10
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
Regards;
Asim -
Restoring archive log after cold backup
Hello forums users,
I read many thing on this topic but I didn't find the good answer.
I performed a cold backup each sunday.
My database is in ARCHIVE LOG mode.
Is it possible to restore ARCHIVE LOG files after restoring COLD backup?
Sunday : cold backup
Monday : new archive log have been created since cold backup
Tuesday : same as Monday
Wednesday : I would like to restore to Monday 22:00 for example
Can I restore cold backup + apply archive log until Monday 22:00 ?
Regards,
Guillaumerecover database using backup controlfile until cancel|time|logseq|scn
will do this and prompt you for the archivelogs.
Known as 'incomplete recovery'
Hth
Sybrand Bakker
Senior Oracle DBA -
Is there a way to apply archive logs, standby DB is opened with 'resetlogs'
Hi All,
I have setup a standby database (Oracle 10g SE). I applied hot backup and archive logs to the standby database till yesterday. I have opened the standby database using 'alter database open resetlogs;" and validated the application functionality using the standby database.
Now I want to regularly apply logs from the Primary database to the standby database, but today I have opened the standby database using 'alter database open resetlogs;"
Need assistance to know the way to apply archive logs, once the standby database is opened with 'resetlogs' option to keep it in sync with the Primary database.
Thanks
KunalWelcome to OTN,
I have setup a standby database (Oracle 10g SE). I applied hot backup and archive logs to the standby database till yesterday. I have opened the standby database using 'alter database open resetlogs;" and validated the application functionality using the standby database.Standby opened with *resetlogs* ? What you did? have you performed failover of standby database?
Now I want to regularly apply logs from the Primary database to the standby database, but today I have opened the standby database using 'alter database open resetlogs;"
Need assistance to know the way to apply archive logs, once the standby database is opened with 'resetlogs' option to keep it in sync with the Primary database.Have you enabled Flashback & created Restore point? If so you can do it.. If not rebuild standby again.
Check this scenario How To Open Physical Standby For Read Write Testing and Flashback [ID 805438.1] -
To clear db2 archive log after db2 database backup
After db2 backup archive log remains as it is.is there setting to remove archive logs after database backup.DAS is not installed.
DB2 9.1 FP 6
os HP unixHello Anand,
If the archvied logs are not required, ie they are not required for restore
you can remove them.
You can check this is by running
db2 list history all for db <sid>
The above command will give you a detailed overview of the backup
history and what logs were archived and what logs were included or needed for restore of backups.
If they are no longer needed for a restore, then it is safe to remove them.
Kind regards,
Paul -
Delete only applied archive logs
Hi,
I am new to RMAN. What is the command to delete all applied archive logs using RMAN in 11g Release2 ?
ThxHi,
What is your os ?
If it s linux/unix then try this shell script.
#!/bin/bash
ALERT=/oracle/app/oracle/diag/rdbms/dgbrm/dgbrm/trace/alert_dgbrm.log
tail -30000 $ALERT | grep "Media Recovery Log" | cut -d " " -f 4 | head --lines=-2 > files.txt
awk '{ system( "rm -rf " $_ ) }' files.txt
source: http://emrebaransel.blogspot.in/2009/03/delete-applied-archivelogs-on-standby.html
Thanks,
Ranjith -
Could u tell me last applyed archive log in disaster recovery server
Hi DBA'S,
we are using oracle 9.2.0.8 my production database has dr(our dr is not a stand by it is created in diff way) server every time one cron job sync the database and transfer the new logs from production server to dr server. i want to know last applied archive in dr server.
i am using this query select max(sequence#) from v$log_history; it is showing same results in boath production and dr when ever we backup 2 days before archive to some backup directory sync is going to fail
please tell me correct query to find out the last applied archived log in dr server
Thanks&Regards
Tirupathiwe are using oracle 9.2.0.8 my production database has dr(our dr is not a stand by it is created in diff way) server every time one cron job sync the database and transfer the new logs from production server to dr server. i want to know last applied archive in dr server.i am using this query select max(sequence#) from v$log_history; it is showing same results in boath production and dr when ever we backup 2 days before archive to some backup directory sync is going to fail
please tell me correct query to find out the last applied archived log in dr server>
As you are running cron job to bring the dr in sync, i suppose v$log_history might give you the wrong results.In your case check :-
select sequence#,applied from v$archived_log where applied='YES';
select max(sequence#) from v$archived_log where applied='YES';Would like to know, why manual recovery (archive logs being manually applied) is being performed, and not automatic.
In case you switch to automatic below query would be useful :-
select al.thrd "Thread", almax "Last Seq Received", lhmax "Last Seq Applied"
from (select thread# thrd, max(sequence#) almax
from v$archived_log
where resetlogs_change#=(select resetlogs_change# from v$database)
group by thread#) al,
(select thread# thrd, max(sequence#) lhmax
from v$log_history
where first_time=(select max(first_time) from v$log_history)
group by thread#) lh
where al.thrd = lh.thrd;Refer [http://aprakash.wordpress.com/2010/07/21/use-of-varchived_log-and-vlog_history-on-physical-standby/]
HTH
Anand -
New standby not applying archive log
I have just created standby database....but its not applying archive log...
when I checked the alerlog file of standby....
ora-19527 physical standby redo log must be renamedyes, I have created at onlien redo logs at standby database..
what is test and test?
i saw one command like this...
log_file_name_convert= ((''/u01/oradata/prod'', ''/u01/oradata/standby''),(''/u02/oradata/prod'', ''/u02/oradata/standby''))
My Primary DB name is OraclePM
My Standby DB name is OracleDR
I have placed all redo logs in direcrtory (D:\oracle\product\logs\ ) the directory structure for both databases is same... I have created 3 additionals redo logs at standby database...
How can I edit my standby init file... -
Manually apply archived log to standby database.
Hi all,
I am working on oracle 10g EE(10.2.0.4).I am having a very difficult database switchover case in my hand.
1.> There are two database .one primary(prim) and another standby(standby).
2.> Initially both of them was configured as oracle data guard, where prim was primary and standby was standby using rman .(RMAN>duplicate target database for
standby dorecover).
3.>But the rate of generation of archivelog is very high( 20 archivelog per hour with 200mb each).
4.> So automatic shipping of archivelog has been disabled from primary.(log_archive_dest_state_2=defer and nullifying the value of log_archive_dest_2).
5> Now after a period of time archived logs are shipped to dr site manually and applied manually.(alter database recover automatic standby database;)
6.> Now there is a hardware problem occured at primary..it will take 72 hours to come up.
How can i use standby database as primary for that 72 hour.As archive log apply is manually done and parameters are being changed,can i switch over these two?
Is it possible to switchover and switch back these two database with such a configuration?How can i use standby database as primary for that 72 hour.As archive log apply is manually done and parameters are being changed,can i switch over these two?
Is it possible to switchover and switch back these two database with such a configuration?
As of now you can perform failover your standby to primary database. you should have flashaback enabled, so you have to create a restore point.
Then it can be opened in read & write mode, So once you finished again you can go back to that point.
http://docs.oracle.com/cd/B19306_01/server.102/b14239/manage_ps.htm#i1017111
The above case applicable if you ready to loose, But it doesnt make sense. But in your case this doesnt work. Because once you start use of Standby as primary, there would be live/production data, which you need very much.
So there is lot of work to do.
You have to rebuild standby database and then switchover back to same location. So its a little trip work.
Have you enabled Dataguard Broker ?
Edited by: CKPT on Mar 13, 2012 1:43 PM -
Corruption of archived logs after redo resizing - URGENT
Hello all,
We have a RAC 9i 2-node DB, running on RHEL 3 machines.
We resized our redo logs from 100M to 1G to avoid "Can not allocate log, archival required" messages.
The operation was successful, but now we are facing problems with the ext3 filesystem holding the archived logs.
Each node has its own arc location, mounted only once.
When we run "ls" in the arc destination, we get "ls: Input/output error" messages.
RMAN complains also about corrupted arcvhived logs.
The day before Yesterday we reformatted one arc destination, and today the messages appeared in the other one.
Do you have any suggestion?
JonathanDid the problem occur right after increasing the log size? Then the first thing to do would be to decrease the log size, but add more log groups to fix the "Can not allocate..." problem.
If "ls" doesn't work, your file system is stuffed.Reformat the archive dest and do simple file copies to verify the integrity, before putting the archive logs back on.
That's just for starters... -
Apply archive logs to database
I have a production database that is online. I'm planning to setup a pc with the same configurations as that of the db server and use that server as the reporting generation. The clone pc's database will be one day delay compared to the production database. I'm planning to use export/import but someone suggested to use the archive log files of the production database and apply it to the clone pc, is this doable?
I have a full export backup and all the archive log of the production database, is this enough to restore the clone pc to the state( one day back) of the production database?
Need your suggestions. ThanksYou can do this while configuring physical standby database.
go through the link below to know more about physical standby
http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10823/create_ps.htm
regards -
Path to redo logs after restoring of controlfile
Hello!
After restoring of controlfile I see distorted redo logs metadata (column v$logfile.member ) :
$OH/dbs/data/ora/MY_SID/rlog/redo1a.logIn source database redo logs placed in other directory,
also I should drop logfile members and logfile groups and then to create them again , but may be there is other way to fix this issue?
Please advise.
I'm usung 11.2.0.3
Thanks and regards,
PavelHello Grirsh
Thank You.
You mean you are having some other name of redolog files than in the folder ?Yes , You are right. In database never was redo with this path.
If yes, it means they may be something else, because Oracle is just using the those files which are showing in column of member of v$logfile view.Sorry. Could I ask You please to explain this phrase, as I wrote In database never was redo with this path,
from where they appear after restoring of controlfile ?
I saw the binary file from which control file was created through browsers, it doesn't contain the path mentioned in my first post
Best regards,
Pavel -
Manually Apply Archived log to stand by database
Hi all,
I'm using Oracle 10g. So, we need to apply the archived logs of Primary database to stand by database, but this process must be manually.
A "robot" copy the archived logs to destination. I need to get these archived logs from destination and manually apply to stand by database.
How can I do this?
thank you very much!!!!How can I do this?First stop current recover process as
alter database recover managed standby database cancel;Then transfer all need archive logs from primary to standby side and apply these manually using below command.
recover standby database until cancel
/*this command will ask full path of archive logs
and give these then finally enter "CANCEL" word*/Finally you can continue normal/automatic state using
alter database recover managed standby database ; -
Dataguard sync and applying archive log
Just did a check on my primary and standby using:
Primary:
SELECT max(sequence#) AS "PRIMARY" FROM v$log_history;
PRIMARY
45527
Standby:
SELECT max(sequence#) AS "STANDBY", applied FROM v$archived_log GROUP BY applied:
STANDBY APP
45476 NO
45528 YES
My question is how do I fix my sync?SQL> select OPEN_MODE from v$database;
OPEN_MODE
MOUNTED
SQL> recover standby database until cancel;
ORA-01153: an incompatible media recovery is active
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Database altered.
SQL> recover standby database until cancel;
ORA-00279: change 4558008 generated at 08/21/2010 14:02:39 needed for thread 1
ORA-00289: suggestion : /data_gpfs/oracle/archivelogs/1_112_726952005.dbf
ORA-00280: change 4558008 for thread 1 is in sequence #112
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
*/data_gpfs/oracle/archivelogs/2_118_726952005.dbf*
ORA-00325: archived log for thread 1, wrong thread # 2 in header
ORA-00334: archived log: '/data_gpfs/oracle/archivelogs/2_118_726952005.dbf' -
How to backup and apply the backup after restored my iPod?
Hi, I just want to know how can I backup my iPod and apply the backup after I restored my iPod. Thanks.
Do you have all the songs contained in your iPod also in iTunes?
If the songs/content of your iPod all show up in iTunes under Library and the various subcategories (music, videos, ...) when you launch it, then they are "backed up" already. Then you can just restore your iPod and re-sync.
If the only existing copy of the files is on your iPod, then you need to move them from the iPod to another disk drive. I'm not sure how to do that, except for iTunes store purchases, you need to use some other procedure/program outside of iTunes.
Maybe you are looking for
-
Camera Raw 6.7 installation not working with Photoshop CS5.1
I have been trying to upgrade Camera Raw to 6.7 on my windows 7(32) machine running CS5.1. It will not update via Help>Update (indicates download problem) or manually using the downloaded file and AdobePatchInstaller.exe (indicates "an error install
-
Plz help
-
Trying to add html content with Dw for Rf page (Dw is not displaying page correctly also)
This is how the page looks in Reflow: This is how the page looks in Dw CC (2014) Here are the ways we have tried so far to get our html quizmaker file to load and run in Rf page: The commented out items were previous attempts to get the content to lo
-
Configuring weblogic as a webserver
We have a client with the following architecture: 1. Weblogic 5.1 as web server on one host (used for jsp) 2. Weblogic 5.1 as app server on a different host behind the firewall (used for ejb) Both are running on Solaris 7. How do I configure these tw
-
I can't download the creative cloud desktop
I've been trying to download this for over 24 hours now, with no luck. Everytime I try, I get this message: We've encountered the following issue: The remote server is not responding in a proper manner. Please try again in a few minutes. Please help!