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!
User | Count |
---|---|
75 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.