using OpenEdge.DataAdmin.*.
using OpenEdge.DataAdmin.Lang.Collections.*. define variable service as DataAdminService no-undo. define variable tableImpl as ITable no-undo. define variable iterator as IIterator no-undo. define variable iterator2 as IIterator no-undo. define variable partition as IPartition no-undo. assign service = new DataAdminService("sportsmt") tableImpl = service:GetTable("Customer") tableImpl:IsMultitenant = true. service:UpdateTable(tableImpl). iterator = TableImpl:LOBFields:Iterator(). do while iterator:HasNext(): iterator2 = cast(iterator:Next(),IField):Partitions:Iterator("AllocationState <> 'Allocated'"). do while iterator2:HasNext(): partition = cast(iterator2:Next(),IPartition). partition:Area = service:GetArea("ExpressLobArea"). end. end. iterator = TableImpl:Indexes:Iterator(). do while iterator:HasNext(): iterator2 = cast(iterator:Next(),IIndex):Partitions:Iterator("AllocationState <> 'Allocated'"). do while iterator2:HasNext(): partition = cast(iterator2:Next(),IPartition). partition:Area = service:GetArea("ExpressIndexArea"). end. end. iterator = tableImpl:Partitions:Iterator("AllocationState <> 'Allocated'"). do while iterator:HasNext(): partition = cast(iterator:Next(),IPartition). partition:Area = service:GetArea("ExpressDataArea"). partition:Allocate(). end. service:UpdateTable(tableImpl). |