Database :: checkDatabase - Check database consistency
The function checks database consistency for instances and indexes for a database which is locally available (see CheckDB () utility). The function allows checking and repairing consistency errors. Most consistency errors are caused by redundancy stored in the system but not maintained properly.
In order to perform checkDatabase() in client/server mode, one may call Client ::checkDatabase() .
Implementation overview
- Calling database check with default options
Database :: checkDatabase (  ) - Check instances in a special extent (or collection)
Database :: checkDatabase ( sCheckOptions, vExtentPath ) - Checking database with specific check options
Database :: checkDatabase ( sCheckOptions )
Implementation details
-
Calling database check with default options
Database  :: checkDatabase (  )
A database check for all instances and collections (indexes), inverse references and GUIDs will be performed. Damages will be reported but not repaired.
to list
-
Check instances in a special extent (or collection)
Database  :: checkDatabase ( odaba::String &sCheckOptions, odaba::String &vExtentPath )
The function will check all instances in the extent or property passed in vExtentPath , which may also contain a property path to a local collection. Options different from defaults have to be set in the option string passed in sCheckOptions .
- sCheckOptions
- Check options
Check options can be passed as option string to CheckDB utility or Database ::checkDatabase() and Property ::checkCollection() check functions. An option string may contain following options:
[-C: checks ] [-T: type ] [-R] [-W] [-K: time ]
All options are preceded by an option key, which allows defining options in any order. Default settings are assumed for options, which are not defined in an option string.
Check modes (-C:IXG)
The list of check options determines the type of checks to be performed:
I - Inverse reference check
X - Index check
G - GUID check
Default: -C: IXG (running all checks)
The order of the options does not play any role. One may use capital or small letters except for the option key -C :
Check modes (-C:IXG)The list of check options determines the type of checks to be performed:
I - Inverse reference check
X - Index check
G - GUID check
Default: -C: IXG (running all checks)
The order of the options does not play any role. One may use capital or small letters except for the option key -C :
- vExtentPath
- Extent path
An extent path may simply refer to an extent, but also to a local collection in the database (property path). Thus, an extent path may contain just a name, but also a sequence of path elements separated by '.' in order to refer to far properties.
In order to pass no extent path, an empty string ( String() ) has to be passed.
to list
- sCheckOptions
- Check options
-
Checking database with specific check options
Database  :: checkDatabase ( odaba::String &sCheckOptions )
In order to perform specific database checks, a check option string may be passed in sCheckOptions . In order to repair damages, -R has to be set in the option string.
- sCheckOptions
- Check options
Check options can be passed as option string to CheckDB utility or Database ::checkDatabase() and Property ::checkCollection() check functions. An option string may contain following options:
[-C: checks ] [-T: type ] [-R] [-W] [-K: time ]
All options are preceded by an option key, which allows defining options in any order. Default settings are assumed for options, which are not defined in an option string.
Check modes (-C:IXG)
The list of check options determines the type of checks to be performed:
I - Inverse reference check
X - Index check
G - GUID check
Default: -C: IXG (running all checks)
The order of the options does not play any role. One may use capital or small letters except for the option key -C :
Check modes (-C:IXG)The list of check options determines the type of checks to be performed:
I - Inverse reference check
X - Index check
G - GUID check
Default: -C: IXG (running all checks)
The order of the options does not play any role. One may use capital or small letters except for the option key -C :
to list
- sCheckOptions
- Check options