Solved

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

Posted on 2008-10-20
7
428 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 68
Oracle Subquery bad Join 11 59
How to free up undo space? 3 27
Need help with fine tuning the windows batch script to change password 9 19
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now