Hanging odbc connections

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Hanging odbc connections

  • Creator
    Topic
  • #53068
    Mike Campbell
    Participant

      Seems that the tclproc we have to query an odbc database doesn’t always release or end the process creating numerous non-current but ‘active’ odbc theads.  The tclproc has the final line as:

       # free ODBC handles

           set err [odbc SQLFreeHandle SQL_HANDLE_STMT $hstmt]

           set err [odbc SQLDisconnect $hDBConnection]

           set err [odbc SQLFreeHandle SQL_HANDLE_DBC $hDBConnection]

           set err [odbc SQLFreeHandle SQL_HANDLE_ENV $henv]

        # Return

          return “”

      Is there something else I need to include to ensure the process releases or frees the database?

      Thanks.

      Mike Campbell

    Viewing 2 reply threads
    • Author
      Replies
      • #76441
        Jim Kosloskey
        Participant

          Mike,

          Did all of those commands succeed (particularly the disconnect)?

          I do not see any check of the $err variable.

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

        • #76442
          Mike Campbell
          Participant

            I’ll check on those.  As always good idea Jim.  😳

          • #76443
            Mike Campbell
            Participant

              So far for the past 5 hours, all process have ended with SQL_SUCCESS.  I’ll continue to monitor the processes.

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.