|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, December 24, 2010 2:17 AM
Points: 0,
Visits: 3
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, February 14, 2013 8:22 AM
Points: 2,
Visits: 69
|
|
I'd suggest that the code for [Log Used %] be changed to:
, CAST(CAST(CAST(lu.cntr_value AS FLOAT) / CAST(ls.cntr_value AS FLOAT) AS DECIMAL(18, 4)) * 100 AS DECIMAL(18, 2)) AS [Log Used %]
This gives you an additional 2 digits before doing your left shift so you don't always end up with results .00.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 5:15 AM
Points: 236,
Visits: 235
|
|
Title was full of promise, but we need more. Ideally, we want to be able to determine what statements caused the log to grow so suddenly (and who issued the statements) and we want to do this automatically, not by running a query. i.e. at the time there is "excessive log file growth" alert the DBA providing a list of user-statements currently executing. The tools and DMVs are out there but unfortunately do not provide a full picture (who, what, when, sql statements running). I think Profiler comes to the closest (Events "Log File Auto Grow" & "SQL:BatchCompleted") but even that involves monitoring and examining, not automatically alerting.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 2:37 PM
Points: 170,
Visits: 388
|
|
I have a scenario here:
On my TEMPDB, the log reuse wait description shows " Active_transaction". Then I checked DBCC OPENTRAN('tempdb') . I got message showing there are no open transactions. Then I also queried: select * from sys.dm_tran_active_transactions
I see some four 6 worktables. I don't know about these tables. Now how can I change my tempdb state to "Nothing".
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 2:37 PM
Points: 170,
Visits: 388
|
|
| When I restarted the server, tempdb - logreuse wait description showing 'Nothing'. So, is this the only way we need to do?
|
|
|
|