- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Restore and Recovery using RMAN
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2007 12:24 AM
тАО04-18-2007 12:24 AM
Restore and Recovery using RMAN
I am working on a system where we restore the Oracle 9i database using the RMAN utility.
For restore database we issue:
RESTORE DATABASE;
After the restore we Recover database using the RMAN command:
RECOVER DATABASE;
From the help docs I have read the RECOVER DATABASE will update the datafiles using redo records i.e. records of changes made to the database after the backup was taken.
But at times it is expected that the database be restored to the state it was when the backup was taken i.e. we do not need RECOVER DATABASE.
In such a situation I am thinking of just executing the RESTORE DATABASE and skipping the RECOVER DATABASE step.
Is it advisable to do so? This is DBA specific and I am new to this area hence I need your opinion. Please let me know.
Regards,
Kaustubh Kane.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2007 01:01 AM
тАО04-18-2007 01:01 AM
Re: Restore and Recovery using RMAN
and welcome to the forums !
Not sure I understand. Why would you want to restore your database to the last backup, unless it is to create a known test environment ?
If you only restore without adding the entries from the log files, you would need to clear down the log files, or allow them to be overwritten.
Oracle experts to the front, please.
Please read:
http://66.34.90.71/ITRCForumsEtiquette/after.html
Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2007 01:43 AM
тАО04-18-2007 01:43 AM
Re: Restore and Recovery using RMAN
What's the use of doing RMAN backup then?
If this is your requirement, just shutdown the database before you do your backup and then when you have to recover, you just have to recover the files and lose all the transactions that might have been done since your backup and the time you are doing the recovery.
Not sure about what you are trying to archive here.
The ideal method of what you are trying to do is to flashback the database.
Please clarify on your main objective.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2007 02:39 AM
тАО04-18-2007 02:39 AM
Re: Restore and Recovery using RMAN
If you want to just restore the database without recovering, you MUST use datafile copy when backup is done.
Then you just restore the datafiles and they will be ready to startup.
If you make a normal BACKUP, you allways have to RECOVER the database (complete or incomplete). In this case, you will be able to recover to a point in time (this time can be when you make this backup).
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2007 03:47 AM
тАО04-19-2007 03:47 AM
Re: Restore and Recovery using RMAN
if this problem is resolved, could you please award points to useful answers and then close the thread, summarising the solution used.
http://forums1.itrc.hp.com/service/forums/helptips.do?#40
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2007 03:40 AM
тАО04-20-2007 03:40 AM
Re: Restore and Recovery using RMAN
To RECOVER the database using point in time recovery to the time the backup was taken is almost not to perform any RECOVERY.
So can I skip the REOVER DATABSE step and then open the database with RESET LOGS option.
For e.g.
Please let me know.
Regards,
Kaustubh Kane.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2007 03:48 AM
тАО04-20-2007 03:48 AM
Re: Restore and Recovery using RMAN
Normally, when you restore a backup, you will restore datafiles and control files (and, of course archivelogs, but it's not teh case).
After restoring, you will need to open the database (this will be in MOUNT state until this moment) with resetlogs because of the redologs, in order for these to stay in the same incarnation of the rest of the database files.
If you are not using raw devices or ASM, you'd better make a full backup with the database closed. In this case, you just restore backup and startup the database.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2007 06:12 PM
тАО04-22-2007 06:12 PM
Re: Restore and Recovery using RMAN
I did the following:
Step1: RESTORE DATABSE.
Step2: SQL 'ALTER SESSION SET NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS"';
SET UNTIL TIME 'Apr 23 2007 11:10:41';
RECOVER DATABASE;
The above gave an error while performing the Incomplete Recovery. The error is as follows:
RMAN-03002: failure of recover command at 04/23/2007 11:31:58
RMAN-06555: datafile 1 must be restored from backup created before 23-APR-07
Please advice me on this.
Regards,
Kaustubh Kane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2007 10:25 PM
тАО04-22-2007 10:25 PM
Re: Restore and Recovery using RMAN
See this error message:
RMAN-06555: datafile 1 must be restored from backup created before 23-APR-07
It means that this datafile was created AFTER 23-APR-07, in order to perform a recover, you MUST have a datafile BEFORE the target date.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2007 11:23 PM
тАО04-22-2007 11:23 PM
Re: Restore and Recovery using RMAN
The database backup which we perform is a level 0 cumulative backup. From the info I recived this is equivalent to full backup. Hence all the datafiles should be present in the backup image. Is this correct?
When I would restore this image then all the datafiles should get restored in the RESTORE DATABASE step. (i.e. also the datafile which gave me error).
Is this correct, please confirm my understanding?
The Recovery I tried was Incomplete (Point in Time) and time specified was the time when the backup was taken.
In this case why should it try to recover the datafile 1.
Waiting for your kind reply.
Regards,
Kaustubh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-23-2007 12:54 AM
тАО04-23-2007 12:54 AM
Re: Restore and Recovery using RMAN
The level 0 backup should normally contain all the required data files.
If you were running oracle 10g, you could have verified your RMAN backup by doing a test recovery (without actually recovering any data files) using the following command:
restore validate database;
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-23-2007 09:45 AM
тАО04-23-2007 09:45 AM
Re: Restore and Recovery using RMAN
I think you are trying to simulate a disaster in your database, but, you are trying to restore rman backup into your last datafiles. These datafiles are up-to-date, so, probably rman is not restoring any block and when your try to recover, rman notice that this target date is older than datafiles' date. It would be better to remove some datafiles (for testing purposes, it's better to drop only data tablespaces - not system) and try to restore/recover this one.
Remember that, if you are in a real disaster situation, you probably lost your entire machine.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 06:15 AM
тАО05-02-2007 06:15 AM
Re: Restore and Recovery using RMAN
But I need to know if would have any side effects or serious impacts.
Please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 06:24 AM
тАО05-02-2007 06:24 AM
Re: Restore and Recovery using RMAN
Now you made a restore like in a disaster.
Well, to recover until a SCS or a date, you must recover this until ...
Please, let me know what commands are you using and also I'd like to know what oracle version are you using.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 06:40 AM
тАО05-02-2007 06:40 AM
Re: Restore and Recovery using RMAN
Earlier I had tried the Incomplte Recovery (Point in time recovery). But it failed. Please find the details in my message dated Apr 23, 2007 06:12:44 GMT in this chain above. Please also find the Incomplete recovery commands in the same message.
The Oracle version is Oracle 9i and the release is 9.2.0.7.0.
About deleting database file:
I just manually removed the files under u02 to u07 and then restored using RMAN tool.
The restore command is:
RESTORE DATABASE
The recover database command is:
RECOVER DATABASE
As the Incomplete recovery did not work for me I used the procedure of deleting all the files u02 to u07 and then restoring to bring the database back to the state it when backup was taken (i.e. to not have the changes made to the database after the backup was taken)
Is this wrong?
Please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 06:47 AM
тАО05-02-2007 06:47 AM
Re: Restore and Recovery using RMAN
Can you post what commands you used to backup the whole database?
Let's start from the begning in order to clarify all your doubts.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 07:49 AM
тАО05-02-2007 07:49 AM
Re: Restore and Recovery using RMAN
For performing database backup using RMAN I use the following commands:
Step 1: Backup Database
ALLOCATE CHANNEL C1 TYPE DISK;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP INCREMENTAL LEVEL=0 CUMULATIVE format '$dir/level0' DATABASE include curr
ent controlfile for standby FORCE;
BACKUP CURRENT CONTROLFILE format '$dir/control_primary' FORCE;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP ARCHIVELOG ALL format '$dir/archivelogs_%s_%t';
Step 2: Validate Restore
RESTORE DATABASE VALIDATE;
Regards,
Kaustubh Kane.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 08:43 AM
тАО05-02-2007 08:43 AM
Re: Restore and Recovery using RMAN
Your backup is perfect.
Now let's recover a tablespace:
1. Shutdown database
2. Remove a datafile (users or data)
3. Startup database - you will get ORA-1157 and ORA-1110, but database will mount
4. Call rman
5. Execute this sequence in RMAN:
RMAN> SQL 'ALTER DATABASE DATAFILE n OFFLINE'; => n is the datafile number
RMAN> OPEN DATABASE;
RMAN> RESTORE DATAFILE n;
RMAN> RECOVER DATAFILE n; => this will make a complete recover because you have all archivelogs and redologs
RMAN> SQL 'ALTER DATABASE DATAFILE n ONLINE';
This is the procedure for a complete recovery;
Try this one, after that, if you want a incomplete recovery procedure, I will send this for you.
Regards,