Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : ABL API for Multi-tenant and Table Partition Management : Executing DataAdminService utilities : DeallocateUtility class
 
DeallocateUtility class
The DeallocateUtility class allows you to deallocate entity partitions. This is a wrapper around the PROUTIL command. It is implemented as a utility because it is likely to be commonly used when working with multi-tenant databases.
The class supports two constructors, which allows you to deallocate a table for a tenant and a tenant group, respectively:

Syntax

DeallocateUtility( ITenant, ITable )
DeallocateUtility( ITenantGroup )
The following code shows how to deallocate a table for a tenant:
define variable util as IDataAdminUtility no-undo.
define variable tbl as ITable no-undo.
define variable tnt as ITenant no-undo.
tbl = service:GetTable("Customer").
tnt = service:GetTenant("ABC").
util = new DeallocateUtility(tnt,tbl).
service:ExecuteUtility(util).
The following code shows how to deallocate a tenant group:
define variable util as IDataAdminUtility no-undo.
define variable grp as ITenantGroup no-undo.
grp = service:GetTenantGroup("Customer").
util = new DeallocateUtility(grp).
service:ExecuteUtility(util).