Solved

Oracle RMAN Incremental backup querry

Posted on 2002-04-17
7
1,768 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
  • 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
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: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

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

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

746 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

14 Experts available now in Live!

Get 1:1 Help Now