Loading...
 

CX_DB_UTILITY

CX_DB_UTILITY  CX_DB_UTILITY.png

Class hierarchy
Description:

This tool object provides functions for manipulating objects in the database. In contrast to the functions of object managers, the services of the Database Utility Objectare intended as tools for error analysis and repair - not as a component of applications.
The functions all have an interface to InstantView®, i.e. with InstantView® you can quickly put together the right tools for a particular problem.

Many functions identify a certain object by its location in the database, which in ObjectStore version < 6.0 consists of the triplet { Database, Segment, Offset } and from ObjectStore 6.0 on the quintuple { Database, Segment, Cluster, Offset, Mapping Granularity }.
In ObjectStore the (physical) database is specified by the full path (as a string): long form of the location.
In the ClassiX® system, the physical database can be opened with { 0, 1 ... }: short form of the location. All functions recognise short forms and convert them automatically into the corresponding long form. Examples:

ObjectStore < 6.0 ObjectStore >= 6.0
long /y:/classix/path/to/database.cxd | 72 | b908> /y:/classix/path/to/database.cxd |72|2c|a08|1000>
briefly <0|72|2c|a08|1000>

Some functions analyse the output of programs for database maintenance:

Programme Functions of the CX_DB_UTILITY object
osverifydb.exe ImportVerifyDBLog
cxaosr.exe -A (database analysis) GetCorruptObjectsEx, GetCorruptObjectsSel, GetCorruptObjectsLoc
cxcosr.exe -1 (checksum 1) GetOrphans
cxcosr.exe -1 (checksum 2) GetObjectsWithChecksumDifference
cxlosr.exe (Load -> the gateway file) GetObjectInNewDatabase
Code example:
Get DBUtility-Object
// get CX_DB_UTILITY object Var(dbUtil) GetManager(OBJECT) Call(GetDBUtility) -> dbUtil
List of methods (MDI)
Function MA* Parameters Return Brief description
AffiliateDB INTEGER, INTEGER allow cross-database pointers from one database to another
AnalyzeObject OBJECT STRING Test object
BackptrCount OBJECT INTEGER How many indices is this object linked to?
CheckSum OBJECT VECTOR Calculate check sum
CheckVerificationResults STRING STRING verify a verification result
CleanseFrame OBJECT give up dynamic data fields
ClearBackptr OBJECT Cut links from this object to all its indices
ClearCollection OBJECT, STRING remove all elements from the collection
ClearPointer DATABASE, STRING, STRING, INTEGER Set a pointer to ZERO
CollectionTypeInfo OBJECT, STRING VECTOR Return: Type names of all elements of the collection
DBDumpFile OBJECT Returned value: CX_DB_DUMP_FILE
DeregisterREPColl STRING Cancels a REP collection.
DumpCollection
213694
COLLECTION, STRING INTEGERWrites all persistent objects of the collection to a file. (For MoveFrameBatch, LoadCollectionDump).
ErrorMsg OBJECT STRING Find object error message
Exists STRING INTEGERChecks whether a persistent object is located at an address.
ExportCollection COLLECTION, STRING Export addresses of objects in a collection
FindAll INTEGER, INTEGER COLLECTION Finds all objects of one type
FindCorruptObjects COLLECTION VECTOR Search for corrupt objects
FindFormulaConstants COLLECTION, INTEGER COLLECTION
FindObjectsReferencingPosition STRING, INTEGER, INTEGER, INTEGER Find all objects that reference a specific location in the database
FindObjectsReferencingPosition2 STRING, INTEGER, INTEGER, INTEGER, INTEGER, INTEGER Find all objects that reference a specific location in the database,
with extended AS handling and partial search in one segment
FindReferencingObjects STRING INTEGER Building X-Ref
FindSlots VECTOR, COLLECTION, INTEGER COLLECTION
GetCollectionAddresses
235301
COLLECTIONVECTORSTRINGReturns all object addresses of the elements contained in the collection
GetCorruptObjectsEx STRING, VECTOR, VECTOR COLLECTION returns the objects from an error log
GetCorruptObjectsLoc STRING, VECTOR, VECTOR, INTEGER VECTOR like GetCorruptObjectsEx returns the database locations
GetCorruptObjectsSel STRING, VECTOR, VECTOR COLLECTION returns the objects from an error log
GetLocation ANY STRING Returns the location of an object
GetObjectInNewDatabase STRING, STRING OBJECT Find object in newly loaded database with location from old database
GetObjectsWithChecksumDifference STRING, INTEGER VECTOR all objects with different checksums
GetOrphans STRING, INTEGER VECTOR the inaccessible objects detected during unloading
GetOwner OBJECT X OBJECT Y Returns the object Y, which contains the object x as member
GetOwnerOfDSCO STRING OBJECT Returns the object in whose memory the DSCO address falls
GrabObject STRING OBJECT Find object by location
GetREPs DATABASE VECTOR Find all REPs of a database
GetREPCollByName DATABASE, STRING COLLECTION Find a REP Collection with your name
GetREPObjectByName DATABASE, STRING OBJECT Find a REP object with name
GetTypeAt ANY STRING Returns the type of an object
GetTypeAtDSCO STRING STRING Returns the type of an object at the DSCO address
ImplantList OBJECT, STRING, COLLECTION Repair corrupt "embedded" collections
ImplantSet OBJECT, STRING, COLLECTION Repair corrupt "embedded" collections
ImportVerifyDBLog STRING VECTOR returns all objects for which osverifydb.exe has reported an error
IndexesOfCollection COLLECTION STRING Indexes of a collection
InsertIntoCollection COLLECTION, STRING Insert object into the collection by object ID
KillREPColl STRING Cancels a REP and deletes it.
LoadCollectionDump
220617
STRING, INTEGER, INTEGER Loads objects from a file written with DumpCollection .
MoveFrame
213694
COLLECTION, INTEGER Reallocates the frames of the transferred objects to free space in the cluster.
MoveFrameBatch
213694
STRING, INTEGER, INTEGER Like MoveFrame, except that the process can be interrupted and continued at any time.
PartialXRefParams STRING, COLLECTION
RebuildCollection COLLECTION, INTEGERINTEGER Rebuild Collection
RemoveAlienObjects OBJECT, STRING INTEGER removes objects of a different type from a collection
RemoveFromCollection COLLECTION, STRING Remove object from collection
RemoveFromREPCollection STRING, OBJECT removes object from a REP collection
RepairCollection COLLECTION INTEGER removes all pointers to corrupt objects from a collection
RepairFrame OBJECT, INTEGERINTEGER Repair for dynamic data fields
SetCollAsREP COLLECTION, DATABASE, STRING Register a collection at a REP
SetObjectAsREP OBJECT, DATABASE, STRING Registers an object at a REP
SubstituteObject OBJECT, INTEGER, INTEGER OBJECT Replace object
SubstituteObjectInCollection OBJECT, STRING, OBJECT, OBJECT replace an object with another one in a predefined collection
SelectiveCopy OBJECT, OBJECT, VECTOR INTEGER copies data fields of the source object to the target object
UnloadCorruptObject OBJECT, STRING INTEGER unloads an object
UnloadObject OBJECT, STRING unloads an object -
UnloadObject2 OBJECT, OBJECT like UnloadObject but with CX_ASCII_FILE as parameter 2
VerifyDatabase STRING, INTEGER verifies the database
VerifySegments STRING, VECTOR, INTEGER verifies a list of segments

* MA = Member Access Function

Use in AppsWH
Module Brief description