Firebird - transaction monitoring

1

I updated my Firebird to versão 2.5 and would like to view the transactions, I saw in several links that the command: SELECT * FROM mon$statements resolves, but this command gives me an error:

  

Undefined name. Dynamic SQL Error. SQL error code = -204. Table unknown. MON $ STATEMENTS. unknown ISC error 336397208

So I did not find this table, it can also, because my connection I make is directly inside a database that does not have this "table" mon $ statements, so how to proceed?     

asked by anonymous 18.05.2015 / 14:23

1 answer

1

Using the code below will return all initialized transactions as a response. So you can identify what is causing you problems.

SELECT    
    mon$transaction_id,
    mon$attachment_id,
    mon$state,
    mon$timestamp,
    mon$top_transaction,
    mon$oldest_transaction,
    mon$oldest_active,
    mon$isolation_mode,
    mon$lock_timeout,
    mon$read_only,
    mon$auto_commit,
    mon$auto_undo,
    mon$stat_id,
    case mon$isolation_mode
       when 0 then 'Consistency'
       when 1 then 'Concurrency'
       when 2 then 'Read Committed Record Version'
       when 3 then 'Read Committed'
       else 'Unknown'
    end as Desc_Isolation,
    case MON$LOCK_TIMEOUT
       when -1 then 'Infinite Wait'
       when  0 then 'No wait'
       else 'Timeout ' || cast(MON$LOCK_TIMEOUT as varchar (20))
    end as Desc_TimeOut
from mon$transactions
order by 1
    
05.02.2016 / 14:41