ASM DiskGroup Migration

Step Wise Disk-Group Migration from DG01 to DG02

Scenario:

DBTST is an Oracle11g single instance database on ASM which holds complete database in Disk Group named DG01 spread across 4*50 GB of Disks. Objective is to migrate complete databases from DG01 to DG02 Disk Group. Here DG02 is a new Disk Group on 500 GB disk (/dev/mapper/mpathe)

col NAME for a20
col PATH  for a40
select GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,STATE,OS_MB,TOTAL_MB,FREE_MB,NAME,PATH from v$asm_disk;


GROUP_NUMBER DISK_NUMBER MOUNT_S STATE OS_MB   TOTAL_MB  FREE_MB NAME       PATH
------- -------- ------- -------- ---------- ---------- -------- --------------- ----------------------------------------
           1           2 CACHED  NORMAL                 51200    51200         43 DG01_0002    /dev/mapper/mpathc
           1           1 CACHED  NORMAL                 51200    51200         41 DG01_0001    /dev/mapper/mpathb
           1           3 CACHED  NORMAL                 51200    51200         45 DG01_0003    /dev/mapper/mpathd
           1           0 CACHED  NORMAL                 51200    51200         46 DG01_0000    /dev/mapper/mpatha

           0           0 CLOSED  NORMAL                 512000          0          0                      /dev/mapper/mpathe

Migration Steps:

oracle database corrupt block recovery

Error:

Corrupt block relative dba: 0x1a0975d9 (file 104, block 619993)
Bad check value found during user buffer read
Data in bad block:
 type: 6 format: 2 rdba: 0x1a0975d9
 last change scn: 0x0726.9a3a3fc5 seq: 0x1 flg: 0x06
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x3fc50601
 check value in block header: 0x287e
 computed block checksum: 0xfe81
Reread of rdba: 0x1a0975d9 (file 104, block 619993) found same corrupted data
Tue Feb 18 20:17:59 IST 2014
Corrupt Block Found
         TSN = 47, TSNAME = EVENT_TAB
         RFN = 104, BLK = 619993, RDBA = 436827609
         OBJN = 141322, OBJD = 141322, OBJECT = EVENT_PK, SUBOBJECT =
         SEGMENT OWNER = EVA_ADMIN, SEGMENT TYPE = Index Segment


Background:

BR0123E Format error found in line at location arch_last_get-10

Error:

brarchive -u / -c -d util_file -r /oracle/PRD/102_64/dbs/initPRD-logs.utl -s
BR0002I BRARCHIVE 7.00 (40)
BR0006I Start of offline redo log processing: aemjygtf.sve 2013-10-26 14.42.59
BR0484I BRARCHIVE log file: /oracle/PRD/saparch/aemjygtf.sve
BR0477I Oracle pfile /oracle/PRD/102_64/dbs/initPRD.ora created from spfile /oracle/PRD/102_64/dbs/spfilePRD.ora
BR0123E Format error found in line 1830934 of /oracle/PRD/saparch/archPRD.log at location arch_last_get-10
BR0121E Processing of log file /oracle/PRD/saparch/archPRD.log failed
BR0016I 0 offline redo log files processed, total size 0.000 MB
BR0007I End of offline redo log processing: aemjygtf.sve 2013-10-26 14.43.04
BR0280I BRARCHIVE time stamp: 2013-10-26 14.43.04
BR0005I BRARCHIVE terminated with errors


Cause:

BR0439E No offline redolog files found in ..processing for device type TAPE/BACKINT/RMAN in recovery interval

Error:

brrestore -a 265931-265933=/oracle/PRD/oraarch/ -r /oracle/PRD/102 _64/dbs/initPRD.utl

BR0401I BRRESTORE 7.20 (33)
BR0405I Start of file restore: remjonan.rsa 2013-10-24 15.04.25
BR0484I BRRESTORE log file: /oracle/PRD/sapbackup/remjonan.rsa

