RMAN> database validate;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "database": expecting one of: "allocate,
RMAN-01007: at line 1 column 1 file: standard input
backup check logical validate database;
Если нужна только проверка, то в команде RMAN'а COPY или BACKUP можно указать опцию VALIDATE (бэкап создаваться не будет), а также дополнительно включить проверку логической структуры блока - CHECK LOGICAL.
RMAN> backup VALIDATE CHECK logical DATABASE;
Starting backup at 16-OCT-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=180 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00004 name=D:\ORACLE\ORADATA\KAMAVTO\INDX01.DBF
input datafile fno=00005 name=D:\ORACLE\ORADATA\KAMAVTO\USERS01.DBF
input datafile fno=00009 name=D:\ORACLE\ORADATA\KAMAVTO\USERS02.DBF
input datafile fno=00011 name=E:\ORACLE\ORADATA\KAMAVTO\OLAP01.DBF
input datafile fno=00008 name=D:\ORACLE\ORADATA\KAMAVTO\INDX02.DBF
input datafile fno=00003 name=D:\ORACLE\ORADATA\KAMAVTO\SYSAUX01.DBF
input datafile fno=00012 name=D:\ORACLE\ORADATA\KAMAVTO\UNDOTBS2.DBF
input datafile fno=00010 name=D:\ORACLE\ORADATA\KAMAVTO\USERS+1.DBF
input datafile fno=00007 name=D:\ORACLE\ORADATA\KAMAVTO\TOOLS+1.DBF
input datafile fno=00001 name=D:\ORACLE\ORADATA\KAMAVTO\SYSTEM01.DBF
input datafile fno=00006 name=D:\ORACLE\ORADATA\KAMAVTO\TOOLS01.DBF
channel ORA_DISK_1: backup set complete, elapsed time: 00:07:45
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 16-OCT-20
SQL> select * from v$database_block_corruption;
no rows selected
SQL> SELECT tablespace_name, segment_type, owner, segment_name
2 FROM dba_extents
3 WHERE file_id = 10
4 and 112588 between block_id AND block_id + blocks - 1;
TABLESPACE_NAME SEGMENT_TYPE OWNER
------------------------------ ------------------ ------------------------------
SEGMENT_NAME
--------------------------------------------------------------------------------
USERS TABLE SUPERMAG
SMDOCLOG
SQL> SELECT tablespace_name, segment_type, owner, segment_name
2 FROM dba_extents
3 WHERE file_id = 10
4 and 95938 between block_id AND block_id + blocks - 1;
TABLESPACE_NAME SEGMENT_TYPE OWNER
------------------------------ ------------------ ------------------------------
SEGMENT_NAME
--------------------------------------------------------------------------------
USERS TABLE SUPERMAG
SMSPEC
SQL> ANALYZE TABLE supermag.SMDOCLOG VALIDATE STRUCTURE;
Table analyzed.
SQL> ANALYZE TABLE supermag.SMDOCLOG VALIDATE STRUCTURE CASCADE;
ANALYZE TABLE supermag.SMDOCLOG VALIDATE STRUCTURE CASCADE
*
ERROR at line 1:
ORA-01499: table/index cross reference failure - see trace file