Oracle9i Supplied PL/SQL Packages and Types Reference Release 2 (9.2) Part Number A96612-01 |
|
DBMS_REPAIR, 2 of 2
This procedure provides administrative functions for the DBMS_REPAIR
package repair and orphan key tables.
DBMS_REPAIR.ADMIN_TABLES ( table_name IN VARCHAR2, table_type IN BINARY_INTEGER, action IN BINARY_INTEGER, tablespace IN VARCHAR2 DEFAULT NULL);
Parameter | Description |
---|---|
table_name |
Name of the table to be processed. Defaults to |
table_type |
Type of table; must be either See "Enumeration Types". |
action |
Indicates what administrative action to perform. Must be either When See "Enumeration Types". |
tablespace |
Indicates the tablespace to use when creating a table. By default, the |
This procedure checks the specified objects and populates the repair table with information about corruptions and repair directives.
Validation consists of block checking all blocks in the object. You may optionally specify a DBA range, partition name, or subpartition name when you want to check a portion of an object.
DBMS_REPAIR.CHECK_OBJECT ( schema_name IN VARCHAR2, object_name IN VARCHAR2, partition_name IN VARCHAR2 DEFAULT NULL, object_type IN BINARY_INTEGER DEFAULT TABLE_OBJECT, repair_table_name IN VARCHAR2 DEFAULT 'REPAIR_TABLE', flags IN BINARY_INTEGER DEFAULT NULL, relative_fno IN BINARY_INTEGER DEFAULT NULL, block_start IN BINARY_INTEGER DEFAULT NULL, block_end IN BINARY_INTEGER DEFAULT NULL, corrupt_count OUT BINARY_INTEGER);
Parameter | Description |
---|---|
schema_name |
Schema name of the object to be checked. |
object_name |
Name of the table or index to be checked. |
partition_name |
Partition or subpartition name to be checked. If this is a partitioned object, and if |
object_type |
Type of the object to be processed. This must be either See "Enumeration Types". |
repair_table_name |
Name of the repair table to be populated. The table must exist in the |
flags |
Reserved for future use. |
relative_fno |
Relative file number: Used when specifying a block range. |
block_start |
First block to process if specifying a block range. May be specified only if the object is a single table, partition, or subpartition. |
block_end |
Last block to process if specifying a block range. May be specified only if the object is a single table, partition, or subpartition. If only one of |
corrupt_count |
Number of corruptions reported. |
This procedure reports on index entries that point to rows in corrupt data blocks. For each such index entry encountered, a row is inserted into the specified orphan table.
If the repair table is specified, then any corrupt blocks associated with the base table are handled in addition to all data blocks that are marked software corrupt. Otherwise, only blocks that are marked corrupt are handled.
This information may be useful for rebuilding lost rows in the table and for diagnostic purposes.
DBMS_REPAIR.DUMP_ORPHAN_KEYS ( schema_name IN VARCHAR2, object_name IN VARCHAR2, partition_name IN VARCHAR2 DEFAULT NULL, object_type IN BINARY_INTEGER DEFAULT INDEX_OBJECT, repair_table_name IN VARCHAR2 DEFAULT 'REPAIR_TABLE', orphan_table_name IN VARCHAR2 DEFAULT 'ORPHAN_KEYS_TABLE', flags IN BINARY_INTEGER DEFAULT NULL, key_count OUT BINARY_INTEGER);
Parameter | Description |
---|---|
schema_name |
Schema name. |
object_name |
Object name. |
partition_name |
Partition or subpartition name to be processed. If this is a partitioned object, and if |
object_type |
Type of the object to be processed. The default is See "Enumeration Types". |
repair_table_name |
Name of the repair table that has information regarding corrupt blocks in the base table. The specified table must exist in the |
orphan_table_name |
Name of the orphan key table to populate with information regarding each index entry that refers to a row in a corrupt data block. The specified table must exist in the |
flags |
Reserved for future use. |
key_count |
Number of index entries processed. |
This procedure fixes the corrupt blocks in specified objects based on information in the repair table that was previously generated by the check_object
procedure.
Prior to effecting any change to a block, the block is checked to ensure the block is still corrupt. Corrupt blocks are repaired by marking the block software corrupt. When a repair is effected, the associated row in the repair table is updated with a fix timestamp.
DBMS_REPAIR.FIX_CORRUPT_BLOCKS ( schema_name IN VARCHAR2, object_name IN VARCHAR2, partition_name IN VARCHAR2 DEFAULT NULL, object_type IN BINARY_INTEGER DEFAULT TABLE_OBJECT, repair_table_name IN VARCHAR2 DEFAULT 'REPAIR_TABLE', flags IN BINARY_INTEGER DEFAULT NULL, fix_count OUT BINARY_INTEGER);
Parameter | Description |
---|---|
schema_name |
Schema name. |
object_name |
Name of the object with corrupt blocks to be fixed. |
partition_name |
Partition or subpartition name to be processed. If this is a partitioned object, and if |
object_type |
Type of the object to be processed. This must be either See "Enumeration Types". |
repair_table_name |
Name of the repair table with the repair directives. Must exist in the |
flags |
Reserved for future use. |
fix_count |
Number of blocks fixed. |
This procedure rebuilds the freelists for the specified object. All free blocks are placed on the master freelist. All other freelists are zeroed.
If the object has multiple freelist groups, then the free blocks are distributed among all freelists, allocating to the different groups in round-robin fashion.
DBMS_REPAIR.REBUILD_FREELISTS ( schema_name IN VARCHAR2, partition_name IN VARCHAR2 DEFAULT NULL, object_type IN BINARY_INTEGER DEFAULT TABLE_OBJECT);
Parameter | Description |
---|---|
schema_name |
Schema name. |
object_name |
Name of the object whose freelists are to be rebuilt. |
partition_name |
Partition or subpartition name whose freelists are to be rebuilt. If this is a partitioned object, and partition_name is not specified, then all partitions and subpartitions are processed. If this is a partitioned object, and the specified partition contains subpartitions, then all subpartitions are processed. |
object_type |
Type of the object to be processed. This must be either See "Enumeration Types". |
This procedure enables or disables the skipping of corrupt blocks during index and table scans of the specified object.
When the object is a table, skip applies to the table and its indexes. When the object is a cluster, it applies to all of the tables in the cluster, and their respective indexes.
DBMS_REPAIR.SKIP_CORRUPT_BLOCKS ( schema_name IN VARCHAR2, object_name IN VARCHAR2, object_type IN BINARY_INTEGER DEFAULT TABLE_OBJECT, flags IN BINARY_INTEGER DEFAULT SKIP_FLAG);
Parameter | Description |
---|---|
schema_name |
Schema name of the object to be processed. |
object_name |
Name of the object. |
partition_name (optional) |
Partition or subpartition name to be processed. If this is a partitioned object, and if |
object_type |
Type of the object to be processed. This must be either See "Enumeration Types". |
flags |
If See "Enumeration Types". |
With this procedure you can fix the corrupted state of a bitmap entry. The procedure either recalculates the state based on the current contents of the corresponding block or sets the state to a specific value.
DBMS_REPAIR.SEGMENT_FIX_STATUS ( segment_owner IN VARCHAR2, segment_name IN VARCHAR2, segment_type IN BINARY_INTEGER DEFAULT TABLE_OBJECT, file_number IN BINARY_INTEGER DEFAULT NULL, block_number IN BINARY_INTEGER DEFAULT NULL, status_value IN BINARY_INTEGER DEFAULT NULL, partition_name IN VARCHAR2 DEFAULT NULL,);
/* Fix the bitmap status for all the blocks in table mytab in schema sys */ execute dbms_repair.segment_fix_status('SYS', 'MYTAB'); /* Mark block number 45, filenumber 1 for table mytab in sys schema as FULL.*/ execute dbms_repair.segment_fix_status('SYS', 'MYTAB', 1,1, 45, 1);
|
Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|