Oracle RMAN Incremental backup querry

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

doctor000Asked:
Who is Participating?
 
p_yaroslavCommented:
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
 
p_yaroslavCommented:
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
 
doctor000Author Commented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
p_yaroslavCommented:
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
 
doctor000Author Commented:
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
 
p_yaroslavCommented:
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
 
doctor000Author Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.