?
Solved

i did back up using rman after that i want to recover that..

Posted on 2008-10-20
7
Medium Priority
?
434 Views
Last Modified: 2013-12-18
I did the following procedure for back up .
after that how can I restore the database..

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> conn / as sysdba;
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.

Total System Global Area  574619648 bytes
Fixed Size                  1250212 bytes
Variable Size             213912668 bytes
Database Buffers          352321536 bytes
Redo Buffers                7135232 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     5
Next log sequence to archive   7
Current log sequence           7


set oracle_sid=newdata
rman target  /
after that
I received finished backup message
"Finished backup at 20-OCT-08"
after that how I can I restore...
what are the steps I have to take??
thanks
0
Comment
Question by:dbaseek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 22759540

Maybe you could check out the 'RESTORE' command in the fine Oracle Backup and Recovery reference manual.
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta044.htm#sthref699
 
 
 
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 22759562
0
 
LVL 4

Expert Comment

by:hqassap
ID: 22765542
If you want to check the backup, no need to restore it physically, you can validated by simulating the restore operation using 10g new feature VALIDATE:

Example:
RMAN> validate backupset 414390 , 414468 , 414597 , 414260 , 414582;


But if you want to practice the restore, this is where you go:


For Complete Recovery:
To restore whole database:
rman target /
RMAN> STARTUP MOUNT
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
RMAN> ALTER DATABASE OPEN;


To restore a Tablespace:
run{
sql alter tablespace Tablespace_name offline immediate;
restore tablespace users;
recover tablespace users;
sql alter tablespace Tablespace_name online;
}

-------------------

For Incomplete Recovery:
You can use until cancel:
RMAN> RECOVER DATABASE until cancel,

Or, you can use until time:
RMAN> run {
2> allocate channel c1 type DISK;
3> allocate channel c2 type DISK;
4> set until time = 2008-10-10:11:44:00';
5> restore database;
6> recover database;
7> alter database open resetlogs;
8> }


Or, until sequence:
RMAN> RUN {
2> SET UNTIL SEQUENCE 156 THREAD 1;
3> ALTER DATABASE MOUNT;
4> RESTORE DATABASE;
5> RECOVER DATABASE; # recovers through log 155
6> ALTER DATABASE OPEN RESESTLOGS;
7> }

0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:dbaseek
ID: 22773499
When I did that I received error message?
What could be the reason?

backup.bmp
0
 
LVL 4

Expert Comment

by:hqassap
ID: 22773874
It seems you are working in a training/practice machine and you might tried some other administration command such as restoring Cold OS backup specially the control file and then you did a resetlogs which may duplicate the incarnation entries in the control file.

Can you post the output of the following command for the database that you want to restore it?

select * from V$DATABASE_INCARNATION


0
 

Author Comment

by:dbaseek
ID: 22773925
IF ONLY THE CONTROL FILE IS CORRUPTED...
CAN I RESTORE AND RECOVER USING
RESTORE DATABASE
RECOVER DATABASE
COMMANDS

HERE IS THE ATTACHMENT

BU.bmp
0
 
LVL 4

Accepted Solution

by:
hqassap earned 2000 total points
ID: 22774174
You have one carnation entry for the database, thats good.

You might delete some archive log files manually, I mean not through the RMAN?

Re-backup the database and restore it again:

Use the following backup script to do so; you can type it directly into the RMAN prompt:

-------------------------Begin of Script-------------------------
crosscheck archivelog all;
delete expired archivelog all;
run {
backup database format C:\backup_dir\db_%s.dbf;
sql 'alter system archive log current';
backup archivelog all delete all input ;
backup current controlfile;
backup spfile;
}
-------------------------End of Script-------------------------

Then restore it as of my first post.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question