Solved

How to use SQL Transaction log to analyze high usage.

Posted on 2016-10-19
5
56 Views
Last Modified: 2016-11-09
Something was running hard against a database and caused our transaction file to fill and expand repeatedly.

What is the best way to analyze the transaction file to find information about the transactions that were causing the problem?

At this point the transaction file has been backed up.
0
Comment
Question by:MikeMOD
5 Comments
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 41853642
At this point the transaction file has been backed up.
That means the transaction log has been truncated and any relevant information just gone.
With that said I think you can't investigate anymore what happened.
Next time better think to do is to launch a SQL Profiler to capture the current activity so you can see what's happening in the SQL Server instance.
0
 
LVL 26

Expert Comment

by:Zberteoc
ID: 41853871
Or use this:

http://sqlblog.com/blogs/adam_machanic/archive/2012/03/22/released-who-is-active-v11-11.aspx

just run the script you download to create the sp_whoisactive stored procedure and then you just execute it to see what is going on on the server:

EXEC sp_whoisactive

Details here:

https://www.brentozar.com/archive/2010/09/sql-server-dba-scripts-how-to-find-slow-sql-server-queries/
0
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 500 total points
ID: 41853944
The default trace can show when a log grew.  Sometimes just knowing the times of log extensions can help you determine what caused the issue.

Within the trace, EventClass = 93 is "log file autogrow", so look for those class events in the default trace.

You can use function:
fn_trace_gettable
to read the trace file(s).

Typically that trace data stays around a while, assuming you allowed roll-over files.
0
 
LVL 8

Expert Comment

by:Jason clark
ID: 41859836
If the above solutions doesn't work for you then you can also try  the Transact-SQL TRY…CATCH construct. For more information with examples that include transactions, see: https://technet.microsoft.com/en-us/library/ms175976(v=sql.110).aspx
0
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 41880055
MikeMOD, a feedback will be appreciated.
Cheers
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question