DBVERIFY

DBVERIFY

It is an external command-line utility that performs a physical data structure integrity check. It can be used on offline or online databases, as well on backup files.
You use DBVERIFY primarily when you need to ensure that a backup database (or datafile) is valid before it is restored, or as a diagnostic aid when you have encountered data corruption problems.

Overview:

  • Verifying the table and tablespaces
  • Checking the header block for the table
  • Stimulating a corruption
  • Recovering the block using RMAN
  • Verifying using DATABASE BLOCK CORRUPTION

Step 1:

Verifying the TABLESPACE_NAME and its associated SEGMENT_NAME.

SQL> select SEGMENT_NAME,TABLESPACE_NAME from dba_segments where OWNER=’SCOTT’;

SEGMENT_NAME TABLESPACE_NAME
————— ——————————
SALGRADE USERS
DEPT USERS
EMP USERS
PK_DEPT USERS
PK_EMP USERS

Step 2:

By issuing the below command we can check the header block for the table ‘DEPT’

SELECT header_block FROM dba_segments WHERE segment_name=’DEPT’;

SQL> select file_name from dba_data_files;

FILE_NAME

/u01/app/oracle/oradata/ORACLE19C/datafile/o1_mf_users_j21snyfk_.dbf
/u01/app/oracle/oradata/ORACLE19C/datafile/o1_mf_undotbs1_j21snxbn_.dbf
/u01/app/oracle/oradata/ORACLE19C/datafile/o1_mf_system_j21skfkg_.dbf
/u01/app/oracle/oradata/ORACLE19C/datafile/o1_mf_sysaux_j21sn40n_.dbf

Step 3:

Command to corrupt the block ,

[oracle@oracle19c ~]$ dd of=/u01/app/oracle/oradata/ORACLE19C/datafile/o1_mf_users_j21snyfk_.dbf bs=8192 conv=notrunc seek=347 << EOF

corruption test
EOF
0+1 records in
0+1 records out
16 bytes (16 B) copied, 4.9494e-05 s, 323 kB/s

Step 4:

To flush the buffer cache we need to provide the below command

SQL> ALTER SYSTEM FLUSH BUFFER_CACHE;

System altered.

Step 5:

Selecting the corrupted table , but it shows error

Step 6:

Viewing the corrected block in the database

select * from V$DATABASE_BLOCK_CORRUPTION;

Step 7:

Command to verify the corrupted block across the datafile using the below command

dbv file=/u01/app/oracle/oradata/ORACLE19C/datafile/o1_mf_users_j21snyfk_.dbf blocksize=8192

Step 8:

Command to recover the block and datafile using RMAN,
The datafile and corrupted block we can check it in the previous step ‘DBVERIFY-DBV’ command

recover datafile 7 block 347;

Verification’s:

After recovering there are no rows found in database block corruption ,
And after issuing dbverify command ,there we can see the marked corruption is ‘0’

Thank you for giving your valuable time to read the above information.
If you want to be updated with all our articles send us the Invitation or Follow us:
Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter : https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

19C RMAN CONCEPTS

rman

19c RMAN CONCEPTS:

RECOVER DATAFILE WITHOUT RMAN BACKUP
RECOVER THROUGH RESETLOGS
BLOCK CHANGE TRACKING
RECOVER LOSS OF ALL CONTROL FILE USING AUTO BACKUP
RECOVER LOSS OF ALL ONLINE REDO LOGS 
POINT IN TIME RECOVERY 
RMAN-06183: datafile or datafile copy xyz.dbf larger than MAXSETSIZE
RMAN Database Restore ASM
DATABASE INCARNATION USING RMAN
Restore Tablespace using RMAN
RESTORE SPFILE USING RMAN
RMAN backup Full Database
RMAN Backup Tablespace
RMAN Backup Particular Datafile
RMAN Backup Spfile
RMAN Backup Current Control file
RMAN Backup Archive log Until Sequence
RMAN Backup Archive log Between Sequence
RMAN Backup Archive log Between SCN
RMAN Backup Archive log Until SCN
RMAN Backup Database Plus Archive log
RMAN Backup Database Includes A Control file
RMAN Backup Archive log and All Delete Input
RMAN Backup Archive log All and Skip Inaccessible
LEVEL 0 and LEVEL 1 Backup And Recovery using RMAN
CROSSCHECK BACKUPS Using RMAN
RESTORE CONTROL FILE USING RMAN
Backup-based Cloning of a database using RMAN
RECOVERY CATALOG DATABASE IN RMAN
RMAN ORA ERRORS
DBVERIFY
END-OF-FILE ERROR
LEVEL 0 INCREMENTAL BACKUP
point-in-time recovery using RMAN in 19c
Recover a loss of all online redo log files

Thank you for giving your valuable time to read the above information. If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8