Skip to main content

SYS.Database.BackgroundFileCompact

persistent class SYS.Database.BackgroundFileCompact extends %SYS.BackgroundTask

SQL Table Name: SYS_Database.BackgroundFileCompact

Class to start, monitor and control the Database Compaction utiltity running in the background. The method run in the background is the FileCompact method of SYS.Database.

To start it

	set oref=##class(SYS.Database.BackgroundFileCompact).Start(Directory,TargetFree)

Start() returns an oref to an object of this class that can be inspected and reloaded to get status and progress updates. See superclass %SYS.BackgroundTask for detailed information on features of this object.

Property Inventory

Parameters

parameter CANCELDISPOSITION = -1;
Disposition for cancel requests.

0 - not allowed
1 - polls for cancel requests
-1 - directly terminate the process

parameter PAUSEDISPOSITION = -1;
Inherited description: Disposition for pause requests.

0 - not allowed
1 - polls for pause requests
-1 - directly pause the process

Properties

property BlocksScanned as %Integer [ Calculated ];
Blocks scanned as part of compaction. This includes blocks that have been relocated, either explicity because they needed to be moved, or incidentally as part of the operation. Also includes blocks searched as required to move a big string storage block. The expected value is highly dependent on the physical structure of the databases and is hard to predict; it serves mostly as an indication of forward progress.
Property methods: BlocksScannedCompute(), BlocksScannedDisplayToLogical(), BlocksScannedGet(), BlocksScannedIsValid(), BlocksScannedLogicalToDisplay(), BlocksScannedNormalize(), BlocksScannedSQLCompute()
property Database as %SysPath;
Database directory on which to operate
Property methods: DatabaseDisplayToLogical(), DatabaseGet(), DatabaseGetStored(), DatabaseIsValid(), DatabaseLogicalToDisplay(), DatabaseLogicalToOdbc(), DatabaseNormalize(), DatabaseSet()

Queries

query List()
SQL Query:
SELECT %ID,StartTime,Database,RunningState,HasEnded,FinalStatus,ProgressCurrent,ProgressTotal,ProgressUnits FROM SYS_Database.BackgroundFileCompact

Inherited Members

Inherited Properties

Inherited Methods

Storage

Gray indicates storage defined by superclasses.

Storage Model: Storage (%SYS.BackgroundTask)

^%SYS.BackgroundTaskD(ID)
=
%%CLASSNAME
StartTime
Namespace
FinalStatus
PID
MemIdx
Version
JobNum
JobID
ExternalStateStored

Storage Model: Storage (SYS.Database.BackgroundFileCompact)

^%SYS.BackgroundTaskD(ID,"BackgroundCompact")
=
Database
BlockSize
FeedbackOpens in a new tab