The following query on Firebird V2.x gets the attachment that holds the oldest active transaction via the monitoring tables.

SELECT *
FROM MON$ATTACHMENTS
where MON$ATTACHMENT_ID =
  (select MON$ATTACHMENT_ID FROM MON$TRANSACTIONS
   where MON$TRANSACTION_ID =
      (SELECT min(MON$TRANSACTION_ID) FROM MON$TRANSACTIONS))

Like this post? Share on: TwitterFacebookEmail


Related Articles


Author

Firebird Community

Published

Category

Gems from Firebird Support list

Tags