开发者

LDF is not being updated, normal?

Im having an issue with a site which has gone very slow, so just checking database etc.

So at the moment my

MDF File is 320MB and LDF File is 18 MB

The one thing I noticed that was weird is that the LDF file hasn开发者_Go百科t been updated for 4 Days going by Date Modified when I know there has been DB transactions, just wondering if this should be possible ?

If not, how can I resolve it


I believe that, so long as the file is kept open (which it will be whilst the database is attached and online), the last modified date will not be updated.

I think it's only updated when the file is first opened for modifications, and/or when it's closed. You shouldn't rely on filesystem based tools to inspect the state of SQL Server - used the tools built into SQL Server (e.g. performance counters, SQL Logs) or Management Studio (e.g. Activity Monitor).

For slowness, you might want to see whether there are excessive resource waits occurring, and if so, which types (e.g. lock waits or I/O waits).


The date modified for the LDF file is probably not a very good metric to check. I have several databases that I know are accessed every day, and some of the log files are reported as not being modified by the file system for several months.

A better thing to check, if you expect database performance to be the problem, would be to try to identify any portions of the site that are particularly slow and use SQL Profiler to see which database operations are taking longer than usual.


StevieB,

SQL has MDF files, these are you used to store data, and LDF store log files, basically a list of changes to the database over time, the LDF may get modified depending on your database recovery mode, if in full mode it will log everything, if simple not at all.

Do worry about it not changing. SQL Server knows what to do.

Cheers

Iain

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