Monday, March 19, 2012

Log file growth- what's the culprit?

I have an issue where a database on SQL 2005 (set to "simple" recovery mode)
has exponential log growth when I run one particular software service
against the DB, it grows by 100-200 megabytes a minute.
This service is very simple; it contains several "select" statements (that
wouldn't cause log growth, right?), and two or three insert/update
statements. The insert/update statements are all in stored procedures that
the service calls (it is written in .Net 2.0). The stored procedures have no
transaction statements in them at all, and if I add begin/end transaction
statements it doesn't make a difference.
So, how do I figure out exactly what in the service is causing the log file
growth? I have no idea how to determine that.
Thanks for any help.
JonIs the log file growth in Tempdb or a user db? You can use profiler and
trace the log autogrow events and see what statements are just before the
growth.
Andrew J. Kelly SQL MVP
"Jon" <rosenberg@.mainstreams.com> wrote in message
news:ekMLJP50HHA.728@.TK2MSFTNGP05.phx.gbl...
>I have an issue where a database on SQL 2005 (set to "simple" recovery
>mode) has exponential log growth when I run one particular software service
>against the DB, it grows by 100-200 megabytes a minute.
> This service is very simple; it contains several "select" statements (that
> wouldn't cause log growth, right?), and two or three insert/update
> statements. The insert/update statements are all in stored procedures that
> the service calls (it is written in .Net 2.0). The stored procedures have
> no transaction statements in them at all, and if I add begin/end
> transaction statements it doesn't make a difference.
> So, how do I figure out exactly what in the service is causing the log
> file growth? I have no idea how to determine that.
> Thanks for any help.
> Jon
>|||It's a user db. Thanks, I'll try and use profiler to figure it out, I wasn't
aware of the autogrow events.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OECNe790HHA.3848@.TK2MSFTNGP03.phx.gbl...
> Is the log file growth in Tempdb or a user db? You can use profiler and
> trace the log autogrow events and see what statements are just before the
> growth.
> --
> Andrew J. Kelly SQL MVP
> "Jon" <rosenberg@.mainstreams.com> wrote in message
> news:ekMLJP50HHA.728@.TK2MSFTNGP05.phx.gbl...
>

No comments:

Post a Comment