Solved

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

Posted on 2008-10-20
7
427 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
Comment Utility

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
Comment Utility
0
 
LVL 4

Expert Comment

by:hqassap
Comment Utility
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
Comment Utility
When I did that I received error message?
What could be the reason?

backup.bmp
0
 
LVL 4

Expert Comment

by:hqassap
Comment Utility
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
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

Suggested Solutions

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

762 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

11 Experts available now in Live!

Get 1:1 Help Now