Solved

Oracle RMAN Incremental backup querry

Posted on 2002-04-17
7
1,774 Views
Last Modified: 2009-12-16
Hi,

I am in process of implimenting incremental backup procedure. I am facing a problem after doing following steps

1. Taking full backup of 8.1.6 in archive mode by following command

# Backup the database
run {
allocate channel ch1 type disk;

backup
incremental level = 0
tag Incre_Full_Oracle_Backup
format '/atlas/oradbf/atp1s1/sip/%d_%U.dbf'
(database)
;

sql 'alter system archive log current';
change archivelog all crosscheck;
backup format '/atlas/oradbf/atp1s1/sip/%d_%U.arch'
(archivelog all delete input)
;

release channel ch1;
}

2. Created some tables for testing and taken incremental backup

Backup the database
run {
allocate channel ch1 type disk;

backup
incremental level = 2 cumulative
tag Incremental_Oracle_Backup
format '/atlas/oradbf/atp1s1/sip/%d_%U.dbf'
(database)
;

sql 'alter system archive log current';
change archivelog all crosscheck;
backup format '/atlas/oradbf/atp1s1/sip/%d_%U.arch'
(archivelog all delete input)
;

release channel ch1;
}

3. For testing I dropped the tables created in step no 2 and tried to restore database by following command

run {
allocate channel ch1 type disk;
allocate channel ch2 type disk;
allocate channel ch3 type disk;
resync catalog;
restore database;
recover database;
sql 'alter database open';
release channel ch1;
release channel ch2;
release channel ch3;
}

Restoration is sucessfully completed but it is not showing tables created in step no. 2

Please suggest me urgently

Kind Regards & Thx

0
Comment
Question by:doctor000
[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
  • 4
  • 3
7 Comments
 
LVL 3

Expert Comment

by:p_yaroslav
ID: 6948187
Hi!

All works right!
As I understood...
You doesn't delete you database files and online redo logs before restore process. When you restore database, nothing to recover, because database in consistent mode.
Try after step 3 remove all database files(and redo logs) and after that restore your backed up database.
Also be sure your tablespace in logging mode. If tablespace in nologging mode you can't recover it by applying archived redo logs.

!!! If you don't use recovery catalog, you need keep your controlfile and backup procedure must include backup controlfile and/or "backup controlfile to trace".


P.S: Be carefull if you use production database!

Yaroslav.
0
 

Author Comment

by:doctor000
ID: 6949873
Hi,

Solution you suggested is not working. Secondly when I delete Oracle Log files I have to restore complete database because rman is not taking backup of Log files.

regards

0
 
LVL 3

Expert Comment

by:p_yaroslav
ID: 6949881
Hi!

Can you give me some more information?
What doesn't work?
What does it mean "rman is not taking backup of Log files"???

It sounds misterious ...

My answer is based on your data. If you'll very shortly describe problem I couldn't resolve it.

Post all errors etc...

Regrds,
Yaroslav.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:doctor000
ID: 6950047
Hi,

You told me to delete datafiles and redo logs and restore database. I have done this. But this idea is not good because RMAN is not taking backup of "REDO" logs. So if I delete redo logs I have to restore old database.

Secondly, After deleteing database files I have restored database using RMAN but still I can not see tables I had created.

I hope this answer is much clear.

Please suggest.

Kind Regards & Thx
0
 
LVL 3

Expert Comment

by:p_yaroslav
ID: 6950087
Hi!

You doesn't understand recovery process in common.
The rman utility not imlicated.

You are performing FULL recovery (your keep online redo logs) and because you can't see your tables.
If you'll  done incomplete recovery to time before you droped you tables. It's OK!

Are you see?

Yaroslav.
0
 

Author Comment

by:doctor000
ID: 6950119
Hi,

1) How can I restore upto last backup taken
( Last incremental backup ) ?

2) I do not want to change restore command specified !!! Because I want to make standard script for restoration which should not be modified !!! How can I acheive it ?

2) What happens if I do not take backup of archive logs and restore incremental 0 and level 2 backup ?

Kind Regards & Thx
0
 
LVL 3

Accepted Solution

by:
p_yaroslav earned 50 total points
ID: 6950152
Hi!

1) If you restore database , but your online redo logs and controlfile are "live", you can perform FULL recovery database, i.e. you doen't lost any data after database failure. When you run restore database - rman automatically restore to last incremental backup.

2) The recover script you wrote - doesn't work in all cases of database crach. It's very difficult to make universal script for recover. Most strong utility for all cases failure is Oracle Dataguard. But I think you needn't it.

3) If you don't take backup of archive logs, and your backup is online - you cann't restore your database successfully from media failure. Because data will be in incinsistent state and you can't open your database after this recovery. If you whant fully use rman feature, you must run database in archivelog mode and backup all archive logs.

Regards,
Yaroslav.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
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 Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

688 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