Salesforce

How to detect stray dynamic temp-tables.

« Go Back

Information

 
TitleHow to detect stray dynamic temp-tables.
URL NameP113170
Article Number000151854
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
How to detect those dynamic temp-tables that have not been deleted.
How to find out which dynamic temp-tables linger in memory.
How to find out which dynamic temp-tables might cause memory leaks.
How to find out which dynamic temp-tables might cause the client DBI file to grow unexpectedly.
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
Run the following code at a point in the OpenEdge session where there should be few or no dynamic temp-tables: 
DEFINE VARIABLE hBuffer    AS HANDLE     NO-UNDO.

  OUTPUT TO "memdump.log" APPEND.
  PUT UNFORMATTED SKIP
    "** Dump: " TODAY STRING(TIME,'HH:MM:SS') SKIP
    "** Dynamic temp-tables **" SKIP.
  ASSIGN hBuffer = SESSION:FIRST-BUFFER.
  DO WHILE VALID-HANDLE(hBuffer):
    IF VALID-HANDLE((hBuffer:TABLE-HANDLE)) THEN DO:
      PUT hBuffer:TABLE-HANDLE:NAME FORMAT "x(20)" AT 2
          " ".
      &IF PROVERSION BEGINS "1" &THEN
        IF VALID-HANDLE(hBuffer:INSTANTIATING-PROCEDURE) THEN
          PUT hBuffer:INSTANTIATING-PROCEDURE:FILE-NAME FORMAT "x(40)".
      &ENDIF
      PUT SKIP.
    END.
    hBuffer = hBuffer:NEXT-SIBLING.
  END.
  OUTPUT CLOSE.
The file memdump.log will contain the names of the dynamic temp-tables currently in memory. In OpenEdge 10.x and above, the name of the procedure that created the temp-table will also be included.

Another alternative, available in OpenEdge 10.x and later, is to activate the client logging with the DynObjects.DB log entry type. The log will then report when each dynamic temp-table is created and when it is deleted. For further information refer to Articles:
Workaround
Notes
References to written documentation:

OpenEdge Development: Debugging and Troubleshooting guide.

Progress Articles:

 How to troubleshoot "Attempt to define too many indexes" errors for OpenEdge clients ? 
 Managing Memory within the ABL?  
Keyword Phrase
Last Modified Date11/20/2020 7:36 AM

Powered by