Rman point in time recovery
Windows server 2003
Oracle 10g
Hi all please help.
I'm doing a reorg so I exported the production schemas and droped the schemas so that I can import the data again, but I dropped one user with out exporting it first!. I have no full exports but archivelog is enabled.
I want to do a point in time recovery :
RMAN> RUN
2> {
3> SET UNTIL TIME 'DEC 12 2009 04:00:00';
4> RESTORE DATABASE;
5> }
executing command: SET until clause
using target database control file instead of recovery catalog
Starting restore at DEC 13, 2009 13:30:53
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=541 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=540 devtype=DISK
creating datafile fno=1 name=E:\ORADATA\JDE\DATA\SYSTEM01.DBF
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/13/2009 13:30:58
ORA-01180: can not create datafile 1
ORA-01110: data file 1: 'E:\ORADATA\JDE\DATA\SYSTEM01.DBF'
Just prior to this i did a restore/recover with a sequence nr, no problem but it didn't work, the schemas still wasn't there, so now i want to use a timestamp.
Please help this is a production database
RUN
SET UNTIL sequence 5657;
RESTORE DATABASE;
RECOVER DATABASE;
}
ORA-01180: can not create datafile 1Basically this error means RMAN 'thinks, I have no backup of datafile 1 and will try to create datafile 1. Afterwards I will apply archivelogs to the newly created datafile' . But that is not possible for datafile 1.
By the way instead of 'DEC 12 2009 04:00:00', I would always use something like
"TO_DATE('DEC 12 2009 04:00:00','MM DD YYYY HH24:MI:SS')" .
So you are sure the date is always interpreted correctly - independent of your default format settings.
Werner
Similar Messages
-
Doubt about database point in time recovery using rman
Hi Everyone,
I have been practising various rman restore and recovery scenarios . I have a doubt regarding database point in time recovery using rman. Imagine i have a full database backup including controlfile scheduled to run at 10 PM everyday. today is 20th dec 2013. imagine i want to restore the database to a prior point in time ( say 18th dec till 8 AM). so i would restore all the datafiles from 17th night's backup and apply archives till 8 AM of 18th dec . in this scenario should i restore the controlfile too from 17th dec bkp ( i am assuming yes we should ) or can we use the current controlfile ( assuming it is intact). i found the below from oracle docs.
Performing Point-in-Time Recovery with a Current Control File
The database must be closed to perform database point-in-time recovery. If you are recovering to a time, then you should set the time format environment variables before invoking RMAN. The following are sample Globalization Support settings:
NLS_LANG = american_america.us7ascii
NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS"
To recover the database until a specified time, SCN, or log sequence number:
After connecting to the target database and, optionally, the recovery catalog database, ensure that the database is mounted. If the database is open, shut it down and then mount it:
2. SHUTDOWN IMMEDIATE;
3. STARTUP MOUNT;
4.
Determine the time, SCN, or log sequence that should end recovery. For example, if you discover that a user accidentally dropped a tablespace at 9:02 a.m., then you can recover to 9 a.m.--just before the drop occurred. You will lose all changes to the database made after that time.
You can also examine the alert.log to find the SCN of an event and recover to a prior SCN. Alternatively, you can determine the log sequence number that contains the recovery termination SCN, and then recover through that log. For example, query V$LOG_HISTORY to view the logs that you have archived.
RECID STAMP THREAD# SEQUENCE# FIRST_CHAN FIRST_TIM NEXT_CHANG
1 344890611 1 1 20037 24-SEP-02 20043
2 344890615 1 2 20043 24-SEP-02 20045
3 344890618 1 3 20045 24-SEP-02 20046
Perform the following operations within a RUN command:
Set the end recovery time, SCN, or log sequence. If specifying a time, then use the date format specified in the NLS_LANG and NLS_DATE_FORMAT environment variables.
If automatic channels are not configured, then manually allocate one or more channels.
Restore and recover the database.
The following example performs an incomplete recovery until November 15 at 9 a.m.
RUN
SET UNTIL TIME 'Nov 15 2002 09:00:00';
# SET UNTIL SCN 1000; # alternatively, specify SCN
# SET UNTIL SEQUENCE 9923; # alternatively, specify log sequence number
RESTORE DATABASE;
RECOVER DATABASE;
If recovery was successful, then open the database and reset the online logs:
5. ALTER DATABASE OPEN RESETLOGS;
I did not quiet understand why the above scenario is using current controlfile as the checkpoint scn in the current controlfile and the checkpoint scn in the datafile headers do not match after the restore and recovery. Thanks in Advance for your help.
Thanks
satyaThanks for the reply ... but what about the checkpoint scn in the controlfile . my understanding is that unless the checkpoint scn in the controlfile and datafiles do not match the database will not open. so assuming the checkpoint scn in my current controlfile is 1500 and i want to recover my database till scn 1200. so the scn in the datafiles (which is 1200) is not not matching with the scn in the controlfile(1500). so will the database open in such cases.
Thanks
Satya -
Unable to recover tablespace point in time recovery
Hi,
I am trying to recover the tablespace point in time recovery but its throwing an error
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/27/2011 17:22:13
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
Question: Do I need to take prior backup before doing tablespace point in time recovery.
Please help me.Thanks for the info...
I have taken the full back and tried the same scenrio, now I am getting
contents of Memory Script:
# shutdown clone before import
shutdown clone immediate
# drop target tablespaces before importing them back
sql 'drop tablespace A including contents keep datafiles';
executing Memory Script
database closed
database dismounted
Oracle instance shut down
sql statement: drop tablespace A including contents keep datafiles
Removing automatic instance
shutting down automatic instance
target database instance not started
Automatic instance removed
auxiliary instance file /home/oracle/auxdest/TEST/datafile/o1_mf_temp_6vj4c78c_.tmp deleted
auxiliary instance file /home/oracle/auxdest/TEST/onlinelog/o1_mf_3_6vj4c5nk_.log deleted
auxiliary instance file /home/oracle/auxdest/TEST/onlinelog/o1_mf_1_6vj4c4k1_.log deleted
auxiliary instance file /home/oracle/auxdest/TEST/datafile/o1_mf_sysaux_6vj49h7l_.dbf deleted
auxiliary instance file /home/oracle/auxdest/TEST/datafile/o1_mf_undotbs1_6vj49hbl_.dbf deleted
auxiliary instance file /home/oracle/auxdest/TEST/datafile/o1_mf_system_6vj49hbw_.dbf deleted
auxiliary instance file /home/oracle/auxdest/TEST/controlfile/o1_mf_6vj49813_.ctl deleted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/27/2011 18:23:02
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on default channel at 04/27/2011 18:23:02
RMAN-11003: failure during parse/execution of SQL statement: drop tablespace A including contents keep datafiles
ORA-00604: error occurred at recursive SQL level 1
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
RMAN>
Please help me -
Database Point-in-time recovery
Hi,
When I apply a database point-in-time recovery, I open resetlogs the database so is that means I cannot use any previous backup or archive log beyond the time I have restored the database to?Not necessarily - it depends on your database version
http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmrvcon.htm#BRADV89712
HTH
Srini -
Need help with Backup Recovery using Rman - Point in Time.
Hi all,
I am trying to recover my database to a certain point in time. Here are the details below.
Oracle database version is. 11G R1. on 2 Node RAC. OS is AIX.
Database name is Sales.
Due to a mistake by the Application team, the database is written over by bad data. Now I have to restore the database in to a point in time, where the database was good.
For this, i took a whole (full) RMAN backup, everything, all the archivelog files and Controlfiles as well.
After doing this, i dropped the entire database. So now everything is clean.
Now i have to restore and recover the database to this point in time.. 03/16/2011 12:45:00
Please guide.
The backups are located at.. /backup/sales/rman/
I am trying various things, but each time i get the msg..
ORA-01507: database not mounted
I understand.. the reason for this message is the controlfile does not exist.. as the database is in mount mode. But as i said.. i have dropped the database in order to proceed with entire restoration.
But i have taken a whole backup.. which also includes the controlfiles + archivefiles.
Please guide.. with proper steps and commands.Hi,
Priror to start with restore and recovery - Try to restore the control file from backups "/backup/sales/rman/"
Then further you can mount the db and further carry on with recovery (catalog the backups prior to recovery)
- Pavan Kumar N -
Tablespace Point in Time Recovery fails with RMAN-06026:
I have cataloged with RMAN the datafiles from Snapshot backup. Still it fails with the following error.
RMAN> RECOVER TABLESPACE TSPC UNTIL TIME "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')" AUXILIARY DESTINATION '/tmp/auxpran';
Starting recover at 03-APR-13
using channel ORA_DISK_1
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time
List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1
Creating automatic instance, with SID='Ebgt'
initialization parameters used for automatic instance:
db_name=ORCL
db_unique_name=Ebgt_tspitr_ORCL
compatible=11.2.0.0.0
db_block_size=8192
db_files=200
sga_target=280M
processes=50
db_create_file_dest=/tmp/auxpran
log_archive_dest_1='location=/tmp/auxpran'
#No auxiliary parameter file used
starting up automatic instance ORCL
Oracle instance started
Total System Global Area 292933632 bytes
Fixed Size 1336092 bytes
Variable Size 100666596 bytes
Database Buffers 184549376 bytes
Redo Buffers 6381568 bytes
Automatic instance created
Running TRANSPORT_SET_CHECK on recovery set tablespaces
TRANSPORT_SET_CHECK completed successfully
contents of Memory Script:
# set requested point in time
set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
executing Memory Script
executing command: SET until clause
Starting restore at 03-APR-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: copied control file copy
input file name=/tmp/auxpran/controlbc.ctl
output file name=/tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl
Finished restore at 03-APR-13
sql statement: alter database mount clone database
sql statement: alter system archive log current
sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
contents of Memory Script:
# set requested point in time
set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 2 to new;
set newname for clone tempfile 1 to new;
set newname for datafile 5 to
"+DG_DATA/orcl/datafile/tspc.268.811733685";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 3, 2, 5;
switch clone datafile all;
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /tmp/auxpran/ORCL/datafile/o1_mf_temp_%u_.tmp in control file
Starting restore at 03-APR-13
using channel ORA_AUX_DISK_1
One or more auxiliary set datafiles could not be removed
Removing automatic instance
shutting down automatic instance
database dismounted
Oracle instance shut down
Automatic instance removed
auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl deleted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/03/2013 02:32:55
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
Could anyone please reply ASAP?
Regards,
PranamI had created a snapshot of the database(datafiles and archivelogs) and cataloged them.
CATALOG START WITH "+TBL_DG_DATA/ORCL/DATAFILE/" NOPROMPT;
catalog start with "+DG_ARCH/ORCL/ARCHIVELOG/" NOPROMPT;
The time i gave was after the snapshot was created.
When it failed the first time I created another controlfile using
sql "alter database backup controlfile to ''/tmp/auxpran/controlbc.ctl''";
And ran the recover command after the time after i generated this controlfile. Changed nothing else. TSPITR completed successfully. But it had failed first time. Cannot figure how it ran the second time but failed the first time.
Removing automatic instance
Automatic instance removed
auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_temp_8opndd87_.tmp deleted
auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_3_8opnd1o6_.log deleted
auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_2_8opncy32_.log deleted
auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_1_8opncv7d_.log deleted
auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_sysaux_8opn516p_.dbf deleted
auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_undotbs1_8opn4j14_.dbf deleted
auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_system_8opmyvly_.dbf deleted
auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opmy14q_.ctl deleted
Finished recover at 03-APR-13 -
RMAN and Point IN time recovery
1. We have a table with bad data.
2. We know that data was entered via the GUI exactly one week ago.
3. I have an RMAN database full back-up that was taken the same day but before the table was screwed.
4. the database in archivelog mode.
5. we will be happy to restore the database in the condition before the change occured
5. when I restore database via RMAN, and do:
recover UNTIL TIME '16-MAR-2005';
Oracle restore bad data, and if I put time or scn I get a message that the database incarnation is wrong!
Is there any other way to do it?
TIAThanks Laurent! I was able to restore it only until Mar. 17?
1. RMAN> reset database to incarnation 2;
2. RMAN> restore database until time "timestamp '2005-03-15 00:00:00.00'";
RMAN-03002: failure of recover command at 03/29/2005 19:44:11
RMAN-06555: datafile 1 must be restored from backup created before 15-MAR-05
3. My backup was created on Mar. 16, :
RMAN> restore database until time "timestamp '2005-03-17 00:00:00.00'";
RMAN-03002: failure of restore command at 03/29/2005 19:46:55
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
4. RMAN>Restore database; OK
5. RMAN>Recover database; internal error!
RMAN-03002: failure of recover command at 03/29/2005 20:08:02
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database reco
ver logfile 'G:\ORACLE\ORA10G\FLASH_RECOVERY_DATA\ORCLSRMA\CONTROLFILE\2005_03_2
3\O1_MF_1_14_14442T9B_.ARC'
ORA-00283: recovery session canceled due to errors
ORA-00600: internal error code, arguments: [3021], [1], [15], [2], [0], [419057]
, [0], [416789]
6. RMAN> recover database until time "timestamp '2005-03-17 00:00:00.00'"; OK
7.RMAN> recover database until time "timestamp '2005-03-17 00:00:00.00'"; OK
8. RMAN> alter database open resetlogs; OK
9. RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 ORCLSRMA 2671268838 PARENT 1 09-MAR-04
2 2 ORCLSRMA 2671268838 PARENT 318842 01-MAR-05
3 3 ORCLSRMA 2671268838 ORPHAN 380529 25-MAR-05
5 5 ORCLSRMA 2671268838 CURRENT 409286 29-MAR-05
4 4 ORCLSRMA 2671268838 ORPHAN 416789 25-MAR-05 -
RMAN tablespace point -in-time recovery
Hi Experts,
while recovering TSPITR, I have received this error...
sql statement: alter database mount clone database
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/07/2007 05:06:12
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 05/07/2007 05:06:12
RMAN-11003: failure during parse/execution of SQL statement: alter database mount clone database
ORA-01102: cannot mount database in EXCLUSIVE mode
Please help me..
Thanks
ShaanIs this problem on LINUX database? If so, are there multiple databases running on this server? Or the primary database name and the cloning databse name are same?
If your answer is YES to all the above questions, this is due to BUG on linux for instance locking issues.
Check the alert log of clone database, there are workaround, search on the net.
Jaffar -
Problem in performing multiple Point-In-Time Database Recovery using RMAN
Hello Experts,
I am getting an error while performing database point in time recovery multiple times using RMAN. Details are as follows :-
Environment:
Oracle 11g, ASM,
Database DiskGroups : DG_DATA (Data files), DG_ARCH(Archive logs), DG_REDO(Redo logs Control file).
Snapshot DiskGroups :
Snapshot1 (taken at 9 am): SNAP1_DATA, SNAP1_ARCH, +SNAP1_REDO
Snapshot2 (taken at 10 am): SNAP2_DATA, SNAP2_ARCH, +SNAP2_REDO
Steps performed for point in time recovery:
1. Restore control file from snapshot 2.
RMAN> RESTORE CONTROLFILE from '+SNAP2_REDO/orcl/CONTROLFILE/Current.256.777398261';
2. For 2nd recovery, reset incarnation of database to snapshot 2 incarnation (Say 2).
3. Catalog data files from snapshot 1.
4. Catalog archive logs from snapshot 2.
5. Perform point in time recovery till given time.
STARTUP MOUNT;
RUN {
SQL "ALTER SESSION SET NLS_DATE_FORMAT = ''dd-mon-yyyy hh24:mi:ss''";
SET UNTIL TIME "06-mar-2013 09:30:00";
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
Results:
Recovery 1: At 10.30 am, I performed first point in time recovery till 9:30 am, it was successful. Database incarnation was raised from *2* to *3*.
Recovery 2: At 11:10 am, I performed another point in time recovery till 9:45 am, while doing it I reset the incarnation of DB to *2*, it failed with following error :-
Starting recover at 28-FEB-13
using channel ORA_DISK_1
starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/06/2013 11:10:57
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
start until time 'MAR 06 2013 09:45:00'
ORA-00283: recovery session canceled due to errors
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '+DG_REDO/orcl/onlinelog/group_1.257.807150859'
ORA-17503: ksfdopn:2 Failed to open file +DG_REDO/orcl/onlinelog/group_1.257.807150859
ORA-15012: ASM file '+DG_REDO/orcl/onlinelog/group_1.257.807150859' does not exist
Doubts:
1. Why did recovery failed 2nd time, but not 1st time and why is RMAN looking for online redo log group_1.257.807150859 in 2nd recovery ?
3. I tried restoring control file from AutoBackup, in that case both 1st and 2nd recovery succeeded.
However for this to work, I always need to keep the AutoBackup feature enabled.
How reliable is control file AutoBackup ? Is there any alternative to using AutoBackup, can I restore control file from snapshot backup only ?
4. If I restore control file from AutoBackup, then from what point of time/SCN does RMAN restores the control file ?
Please help me out in this issue.
Thanks.992748 wrote:
Hello experts,
I'm little newbie to RMAN recovery. Please help me in these doubts:
1. If I have datafiles, archive logs & control files backup, but current online REDO logs are lost, then can I perform incomplete database recovery ?yes, if you have backups of everything else
2. Till what maximum time/scn can incomplete database recovery be performed ??Assuming the only thing lost is the redo logs, you can recover to the last scn in the last archivelog.
3. What is role of online REDO logs in incomplete database recovery ? They provide the final redo changes - the ones that have not been written to archivelogs
Are they required for incomplete recovery ?It depends on how much incomplete recovery you need to do.
Think of all of your changes as a constant stream of redo information. As a redolog fills, it is copied to archive, then (eventually) reused. over time, your redo stream is in archivelog_1, continuing into archvivelog_2, then to 3, and eventually, when you get to the last archivelog, into the online redo. A recovery will start with the oldest necessary point in the redo stream and continue forward. Whether or not you need the online redo for a PIT recovery depends on how far forward you need to recover.
But you should take every precaution to prevent loss of online redo logs .. starting with having multiple members in each redo group ... and keeping those multiple members on physically separate disks. -
Can RMAN do table-level recovery
Hi,
I know that you can do database and tablespace level recovery using RMAN. Can you also do table-level recovery? How granular can you get?
ThanksFor table level recovery you can use flashback features:
Flashback Drop - Oracle now provides a way to use flashback to restore tables that were dropped accidentally.
Flashback Table - This feature introduces the FLASHBACK TABLE statement in SQL, which lets you quickly recover a table to a previous point in time without restoring a backup.
etc
Oracle Database has a group of features, known collectively as flashback, that provide ways to view past states of database objects, or to return database objects to a previous state, without using traditional point-in-time recovery.
Flashback features of the database can be used to:
* Perform queries that return past data.
* Perform queries that return metadata showing a detailed history of changes to the database.
* Recover tables or individual rows to a previous point in time.
Flashback features use the Automatic Undo Management system to obtain metadata and historical data for transactions. They rely on undo data: records of the effects of individual transactions. Undo data is persistent and survives a database malfunction or shutdown. Using flashback features, you employ undo data to query past data or recover from logical corruptions. Besides your use of it in flashback operations, undo data is used by Oracle Database to do the following:
* rollback active transactions
* recover terminated transactions using database or process recovery
* provide read consistency for SQL queries
Please refer here: http://www.stanford.edu/dept/itss/docs/oracle/10g/appdev.101/b10795/adfns_fl.htm
And an other method is, if table is very important and your db is working archive mod, you can recovery your database (skip unnecessary tablespaces which is not needed for saving space cost) to another host (disaster recovery), then take export that table, import to your working db or create database link between this databases insert into user.table1 as select * from user.table1@recoevered_database; -
Update clone db to a point-in-time
Hi guys,
I am planning to implement a point in time recovery. I have a production database that I have successfully cloned by using hot backup and applying the necessary archived redo logs. I need to do this automatically daily. How can I do this? My purpose is to have a clone db that is one day delayed compared to the production database. Can I use the RECOVER DATABASE UNTIL TIME date? Is there a better/another way?
ThanksHi,
You can use dbms_wm.SetValidTimeFilterON to specify the point in time that you are interested in.
SQL> exec dbms_wm.SetValidTimeFilterON(to_date('05-01-2005', 'MM-DD-YYYY')) ;
This date needs to be contained within your session's validtime range.
Regards,
Ben -
Hi all,
I am trying to restore database to point in time. But while doing this i am getting following error.
But backups are available. Could you please help me...
[oracle@localhost ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Feb 13 11:54:41 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1314445644, not open)
RMAN> run
2> {
3> set until time "to_date('12-02-2013 20:03:00', 'DD-MM-YYYY HH24:MI:SS')";
4> restore database;
5> recover database;
6> }
executing command: SET until clause
Starting restore at 13-FEB-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/13/2013 11:58:02
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
RMAN>Please find the details:
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1 Full 1.04G DISK 00:03:11 12-FEB-13
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20130212T200534
Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_02_12/o1_mf_nnndf_TAG20130212T200534_8knnsq11_.bkp
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
1 Full 832649 12-FEB-13 /u01/app/oracle/orcl/system01.dbf
2 Full 832649 12-FEB-13 /u01/app/oracle/orcl/sysaux01.dbf
3 Full 832649 12-FEB-13 /u01/app/oracle/orcl/undotbs01.dbf
4 Full 832649 12-FEB-13 /u01/app/oracle/orcl/users01.dbf
5 Full 832649 12-FEB-13 /u01/app/oracle/orcl/example01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
2 Full 9.36M DISK 00:00:04 12-FEB-13
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20130212T200534
Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_02_12/o1_mf_ncsnf_TAG20130212T200534_8knnzzgt_.bkp
SPFILE Included: Modification time: 12-FEB-13
SPFILE db_unique_name: ORCL
Control File Included: Ckp SCN: 832680 Ckp time: 12-FEB-13
BS Key Size Device Type Elapsed Time Completion Time
3 44.23M DISK 00:00:05 12-FEB-13
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20130212T201859
Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_02_12/o1_mf_annnn_TAG20130212T201859_8knolw61_.bkp
List of Archived Logs in backup set 3
Thrd Seq Low SCN Low Time Next SCN Next Time
1 3 797152 22-JUN-12 811717 22-JUN-12
1 4 811717 22-JUN-12 832158 12-FEB-13
1 5 832158 12-FEB-13 832625 12-FEB-13
1 6 832625 12-FEB-13 832628 12-FEB-13
1 7 832628 12-FEB-13 832632 12-FEB-13
1 8 832632 12-FEB-13 834189 12-FEB-13
RMAN> list copy;
specification does not match any datafile copy in the repository
specification does not match any control file copy in the repository
List of Archived Log Copies for database with db_unique_name ORCL
=====================================================================
Key Thrd Seq S Low Time
1 1 3 A 22-JUN-12
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2012_06_22/o1_mf_1_3_7y98vvpd_.arc
2 1 4 A 22-JUN-12
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_4_8knnk9r3_.arc
3 1 5 A 12-FEB-13
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_5_8knns8fs_.arc
4 1 6 A 12-FEB-13
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_6_8knns9ob_.arc
5 1 7 A 12-FEB-13
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_7_8knnsc0h_.arc
6 1 8 A 12-FEB-13
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_8_8knoltyl_.arc
7 1 9 A 12-FEB-13
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_9_8knon5bh_.arc
8 1 10 A 12-FEB-13
Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_10_8knpjyr7_.arc
RMAN> -
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
Hello,
i am working for a scenerio and you can see my restore script below,
RMAN> RUN
2> {
3> SET UNTIL TIME "to_date('24-05-2010 18:00:00','DD-MM-YYYY HH24:MI:SS')";
4> RESTORE DATABASE;
5> RECOVER DATABASE;
6> }
executing command: SET until clause
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 05/26/2010 11:23:24
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
also you can see my backups,
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
89 B 1 A DISK 24-05-2010 15:36:04 1 1 NO BACKU
P_BISE1DB_000_052410030823
90 B 1 A DISK 24-05-2010 15:36:13 1 1 NO BACKU
P_BISE1DB_000_052410030823
91 B 0 A DISK 25-05-2010 12:01:09 1 1 NO TAG20
100525T113815
92 B 0 A DISK 25-05-2010 12:01:13 1 1 NO TAG20
100525T113815
93 B 1 A DISK 25-05-2010 12:01:55 1 1 NO TAG20
100525T120152
94 B 1 A DISK 25-05-2010 12:04:55 1 1 NO TAG20
100525T120451
95 B 1 A DISK 25-05-2010 13:55:00 1 1 NO TAG20
100525T134431
96 B 1 A DISK 25-05-2010 13:55:09 1 1 NO TAG20
100525T134431
97 B 1 A DISK 25-05-2010 14:01:43 1 1 NO TAG20
100525T140139
98 B 1 A DISK 25-05-2010 14:55:33 1 1 NO TAG20
100525T140356
so i am trying to understand that what is the earliest date that i can restore my database and avoid tihs error, according to the my backup sets?
thank you
UgurPlease query the following query and specify the RESETLOGS time
SELECT RESETLOGS_TIME FROM v$database;
i cant have result with this, because database is mount state,
And post the result of the following command to provide an information about database incarnations:
RMAN>LIST INCARNATION
RMAN> list incarnation;
using target database control file instead of recovery catalog
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 BISE1DB 4092555014 PARENT 1116016 01-05-2007 16:22:55
2 2 BISE1DB 4092555014 PARENT 1226717 14-12-2007 15:28:11
3 3 BISE1DB 4092555014 PARENT 5783997202 04-05-2010 09:59:11
4 4 BISE1DB 4092555014 CURRENT 5785721070 26-05-2010 10:59:32
thank you -
Recovering dropped table without using pointing time recovery/
Hi geeks,
Noob here.I have a question*.I want to recover the dropped table with data with out using pointing time recovery.*
for Ex:Use hasr dropped the table at 10:00 and realized that he dropped the table at 16:00hrs .So i want to fetch the data(DDL+DML) without using pointing time recovery.
So please find answers for my question.
Thank you,
Rakesh M.Welcome to the forum!
Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
>
Noob here.I have a question*.I want to recover the dropped table with data with out using pointing time recovery.*
for Ex:Use hasr dropped the table at 10:00 and realized that he dropped the table at 16:00hrs .So i want to fetch the data(DDL+DML) without using pointing time recovery.
>
FLASHBACK TABLE myTable TO BEFORE DROP;
See the examples in the FLASHBACK TABLE section of the SQL Language doc
http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9012.htm
>
Retrieving a Dropped Table: Example If you accidentally drop the pm.print_media table and want to retrieve it, then issue the following statement:
FLASHBACK TABLE print_media TO BEFORE DROP;
If another print_media table has been created in the pm schema, then use the RENAME TO clause to rename the retrieved table:
FLASHBACK TABLE print_media TO BEFORE DROP RENAME TO print_media_old;
If you know that the employees table has been dropped multiple times, and you want to retrieve the oldest version, then query the USER_RECYLEBIN table to determine the system-generated name, and then use that name in the FLASHBACK TABLE statement. (System-generated names in your database will differ from those shown here.)
SELECT object_name, droptime FROM user_recyclebin
WHERE original_name = 'PRINT_MEDIA';
OBJECT_NAME DROPTIME
RB$$45703$TABLE$0 2003-06-03:15:26:39
RB$$45704$TABLE$0 2003-06-12:12:27:27
RB$$45705$TABLE$0 2003-07-08:09:28:01 -
RMAN Restore Error - media recovery requesting unknown log: thread 1 seq 7
Im using RMAN to copy a database to another server. The new server is IDENTICAL to the old one. By identical I mean it has the same sever name, ip address, operating system, Oracle version and directory structure.
The new server already has the instance created, (same name as the old server instance, paths etc)
The backup files have been manually restored to the new server, same locations as they were on the old one. ( RMAN did an automatic controlfile backup and also the archivelogs on the old server ).
Ive restored the control file on the new server from the RMAN backup pieces.
Ive catalogued the RMAN backup pieces on the new server.
I know the last sequence available in the archivelogs backup by running on the new server :
list backup of archivelog all;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
5 14.43M DISK 00:00:03 11-MAY-11
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20110511T163502
Piece Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\BACKUPSET\
011_05_11\O1_MF_ANNNN_TAG20110511T163502_6WOC5833_.BKP
List of Archived Logs in backup set 5
Thrd Seq Low SCN Low Time Next SCN Next Time
1 2 550217 10-MAY-11 556559 11-MAY-11
1 3 556559 11-MAY-11 559776 11-MAY-11
1 4 559776 11-MAY-11 560093 11-MAY-11
1 5 560093 11-MAY-11 560794 11-MAY-11
BS Key Size Device Type Elapsed Time Completion Time
7 15.50K DISK 00:00:01 11-MAY-11
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20110511T163653
Piece Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\BACKUPSET\
011_05_11\O1_MF_ANNNN_TAG20110511T163653_6WOC8PMP_.BKP
List of Archived Logs in backup set 7
Thrd Seq Low SCN Low Time Next SCN Next Time
1 6 560794 11-MAY-11 560851 11-MAY-11
So far its all going swimmingly well.
Now I want to restore the datafiles and recover. So I ran :
RMAN run { restore database; recover database; alter database open resetlogs; }
This gave me the output below which goes great but I get a final error, I think the error is because its looking for an archive log thats not in the backup set, but it should be. However, I think SCN 560851 is for a log that hadnt been created yet on the old server when the backup was ran ?
How do I address resolving the error ? Its worth pointing out log, "archive log filename=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\ARCHIVELOG
\2011_05_11\O1_MF_1_6_6WOK1X4W_.ARC recid=10 stamp=750881741" isnt on the old server either which is why its not in the backup set.
I can do a alter database open reset logs but Id prefer to know why its failing.
Any help would be much appreciated.
RMAN> run { restore database; recover database; alter database open resetlogs; }
Starting restore at 11-MAY-11
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\SAT\SYSTEM01.DBF
restoring datafile 00002 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\SAT\UNDOTBS01.DBF
restoring datafile 00003 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\SAT\SYSAUX01.DBF
restoring datafile 00004 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\SAT\USERS01.DBF
channel ORA_DISK_1: reading from backup piece C:\ORACLE\PRODUCT\10.2.0\FLASH_REC
OVERY_AREA\SAT\BACKUPSET\2011_05_11\O1_MF_NNNDF_TAG20110511T163507_6WOC5CM7_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\BACKUPSET\2011_05_
11\O1_MF_NNNDF_TAG20110511T163507_6WOC5CM7_.BKP tag=TAG20110511T163507
channel ORA_DISK_1: restore complete, elapsed time: 00:00:55
Finished restore at 11-MAY-11
Starting recover at 11-MAY-11
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_DISK_1: reading from backup piece C:\ORACLE\PRODUCT\10.2.0\FLASH_REC
OVERY_AREA\SAT\BACKUPSET\2011_05_11\O1_MF_ANNNN_TAG20110511T163653_6WOC8PMP_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\BACKUPSET\2011_05_
11\O1_MF_ANNNN_TAG20110511T163653_6WOC8PMP_.BKP tag=TAG20110511T163653
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archive log filename=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\ARCHIVELOG
\2011_05_11\O1_MF_1_6_6WOK1X4W_.ARC thread=1 sequence=6
channel default: deleting archive log(s)
archive log filename=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\ARCHIVELOG
\2011_05_11\O1_MF_1_6_6WOK1X4W_.ARC recid=10 stamp=750881741
unable to find archive log
archive log thread=1 sequence=7
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/11/2011 18:15:42
RMAN-06054: media recovery requesting unknown log: thread 1 seq 7 lowscn 560851
RMAN>
Edited by: user12173666 on 11-May-2011 10:28You need to do incomplete recovery i.e. to ask RMAN to restore/recover to some specific point in time. This is usually done with some UNTIL clause or SET UNTIL statement. Example in your case:
SET UNTIL SEQUENCE 7;See http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta065.htm#RCMRF160.
Maybe you are looking for
-
"Adobe Reader 9.0 cannot be installed on this computer"
That's the error message I get when I try to install the program from the Adobe Reader Installer. I have a Power PC G5 iMac running Mac OS X 10.4.11. I have 2 GB of memory and tons of hard disk space. I upgraded Safari to 3.1.2. So I meet all the Mac
-
ITunes failing to send songs to iPod
I have had my iPod for over a year now and have had little difficulty interacting with the iTunes software until recently. After downloading the new iTunes update, all of my music on my iPod was cleared for reasons unknown to me. I updated the softwa
-
Solaris 10 on a T2000 - no GUI
Hi, I try to install Solaris 11/06 on a T2000, but the installer runs in text-modus. Also after the install I only have console, no GUI. In this document (http://docs-pdf.sun.com/817-0544/817-0544.pdf) they say you need at least 384 MB, but I have 32
-
I would to have a BMP file on my PC transfered by GPIB link. Thanks in advance.
-
Hello Logic X - Users, I usually print out my guitar-tabs from Score with 'numbers only' as being the Head Style. I found out that when I follow this procedure in Logic Pro X there is a kind of boxed grey shadow printed behind the numbers of my tabs.