Query RDB $ TRANSACTIONS table in Firebird (2.1)

How to use transaction related metadata in firebird (using version 2.1)?

So for example:

1) Open an isql session, modify some table, keep the transaction open.

2) Open another isql session, run the following query:

SELECT * FROM RDB$TRANSACTIONS; 

does not return a string. Is there anything special I need to get this information?

+4
source share
1 answer

The RDB $ TRANSACTIONS table is used only for distributed transactions (for example, transactions that work with multiple databases). To monitor normal transactions, use the MON $ TRANSACTIONS table instead.

 MON$TRANSACTIONS (started transactions) - MON$TRANSACTION_ID (transaction ID) - MON$ATTACHMENT_ID (attachment ID) - MON$STATE (transaction state) 0: idle 1: active - MON$TIMESTAMP (transaction start date/time) - MON$TOP_TRANSACTION (top transaction) - MON$OLDEST_TRANSACTION (local OIT number) - MON$OLDEST_ACTIVE (local OAT number) - MON$ISOLATION_MODE (isolation mode) 0: consistency 1: concurrency 2: read committed record version 3: read committed no record version - MON$LOCK_TIMEOUT (lock timeout) -1: infinite wait 0: no wait N: timeout N - MON$READ_ONLY (read-only flag) - MON$AUTO_COMMIT (auto-commit flag) - MON$AUTO_UNDO (auto-undo flag) - MON$STAT_ID (statistics ID) 
+1
source

All Articles