Oracle DBMS_DBCOMP
Version 26ai

General Information
Library Note Morgan's Library Page Header
The best Oracle News for FY2026

Oracle Database 26ai will be available on generic Linux platforms in January and soon on AIX and Windows
Purpose Assumes that a primary database and one or more Data Guard physical standby databases are deployed. The databases should be at least mounted or open before block comparison is run.

Logical standby databases, Far Sync instances, and cascaded standbys cannot be the target database.
AUTHID CURRENT_USER
Dependencies
STANDARD (only)    
Documented Yes: Packages and Types Reference
First Available 12.2
Security Model Owned by SYS with EXECUTE granted to SYSBACKUP and SYSDG
Source {ORACLE_HOME}/rdbms/admin/dbmsdbcomp.sql
Subprograms
DBCOMP    
 
DBCOMP
Compares database blocks on primary to standby(s) dbms_dbcomp.dbcomp(
datafile   IN VARCHAR2,
outputfile IN VARCHAR2,
block_dump IN BOOLEAN := FALSE);
exec dbms_dbcomp.dbcomp('ALL', '/home/oracle/lost_write_check.txt', TRUE);

-- in a separate SQL*Plus session
SELECT target_desc, sofar, totalwork
FROM v$session_longops
WHERE opname = 'BlockCompare';

TARGET_DESC                      SO FAR  TOTALWORK
----------------------------- --------- ----------
Compared Blocks                  367104     403142
Lost Writes                           0          0

Related Topics
Built-in Functions
Built-in Packages
Data Guard
DBMS_COMPARISON
Dumping Oracle
What's New In 21c
What's New In 26ai

Morgan's Library Page Footer
This site is maintained by Daniel Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2026 Daniel A. Morgan All Rights Reserved