on 2021 May 12 7:27 AM
Hi,
Is there a way to see the end of a connection in the transaction log files?
The begining of a connection is seen as:
--CONNECT-1028-0481325402-dba-2021-03-21 11:33
But How can track this connection to find what was the last transaction of this connection?
Simply looking for transactions with 1028 will not help since the same number 1028 could be allocated to a new connection once the last connection is finished
Request clarification before answering.
Disconnects are not always logged such as if the server is restarted without a clean shutdown. The last transaction for a connection should be the last transaction that occurs before the next CONNECT for that connection ID (if there is one) or the end of the log(s) otherwise.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
dbtran will not show the disconnects: they just generate a rollback but, of course, so will a real rollback.
No two connections that are active at the same time will have the same ID. Therefore, when you see a 'CONNECT' for a given ID it is a new connection and won't conflict with any others. Also note that dbtran output is, by default, ordered by the order in which transactions were committed and does not include transactions that were rolled back. In other words, it produces an equivalent serialization of the log contents (ie, it removes all of the interlacing of transactions).
Yes, that too. 🙂 Note that transactions can span logs so you want to look for the next CONNECT-1028 or the end of the log(s) that you are looking at.
dbtran can handle multiple files by putting them into a directory & using the -m switch.
Any transaction active at the time dbtran hits the end of the last file is assumed to have rolled back -- even if they continued on into the next log because dbtran cannot know if they continued unless it can see the next file.
User | Count |
---|---|
47 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.