ORA-01103: database name ‘MW’ in control file is not ‘MWTST’

This error most likely occurred when you duplicated a database and the DB_NAME parameter in spfile is not matching the one in the control file. Sometimes it so happened that after duplicating the database name in SPFILE with which you started the instance with is not matching the one in the control file. Explanation: ===================== … Continue reading ORA-01103: database name ‘MW’ in control file is not ‘MWTST’

Restore and Upgrade Oracle Database from 11gR2 to 12c from Exadata X4-2 to X7-2

Upgrade from Exadata X4-2 11g (11.2.0.4) to Exadata X7-2 12CR1 (12.1.0.2.0) : ASM to ASM Oracle Database 11.2.0.3and 11.2.0.4 to Oracle 12.2.0.1 Direct upgrade is supported by Oracle. If you have Database lower than those version than you have to upgrade to 11.2.0.4 first and you can upgrade to 12cR2 In our Scenario We will … Continue reading Restore and Upgrade Oracle Database from 11gR2 to 12c from Exadata X4-2 to X7-2

Restore RMAN to new server and refresh with Archivelog apply

Source Database --------------- ::: Directory Structure ::: ORACLE_HOME : E:\oracle\product\10.2.0\db_1 RMAN Backup : E:\rman_backup_full Control Files : E:\oradata\ecc DataFiles: E:\oradata\ECC Archivelog Destination: E:\archivelogs adump : e:\oracle\product\10.2.0\admin\ecc\adump bdump : e:\oracle\product\10.2.0\admin\ecc\bdump cdump : e:\oracle\product\10.2.0\admin\ecc\cdump udump : e:\oracle\product\10.2.0\admin\ecc\udump 1. create pfile='E:\eccprod.ora' from spfile;   2. rman target / backup incremental level 0 TAG 'ECC_DAILY_FULL' database filesperset 4; backup … Continue reading Restore RMAN to new server and refresh with Archivelog apply

Script to SET NEWNAME for DATAFILES in RMAN for Cloning

-- If doing on Source Server -- ::12c-->sqlplus "/as sysdba" set head off pages 0 feed off echo off verify off set lines 200 spool rename_datafiles.lst select 'set newname for datafile ' || file_id || ' to ''/u01/oradata/' || substr(file_name,instr(file_name,'/',-1)+1) || ''';' from dba_data_files ; spool off exit; -- If doing on Target Server -- … Continue reading Script to SET NEWNAME for DATAFILES in RMAN for Cloning

Restore Table from RMAN Backup Oracle 12c

  One of the amazing features of Oracle Database 12c is that now you can do a logical restore from a physical backup. Before 12c it was not possible to restore a table from a RMAN backup. This feature is amazing speciall when you have a large database and needs to restore a small table. … Continue reading Restore Table from RMAN Backup Oracle 12c

RMAN Script for Tape Backup : Tivoli Storage Manager

[sourcecode language="sql"] run { allocate channel sbt1 type sbt parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocate channel sbt2 type sbt parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE'; BACKUP DATABASE FORMAT 'MW_FULL_%s_%D_%M_%Y' tag 'MW_DAILY_FULL_DB_BKP'; BACKUP archivelog all not backed up 1 times format 'ARCH_%d_ALL_%s_%t' tag 'MW_ARCH_LOG_BKP'; release channel sbt1; release channel sbt2; } [/sourcecode]

RMAN — ORA-19909: datafile 1 belongs to an orphan incarnation in a Standby Database.

We had an interesting scenario where we did a full rman refresh of a standby database becuase the archivelogs went missing and there was a gap. After doing the restore we got the below error in the RMAN recovery rman nocatalog target sys/******@mw auxiliary / connected to target database: MW (DBID=000000000) using target database control … Continue reading RMAN — ORA-19909: datafile 1 belongs to an orphan incarnation in a Standby Database.

RMAN database restore until time

I had a block corruption of my primary database, though we had a standby build we wanted to recover the Primary instead of failover to the Standby. This recovery is possible when you have say a full backup made of the database till 9th May and all archivelogs from 9th May till 12th MAY are … Continue reading RMAN database restore until time

ORA-38753: Cannot flashback data file ; no flashback log data. ORA-01110: data file

CAUTION !!!! DO NOT DO THIS ON YOUR PRIMARY. IF YOU DO THEN YOU WOULD REQUIRE MEDIA RECOVERY ON THE DATAFILE YOU BROUGHT OFFLINE !!!   If your getting this error when you converting a Snapshot Standby Database (11gR2) back to Physical Standby Database. SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY; ERROR at line 1: … Continue reading ORA-38753: Cannot flashback data file ; no flashback log data. ORA-01110: data file

Resync Standby Database when Archivelogs at Primary are deleted.

In this scenario,the standby database lost contact(connection) with primary database for few days and hundreds of redo log was switched and unfortunately archivelogs were deleted from primary database, network problem is resolved , and now you want to resync standby db with minimun time / no downtime. server 1 (primary database) os: linux 64bit db: … Continue reading Resync Standby Database when Archivelogs at Primary are deleted.