Finding Backup details from 11g RMAN respository tables
- List databases registered with rman repository
select NAME
, DBID
from RC_DATABASE;
select NAME
, DBID
from RC_DATABASE;
Here I am duplicating 11g RAC database from one RHEL Server to Another by old 10g method.
I could have used 11g “DUPLICATE TARGET DATABASE TO TARGET_DB FROM ACTIVE DATABASE” which doesn’t need previous rman backup at source. But it may not be a good option for large databases or at places with narrow network bandwidth.
Number of my systems are on Oracle 10g with flashback Area allocated. The Archive logs , redo logs & backups are destined at this area. This morning users complained about system being down and when I looked at alrtlog I could see archive error. Read more…
I carried a big data upload and as a result of it my archive volume filled up in no time. As matter of urgency I started moving archive logs without backup to another destination. The next thing to go wrong was my nightly backup. Read more…
I have more than 100 database servers.
How can I report if my backup was successful last night or last week?
You can use the create RMAN DUPLICATE command to duplicate database from target database backups while still retaining the original target database. The duplicate database can be either identical to the original database or contain only a subset of the original tablespaces. A duplicate database is a copy of the target database that you can run independently for a variety of purposes.
Below is a windows BATCH script used to Maintain RMAN catalogue. The script accepts 3 parameters Target SID, Target password and catalogue password.
Duplicate Database using rman
connect target rman/%password%@primary_server
connect auxiliary sys/%password%@standby_server
connect rcvcat rman/%password%@recovery_catalog
run {
set until time ’27-JUL-2009 10:59:00′;
allocate auxiliary channel tp1 type “sbt_tape”;
allocate auxiliary channel tp2 type “sbt_tape”;
rman> shutdown immediate;
rman> startup mount
1. Let’s validate if there is ample of space for backup at Target device type i.e DISK/TAPE
– Server A – Is a Live Server
– Server B – Is a Physical Standby Server
Both were configured for a data guard
Create RMAN Catalogue steps
• Select database for catalogue.
• Create catalogue owner RMANC, default tablespace TOOLS.
• Grant RECOVERY_CATALOG_OWNER role to RMANC.
• Run the RMAN executable, being the same version as the catalogue database codeset and connect to the catalogue as the RMANC user.
• Issue the CREATE CATALOG command.
Datafiles Backed up during past 24 Hours
SELECT dbfiles||' from '||numfiles "Datafiles backed up", cfiles "Control Files backed up", spfiles "SPFiles backed up" FROM (select count(*) numfiles from sys.v_$datafile), (select count(*) dbfiles from sys.v_$backup_datafile a, sys.v_$datafile b where a.file# = b.file# and a.completion_time > sysdate - 1), (select count(*) cfiles from sys.v_$backup_datafile where file# = 0 and completion_time > sysdate - 1), (select count(*) spfiles from sys.v_$backup_spfile where completion_time > sysdate - 1)
2 Oracle databases – A & B. Server A is available and need to be replicated on server B. We will use rman to backup datafiles including control file and archive logs.