Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Time stamps of MDF and LDF Database files

Posted on 2007-07-20
3
Medium Priority
?
1,071 Views
Last Modified: 2012-08-13
I found one thing needs to be clarified in SQL 2005 server is when the time stamp of the MDF and LDF file being updated.

The reason why I am asking is that I noticed in a busy SQL environment, the time stamps of all the databases's MDF and LDF are many days behind, or even hardly updated since it is created over month ago. To my understand the LDF file should be updated once there is a log committed and the MDF file should be updated once the transactional log file backed up or the log truncated,  therefore the MDF and LDF files' time stamps should be updated accordingly.

This include the system databases and user databases.

Can you explain why the time stamps of these files are far behind?
0
Comment
Question by:fshguo
  • 2
3 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 19530773
because timestamp is updated when the file is closed. If your server is up all the time, it keeps those files open, so timestamp is not updated.
0
 

Author Comment

by:fshguo
ID: 19531335
But I do see the time stamp on one of the MDF files was updated, however the server was not reboot during that period. what else could cause the time stamp changed rather than reboot or stop the SQL service?
0
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 1000 total points
ID: 19532213
The timestamp is changed not by sql server but by windows. If it's changed, it means that sql server closed the file. Why - only sql server programmer might tell. For example, it regularly opens and closes tempdb.

One guess would be that this database has option "auto-close", i.e. sql server closes it automatically after period of inactivity.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

810 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