Salesforce

How to query if an Object or Area is assigned to the Alternate Buffer Pool (-B2)

« Go Back

Information

 
TitleHow to query if an Object or Area is assigned to the Alternate Buffer Pool (-B2)
URL NameABL-Object-or-Area-assigned-to-B2
Article Number000174099
EnvironmentProduct: OpenEdge
Version: 10.2B, 11.x
OS: All supported platforms
Other: Alternate Buffer Pool, -B2
Question/Problem Description
How to query if a Database Object or Area is assigned to the Alternate Buffer Pool (-B2)
How to see which Buffer Pool a Storage Area has been assigned to
How to see which Buffer Pool a Table or Index has been assigned to
ABL code to verify which areas or schema objects are assigned to -B2
proutil viewB2 only shows -B2 assignment at AREA level 
Database Admin Report Alternate Buffer Pool only shows -B2 assignment at the object level (online or offline)

 

Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
1.   Area level Buffer Pool assignment is stored in _Area._Area-attrib

Where:
get-bits(_area-attrib, 7, 1) = 1 /* Area is assigned to the Alternate Buffer Pool (-B2) */ 
get-bits(_area-attrib, 7, 1) = 0 /* Area is assigned to the Primary Buffer Pool (-B1) */
 
FOR EACH _area NO-LOCK:
  IF GET-BITS(_area-attrib, 7, 1) = 1 THEN DISP _area._area-name "Alternate".
  IF GET-BITS(_area-attrib, 7, 1) = 0 THEN DISP _area._area-name "Primary".
END.

2.   Object level Buffer Pool assignment is stored in _StorageObject._Object-attrib

Where:
get-bits(_storageObject._object-attrib, 7, 1) = 1 /* Object is assigned to the Alternate Buffer Pool (-B2) */ 
get-bits(_storageObject._object-attrib, 7, 1) = 0 /* Object is assigned to the Primary Buffer Pool (-B1) */
 
FOR EACH _StorageObject NO-LOCK   WHERE  _StorageObject._Object-type = 1 AND
    get-bits(_storageObject._object-attrib, 7, 1 ) = 1:

    FIND _Area WHERE _Area._Area-number = _StorageObject._Area-number NO-LOCK no-error.
    FIND _File WHERE _File._File-number = _StorageObject._Object-number NO-LOCK no-error.

    DISPLAY 
        _StorageObject._Area-number _Area._Area-name 
        _file._file-number _file._file-name.
END.

FOR EACH _StorageObject NO-LOCK   WHERE  _StorageObject._Object-type = 2 AND
    get-bits(_storageObject._object-attrib, 7, 1 ) = 1:

    FIND _Area WHERE _Area._Area-number = _StorageObject._Area-number NO-LOCK no-error.
    FIND _Index WHERE _Index._Idx-num = _StorageObject._Object-number NO-LOCK no-error.
    IF AVAILABLE _Index THEN FIND _File OF _Index NO-LOCK no-error.

    DISPLAY
        _StorageObject._Area-number _Area._Area-name 
        _file._file-number _file._file-name
        _Index._Idx-num _Index._Index-name.
END.

Since OpenEdge 11.6.3 11.7.0 - PROUTIL -C viewB2 has been enhanced:
  • viewB2 can be run online
  • output includes the assigned storage pool at the area or object level, the size (in blocks) of each object and a total for the Area.  
  • This sizing includes all blocks associated with each object - including free blocks.   
  • viewB2 with the -csoutput Option, includes this additional data
Example: viewB2 output
Area "Customer/Order Area":8 - Primary Buffer Pool 

Object Enablement    Size     Type   Object Name 
-----------------  -------- -------  ------------ 
Default                   7  Master   Area.Control-Object:0 
Alternate              1320   Table   PUB.Customer:2 
Default                 104   Table   PUB.Order:4 
Default                 176   Table   PUB.Order-Line:5 
Default                  32   Index   PUB.Order.Cust-Order:21 
                   -------- 
                       1639 
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:16 AM

Powered by