Restoring Controlfile When AUTOBACKUP Fail

Allow me to present the snapshot of a day from the life of John--the DBA at Acme Bank. On this particular day a database John manages crashed entirely and had to be restored from the backup. He takes regular (backupset) RMAN backups to tape. Since everything--including the controlfile--had crashed, John had to first restore the controlfile and then restore the database. The controlfile is always backed up with the backup database command. John was sure (more...)

RMAN Redundancy is not a Viable Retention Policy


Originally posted by me on the Pythian blog. This is an older post that I somehow forgot to post on my own blog, but another recent redundancy foul-up reminded me of it.

The story you are about to read is based on actual events. Names and paths have been changed to protect the innocent. I call this scenario “The Perfect Storm” because it took just the right combination of events and configurations. Sadly, this doesn’t (more...)

Migrating (and Upgrading!) Your EM12c Repository Database

This week I migrated our EM12c repository database to a new server as part of it's promotion to production status. Just to make it a little more exciting, the migration also involved an in-flight upgrade from 11.2.0.3 to 11.2.0.4. Much of this post is directly inspired by Martin Bach's post on the same subject. I ran into a few other snags that weren't mentioned so I thought it would (more...)

Duplicate from the standby instead from the primary in 12c

This post is related to 12c and an active database duplication for a standby I did in my lab environment. I’d say although I first encountered it on 12c there is a chance you run into a similar situation with earlier releases too.

I would normally use ASM for all my databases to make my life easier but this time I had to be mindful of the available memory on the laptop-which at 8 GB-is (more...)

Battling Bigfile Backup Bottlenecks

Last Friday I kicked off a database backup to an NFS destination, using the standard "backup as compressed backupset database" syntax. Loyal readers of this blog may recall that I'm the proud custodian of a 25 Tb database, so this backup normally takes a few days, with an expected completion on Monday morning. However it was still running on Wednesday, and reviewing the logs I saw that there was just 1 channel (of the original (more...)

Recover standby database over the network (Oracle 12c new feature)

In this article, I’ll explain how to manualy recover a standby database using the oracle RMAN new feature “RECOVER FROM SERVICE”. Configuration for the test HOSTS : 2 Virtual Machines with 2 GB of Memory OS : Oracle Linux 6.4 ORACLE VERSION : Oracle 12.1.0.1 Standard Edition A database named DB12C in archivelog mode has [...]

The post Recover standby database over the network (Oracle 12c new feature) appeared first (more...)

Recovering a standby over the network in 12c

Another one of the cool but underrated features in 12c is the possibility to recover a physical standby over the network with one line in RMAN.

Why do you need to perform this activity? Assume someone really clever created a segment “nologging” and the database was not in force logging mode. This operation cannot be replicated by redo apply on the standby, and you are bound to have a problem. Or, in my case, I (more...)

Using RMAN to Clone a Database into a Different Database on the Same Server

This was tested on Oracle 11.2. I had an input or target database as follows:
 
SQL> select name from v$database
  2  /
 
NAME
---------
ORCL1
 
SQL> l
  1  select tablespace_name, file_name
  2* from dba_data_files order by 1
SQL> /
 
TABLESPACE_NAME FILE_NAME
--------------- --------------------------------------
SYSAUX          /database/RMAN_test/ORCL1/sysaux1.dbf
SYSTEM          /database/RMAN_test/ORCL1/system1.dbf
UNDOTBS1        /database/RMAN_test/ORCL1/undo1.dbf
 
SQL>
 
I wanted to create an output or auxiliary or clone database called (more...)

RMAN Catalog backuppiece located on Tape

I've recorded backups on tape to RMAN repository several times already, but every next time I needed to do that I was searching through notes to find proper procedure.

This time I will note procedure in form of the blog post.

Note!
Test is performed on Oracle version 11.1.0.7.


These were my unsuccessful attempts:


