This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > ENSLIB namespace > %SYS.DatabaseQuery

%SYS.DatabaseQuery

abstract class %SYS.DatabaseQuery extends %SYSTEM.Help

Provides database queries from other namespaces than %SYS.

Method Inventory

Parameters

parameter DOMAIN = %Utility;
Default Localization Domain

Methods

classmethod GetDatabaseFreeSpace(Directory As %String, ByRef FreeSpace As %Integer) as %Status
Calculate remaining free space in a database.

Parameters:
Directory - Physical directory of the database.
Freespace - (byref) Returned # of MB of freespace in the directory.

Note: This requires %Admin_Operate:USE permission
classmethod GetFreeSpace(Directory As %String, ByRef FreeSpace As %Integer, ByRef FreeBlocks As %Integer) as %Status
Calculate remaining free space in a database.

Parameters:
Directory - Physical directory of the database.
Freespace - (byref) Returned # of MB of freespace in the directory.
FreeBlocks - (byref) Returned # of blocks of freespace in the directory.

Note: This requires %Admin_Operate:USE permission

Queries

query FreeSpace(Mask As %String = "*")
Selects DatabaseName As %String, Directory As %String, MaxSize As %String, Size As %String, ExpansionSize As %String, Available As %String, Free As %Float, DiskFreeSpace As %String, Status As %String, SizeInt As %Integer, AvailableNum As %Integer, DiskFreeSpaceNum As %Integer, ReadOnly As %Boolean
Provides a freespace list of all local databases mounted in this configuration.

Note that calculating the free space may take a while.
Parameters:
Mask="*" or $lb(directory1,directory2,...)
For the FreeSpace Report, You can also enter the following in order to select by database name:
"String,String1" - Any name matching one of these elements
"String*" - Any Name starting with "String"
"String,String1*,String2" - Any Name matching one of these elements, or starting with "String1"
Notes: Databases which are not mounted are not returned by this query.
This requires %Admin_Operate:USE permission

Inherited Members

Inherited Methods