on 11-28-2014 8:43 AM
Dear experts,
we are moving towards integrating RMAN in BRBACKUP for all the systems in our environment.
We have also decided to take Full (level 0) backups twice per week and cumulative backups
each evening.
I would like to ask on 2 details in case I would need to restore such a cumulative backup:
I. How is the restore exactly done ? This is how I currently picture it for myself:
1. The full backup would need to be restored first.
2. Apply the offline redologs that were generated during this full level 0 backup
3. Then restore the last available cumulative backup
4. In the end, apply the offline redollogs generated during this cumulative backup
Or perhaps step 2. is not necessary ?
II. I have come across the following document:
I am a bit confused by the following statement on page 6:
In contrast to the BRRESTORE restore process without RMAN, which requires a closed database, restoring with RMAN requires the database to be mounted
What exactly does that mean ? Do I imagine the restore process wrongly, as I depicted it in I. ??? Kindly advise and let me know
in a clear and understandable form, not in the common fuzzy SAP language 🙂 Many thanks in advance!
Hello Symon
Let's say you have two backups taken.
1 - Full online taken on Monday (9:00 AM CET - 11:00 AM CET)
2 - Incremental backup taken on Wednesday (9:00 AM CET - 10:00 AM CET)
On Thursday you want to do a restore to get the data until the end of the Wednesday backup time (10:00 AM CET). In this case you will first need to restore the full backup taken on Monday and then apply the incremental backup taken on Wednesday OR apply the archived logs created from Monday (11:00 AM CET) until Wednesday (10:00 AM CET). Check this link 4.4 RMAN Incremental Backups to understand what the RMAN incremental backup is all about.
Regarding the restore part, yes you will need to restore the control files and put the DB into mount status before you start the restore.
RB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi symon
How a Database Is Mounted
The instance mounts a database to associate the database with this instance. To mount the database, the instance obtains the names of the database control files specified in the CONTROL_FILES initialization parameter and opens the files. Oracle Database reads the control files to find the names of the data files and the online redo log files that it will attempt to access when opening the database.
In a mounted database, the database is closed and accessible only to database administrators. Administrators can keep the database closed while completing specific maintenance operations. However, the database is not available for normal operations.
If Oracle Database allows multiple instances to mount the same database concurrently, then the CLUSTER_DATABASE initialization parameter setting can make the database available to multiple instances. Database behavior depends on the setting:
Hello Reagan,
this was a little bit messy for me - YES, it is possible to mount the database when only a control file is present, but unfortunately it is not possible to create a new control file if the data files are not there.
So, a simple restore to the same system worked flawlessly.
Though I have now decided to try a refresh and I am facing a situation during the restore.
Here is what I have done thus far:
1) Stopped the database and deleted all the data files and control file copies
2) Restored an old control file of the original DB
3) Started brrestore:
brrestore -p init<SID>.sap -b bepjdvtp.anr -c force -m full
Unfortunately this is failing with the following error:
RMAN>
RMAN> connect target *
connected to target database: Z07 (DBID=1834503450, not open)
using target database control file instead of recovery catalog
RMAN> **end-of-file**
RMAN>
host command complete
RMAN>
sql statement: alter session set optimizer_mode=RULE
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31>
allocated channel: sbt_1
channel sbt_1: SID=147 device type=SBT_TAPE
channel sbt_1: Data Domain Boost API
allocated channel: sbt_2
channel sbt_2: SID=195 device type=SBT_TAPE
channel sbt_2: Data Domain Boost API
allocated channel: sbt_3
channel sbt_3: SID=241 device type=SBT_TAPE
channel sbt_3: Data Domain Boost API
allocated channel: sbt_4
channel sbt_4: SID=291 device type=SBT_TAPE
channel sbt_4: Data Domain Boost API
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 09-DEC-14
released channel: sbt_1
released channel: sbt_2
released channel: sbt_3
released channel: sbt_4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/09/2014 17:03:34
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 19 found to restore
RMAN-06023: no backup or copy of datafile 18 found to restore
RMAN-06023: no backup or copy of datafile 12 found to restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 21 found to restore
RMAN-06023: no backup or copy of datafile 20 found to restore
RMAN-06023: no backup or copy of datafile 9 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
RMAN-06023: no backup or copy of datafile 17 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 16 found to restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
I have googled and found descriptions of this problem only for pure oracle installations. At one
site they recommend creating the same directory structure, which I have reproduced by creating a soft link:
oraSID> cd /oracle
oraSID> ln -s <targetSID> <sourceSID>
I verified that cd /oracle/<sourceSID>/sapdata1 works and is sending me where it is supposed to, but the restore keeps failing with the same error RMAN-06023. Please kindly advise on how to circumvent this error.
Many thanks!
Hi Reagan,
unfortunately it seems to be more difficult than anticipated! While I didn't have problems to do a simple restore, with refresh it is quite tricky...
I thought of restoring the control files of the source system even before I have read your post, as rman writes its info to the control files! I also had to rename them from cntrl<sourceSID>.dbf to cntrl<targetSID>.dbf. But then I could still not mount the DB, because it sees the sourceSID in the control files! So, there is something additional, that I am missing...
The is the error I am getting:
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-01103: database name 'sourceSID' in control file is not 'targetSID'
Hello,
sorry, but I have one more question... I am now testing also how to restore an incremental backup.
I am launching the following command:
brrestore -p init<SID>.sap -b bepjrwiq.inr -c force -m incr
It works fine, just unfortunately it doesn't restore any redolog file(s), that were taken during the incremental backup:
BR0280I BRRESTORE time stamp: 2014-12-12 13.56.33
BR0560I Restoring save set piece - piece handle=<SID>_bepjrwiq.6174_1 tag=BEPJRWIQ
BR0280I BRRESTORE time stamp: 2014-12-12 13.56.33
BR0560I Restoring save set piece - piece handle=<SID>_bepjrwiq.6173_1 tag=BEPJRWIQ
#INCR..... BEPJRWIQ.INCR
#RESTORED. bepjrwiq 5894-5899/6172-6175
BR0522I 18 of 18 files / save sets processed by RMAN
BR0280I BRRESTORE time stamp: 2014-12-12 13.56.46
BR0558I Restore of incremental database backup using RMAN successful
BR0406I End of file restore: repjwioi.rsb 2014-12-12 13.56.46
BR0280I BRRESTORE time stamp: 2014-12-12 13.56.46
BR0403I BRRESTORE completed successfully with warnings
while there was really 1 redolog file, taken with that incremental backup:
BR0280I BRBACKUP time stamp: 2014-12-11 16.07.55
BR0544I Saving offline redolog file save set piece - piece handle=<SID>_bepjrwiq.6178_1 tag=BEPJRWIQ comment=API Version 2.0,MMS Version 1.1.1.3
#ARCHIVE.. /oracle/<SID>/oraarch/<SID>arch1_16958_839346840.dbf
#SAVED.... bepjrwiq 5900/6178
BR0522I 1 of 1 file / save set processed by RMAN
Please kindly advise how to restore that redolog file as well...
Reagan, man, I thought about this on the way when I was leaving from work!
In the past I have been doing that on other Customers as well.
For this Customer, when restoring a full backup, the offline redologs are being automatically put in /oracle/<SID>/oraarch as well, which is quite convenient!
Just for me it is a riddle, why it is not the same with restoring an incremental backup...
I will check your suggestion on monday and I'll report back!
Many thanks!!
Hello Reagan,
there is a small problem - I can restore the offline redolog (1 file) on the source system,
but I am unable to restore it on the target system:
ora<targetSID>> brrestore -u / -c force -p init<sourceSID>.sap -a 16958
...
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/15/2014 13:40:24
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of archived log for thread 1 with sequence 16958 and starting SCN of 209962856 found to restore
...
Do you have an idea ? Do I have some wrong settings in the init<sourceSID>.sap file ?
Btw. I was able to restore the archivelog successfully using RMAN directly:
RMAN> restore archivelog sequence 16958;
Hello Symon
It appears to me that BR*Tools is unable to find the offline redo logs with the .sap profile you have supplied. This could possibly be due to the files were saved with a different .sap profile. I would check the archiving logs present at /oracle/SID/saparch and find out which .sap profile was used to backup those archive logs.
Reagan
Hi Reagan,
I am attempting to restore using the init<sourceSID>.sap profile. It is identical with the original profile from the source system, I have just modified the paths to the DD libraries, in order for RMAN to work. All the other paths are available with the old SID by means of a soft link which I have created (see above, I mentioned it somewhere). There must be something else being missed. I found one more thread on SCN, where somebody complains that he can only restore old redologs, all the symptoms are very similar to mine, though unfortunately this thread is unanswered.
Thank you!
I would like to ask on 2 details in case I would need to restore such a cumulative backup:
I. How is the restore exactly done ? This is how I currently picture it for myself:
The restore will be done using brtools only. You can either use the brtools menu or the corresponding brrecover/brrestore commands. Commands will be same. It doesn't matter if backup is being done using brtools with RMAN or brtools alone. Commands don't change
1. The full backup would need to be restored first.
Yes you will have to restore full backup ( either taken online or offline level 0 backup) for point in time recovery of complete recovery from crash.
2. Apply the offline redologs that were generated during this full level 0 backup
Depends, if your backup was taken offline or online. For online you definitely have to restore redologs as well for consistent recovery. For offline line backup if you want to roll forward the database to a particular point , then you can restore the offline redologs.
3. Then restore the last available cumulative backup
You can either restore the incremental backups or you can restore the redo log files. But if you are using the brtools menu options to restore the backups this will be the first option.( restore incremental backups)
4. In the end, apply the offline redollogs generated during this cumulative backup
You can either restore the incremental backups or you can restore the redo log files.
The mounting and un-mounting start/stop of database will be controlled by brtools/brrecover itself while doing the restore.
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello and thanks to everybody for your answers! Amit, your answer is the one mostly
oriented towards my questions.
I just do not understand this sentence of yours: "You can either restore the incremental backups or you can restore the redo log files."
If I will only be restoring and applying redo log files, then I do not understand why do I need incremental backups ? Also, how exactly is an incremental backup "connected" to a level 0 backup ? Does it include the changes made during the level 0 backup ? (which are usually kept in the offline redologs being created during the backup) or it includes everything since the point of restoring the level 0 backup and its redologs...
@Fidel - I will read all the links you supplied, many thanks!
Hi Symon,
If I will only be restoring and applying redo log files, then I do not understand why do I need incremental backups ?
What I mean is , you can either apply the incremental backups or the redologs since the last full full online (level 0) backup. Incremental will be easier to restore, it might take long time to restore all redologs since the last full incremental backup.
Also, how exactly is an incremental backup "connected" to a level 0 backup ? Does it include the changes made during the level 0 backup ?
No, incremental backup contains the changes which are made to the database after the full online(level 0) backup, same as redologs. Normally the incremental backup is done with the redologs (incremental online+redologs option) , otherwise it can't be consistently restored.
(which are usually kept in the offline redologs being created during the backup) or it includes everything since the point of restoring the level 0 backup and its redologs...
Offline redologs contain all the changes being made to the database, ( for eg after a full online backup). Same are also contained in the incremental backup which is taken after the full online backup.
So you can restore either the redologs or the incremental backups. Incremental backups would be easier to restore and I think will take less time, but you can test such a scenario on one of your test system and check which approach takes is faster.
With brtools, restoring incremental backup is the first option.
Thanks
Amit
Ok,
First of all, probably you should learn about BRRECOVER, which is the tool you should use, not BRRESTORE, therefore, I strongly recommend you to read the BR*Tools documentation, for example "Getting Started with BR*Tools". If you are confusing tools at this level you can make big, big mistakes.
Then, I recommend you to read the RMAN documentation (instead of going to "other" websites where they talk about "other" things) where you can learn about incremental backups (as it seems you do not understand them properly) for example "Recovery with incremental Backups"
Nevertheless, if you use BRRECOVER, it will be guiding you on what has to be done and what backups/archives are needed depending on what you want to do as the procedure might be different if you want to recover from a missing file, missing database, point in time recovery ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Symon,
You can follow below link you will get information about RMAN Restore and RMAN DB refresh Activity.
http://basissap.blogspot.in/2012/05/system-refresh-using-rman-backup.html
But all the scenarios first we have to generate the Control file ----
After restore with last successful backup ----
Then Database mount state we recover redo log files.
RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL---command
Regards,
Pravin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Pravin, but this blog doesn't explain it well 😕 For example, on point
6.
Restore the DB control files saved with the Level 1 backup (This is the .inr file)
brrestore -b <.inr file> -m 0 -d rman_util
which control file is being restored ? The one of the source system or the one of the target system ? Please also refer to my last post in reply to Reagan...
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.