BR0461W Redolog sequence number in line 1830920 of /oracle/PRD/saparch/archPRD.log not ascending
BR0462W All lines in /oracle/PRD/saparch/archPRD.log till line 1830920 will be ignored
BR0461W Redolog sequence number in line 1831168 of /oracle/PRD/saparch/archPRD.log not ascending
BR0462W All lines in /oracle/PRD/saparch/archPRD.log till line 1831168 will be ignored

BR0439E No offline redolog files found in /oracle/PRD/saparch/archPRD.log for processing for device type TAPE/BACKINT/RMAN in recovery interval of 30 days


BR0406I End of file restore: remjonan.rsa 2013-10-24 15.04.27
BR0280I BRRESTORE time stamp: 2013-10-24 15.04.27
BR0404I BRRESTORE terminated with errors


OR

brrestore -a 265931-265982=/oracle/PRD/oraarch/ -r /oracle/PRD/102 _64/dbs/initPRD.utl

ORA-07286: sksagdi: cannot obtain device information



Error:

RMAN-00571: 
==============
RMAN-00569: 
=============== 
ERROR MESSAGE STACK FOLLOWS 
===============
RMAN-00571: ========================================
RMAN-03002: failure of restore command at 04/23/2013 18:27:34
ORA-19870: error while restoring backup piece archive_3840_1_813515387
ORA-07286: sksagdi: cannot obtain device information.
Linux-x86_64 Error: 2: No such file or directory

BR0233E Backup utility has reported an error while saving file

Issue: SAP oracle database Archive log backup failing using BR Tool


Error:

BR0233E Backup utility has reported an error while saving file
ERROR: incorrect format or option in .utl file (-p)
BR0231E Backup utility call failed
ERROR: Can't change to working directory Errno = 13 : Permission denied
BR0005I BRARCHIVE terminated with errors

Background/Analysis:

SAP archive backup policy started failing which is using brarchive ( SAP supplied backup utility BR Tool ) command executed via backup policy

As a first action logs & errors identified 

Secondly , brarchive command executed manually from database server which is client to backup media server as below


RMAN Backup Restoration example

This blog will guide you through the basic steps of Backup , Restoration & Recovery Using RMAN

Step1 : Online RMAN datafile , control-file & archive-log Backup at Source(MW4-S)
Step2 : Configuring Destination (IEWE-S) database server for restoration & recovery
Step3 : Starting up the instance at destination in nomount
Step4 : restoring control-file
Step5 : Cataloging Backup-sets
Step6 : restoring datafiles
Step7 : Recovery & Open resetlogs


MW4-S is the source database server & IEWE-S is destination where database will be cloned
Environment used is Oracle11g & OS platform Solaris 10 

Let's begin then ..

Step1 : Online RMAN datafile , control-file & archive-log Backup at Source(MW4-S)
Database should be in mount or open mode as a prerequisite of RMAN backup because in the absence of recovery catalog control file is the source of metadata to identify file locations & SCN (system change number , for consistency check)

Import dump using pipe



Background:


Same as export using pipe, import can be done by following below steps

Import using Pipe

Step1
Create nods equal to dump files & point it to a pipe

mknod /u01/orabak/export/imp_pipe1 p
mknod /u01/orabak/export/imp_pipe2 p
mknod /u01/orabak/export/imp_pipe3 p

Export dump compression using pipe

This post will help you to run traditional export import backup utility with compression


Background:
Although compression is supported by imp/exp but it is limited to segment extents only & does not solve the purpose.
It will be very much difficult to perform export import operations where db servers holding less space on local file system to keep dump files

Performing export import over network could be a workaround to this issue but due to network delay it could become more tedious

Export/ Import using mknod or pipe will help to zip/unzip the dump files during export or import operation respectively without specifying it explicitly

New 10g (onwards) feature Data Pump COMPRESSION is replaceable with the mknod export/ import method

Export Import Pipe should be used in pre-10g environments to reduce actual export import time, OS space usage & to minimize delay in transport of dump files across the db servers due to less size of the dump

Let us see how it works in export import operation with single & multiple dump files