Invoking a Database Validation Using the Services API

From InterBase
Jump to: navigation, search

Go Up to Invoking Database Maintenance Using the Services API


You can request a database validation with the cluster identifier isc_action_svc_repair. Database validation scans internal data structures for specific types of corruption. In some cases, the validation operation can repair corruption.

Important: The validation operation cannot guarantee to repair all cases of corruption. Do not rely on database validation as a disaster recovery policy in lieu of making regular backups of your database.

The following table lists arguments to isc_action_svc_repair to validate a database:

Services API database validation arguments
Argument Purpose Argument length Argument
value

isc_spb_dbname

Path of the primary file of the database, from the server’s point of view

2 bytes + string

String

isc_spb_options

The following value is a bitmask of isc_spb_rpr_xxxx options below

4 bytes

Bitmask

isc_spb_rpr_check_db

Request read-only validation of the database, without correcting any problems; corresponds to gfix -no_update

Bit

isc_spb_rpr_ignore_checksum

Ignore all checksum errors; corresponds to gfix -ignore

Bit

isc_spb_rpr_kill_shadows

Remove references to unavailable shadow files; corresponds to gfix -kill

Bit

isc_spb_rpr_mend_db

Mark corrupted records as unavailable, so subsequent operations skip them; corresponds to gfix -mend

Bit

isc_spb_rpr_validate_db

Locate and release pages that are allocated but unassigned to any data structures; corresponds to gfix -validate

Bit

isc_spb_rpr_full

Check record and page structures, releasing unassigned record fragments; use with isc_spb_rpr_validate_db; corresponds to gfix -full

Bit