Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

How to analyze which SQL statement fills my transaction log?

$
0
0

Hi experts,

  I have a 650GB transaction log  and I found it is filled with a specific program(I saw it using dbcc opentran). I know it is a SAP program and it ran more than two days until it filled the transaction log.

  The program is weird, most of the time it does not use transaction log because SAP ABAP code is running(This can be seen via sp_WhoIsActive or T-SQL:)

SELECT database_transaction_log_bytes_used,tst.session_id,tdt.*
FROM sys.dm_tran_database_transactions tdt
INNER JOIN sys.dm_tran_session_transactions tst
ON tdt.[transaction_id] = tst.[transaction_id]
where session_id = '300'

---

But it does not show me which SQL statement where maybe I should add a commit. Anyway, is there any T-SQL script or SQL log miner that can help me to identify which SQL statement fills my transaction log? I use SQL 2012.


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>