RMAN> run
2> {
3> allocate channel c1 device type 'sbt_tape';
4> send 'NSR_ENV=(NSR_SERVER=backup_server,NSR_CLIENT=oracle_client,NSR_DATA_VOLUME=OrclPool)';
5> catalog backuppiece 'ARCH_ORCL_rep2dod5_s128878_p1';
(more...)

The Danger of Moving Incrementally Updated Datafile Copies

When I sat down at my desk yesterday morning I was greeted with some disturbing email alerts notifying me that one of the NFS mounts on my standby database host was full. This was the NFS mount that held an image copy of my database that is updated daily from an incremental backup. The concept and an example can be found in the documentation. With a 25Tb database, waiting to restore from backups is not (more...)

Recover a table with RMAN (Oracle 12c new feature)

Before oracle 12c, recover a table from loss or corruption was a difficult affair. Most of the time you notice that the table is lost or corrupted too late to use the flashback technology and then the only way to go is to duplicate your database to a time the table was still valid, export [...]

The post Recover a table with RMAN (Oracle 12c new feature) appeared first on Oracle DBA Scripts and (more...)

RMAN fails to allocate channel with Tivoli Storage Manager

I was recently configuring backup on the customers Exadata with IBM TSM Data Protection for Oracle and run into weird RMAN error. The configuration was Oracle Database 11.2, TSM client version 6.1 and TSM Server version 5.5 and this was the error:

[oracle@oraexa01 ~]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jan 29 16:41:54 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.   (more...)

What’s RMAN Backup Size

So there I was, looking for a script to calculate the backup size.  After several thoughts, it was not exactly what I was looking for.

Here’s the one I created.

SELECT TO_CHAR(completion_time, 'YYYY-MON-DD') completion_time, type, round(sum(bytes)/1048576) MB, round(sum(elapsed_seconds)/60) min
FROM 
(
SELECT 
  CASE
    WHEN s.backup_type='L' THEN 'ARCHIVELOG' 
    WHEN s. (more...)

Playing with Oracle Free Block Corruption

First and foremost, thank you to all the bloggers sharing their knowledge.

My previous post on corruption is here
The corrupt.sql script was stolen from here
exec SYS.DBMS_BACKUP_RESTORE.resetCfileSection(35) was stolen from here

Free Block Corruption is from a data file block which is now Free but used (more...)

When error say nothing about real issue

We want restore backup from source. So we took backup from source and copied it to /dba/share/MYDB on target. My collouge sent me email saying  restore failed with following error


rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Sep 18 20:47:38 2013

Copyright (more...)

RMAN Duplicate from Active Database – ASM to non-ASM

In this post I want to explain how to create duplicate database from active 11gR2 database using RMAN. There are many blog posts covering that subject but most of them are covering non-ASM to non-ASM, ASM to ASM or non-ASM to ASM duplications.
I want to cover ASM to non-ASM (more...)

RMAN PITR – testing some scenarios

I am regular follower of Oracle-l mailing list which is great source of knowledge for Oracle experts. Two days ago one Oracle DBA posted question “RMAN restore/recover problem” which induced me to re-check my knowledge about some RMAN PITR scenarios.

So I’ve performed some tests and decided to (more...)

Oracle 12c – incremental backup for DataGuard over network

If you have DataGuard or standby database in your organization you probably will love that new RMAN feature. Since 12c it is possible to catchup standby database using incremental backup using one command. Additional space and time need to run incremental backup, copy over to standby and restore can be (more...)

Recover corrupted blocks using Flashback Logs

Starting with 11g Oracle can perform block media recovery using flashback logs to get good copies of the blocks.

Flashback database is not enabled by default so first step would be to enable it. When enabled a process RVWR (Recovery Writer) copies modified blocks to flashback buffer. Later this buffer (more...)

Change the SID of the Oracle database using DBNEWID

In this post I will describe how to change Oracle SID using utility DBNEWID. As I can see DBNEWID is available from 9i version but I’ve never heard about it. Till now, I have used procedure where I’m manually editing and re-creating control file.

But I think it’s much better (more...)