February 12, 2008 at 3:14 am
Hi
I just have a query as I am new to SQL. I just been looking at the sql database and transaction log files in windows explorer and found out the database and transaction log files last updated was on 17 January 2008.
I was wondering if this was normal.
Thank you in advance
Will
February 12, 2008 at 8:19 am
Thats probably when the database was created.
Kenneth
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
February 12, 2008 at 10:18 am
Is the SQL Server running? Is the database open, meaning not set to autoclose. If there was no activity, and including system activity like backups, this could be the case.
February 12, 2008 at 10:27 pm
My main production accounting database has about 150 connections all day every day. The file datetime on the .mdf file for it is 1/27/2008 11:46 PM as of this writing, so I would say that your situation is not unusual. Most likely the date is from the last time it (auto)grew.
If you want a nice quick query to see what the last backup date for all databases on your server was, you can use this.
Another approach you can take is to user Rockmoose table sizes script and find your largest tables. If they have date columns in them like [DateLastModified], you can get a good idea of when the last activity was in the databases by sorting them descending.
Cheers.
G. Milner
February 13, 2008 at 2:53 am
Hi All
Thank you all for your replies. The database is used by over 100+users and from running the script detailing when the last backup of the database was, the last backup was on 12 Feb 08.
Not sure if it was a coincidence but the date and time of the last modified database files and transaction log was the day and time that our 3 node cluster failed.
thanks
February 13, 2008 at 6:03 am
the date and time stamp on database file will only change when the file is modified as far as the OS is concerned, which would include file grows or shrinks. SQL activity in the database (inserts, updates) that does not alter the physical size of the file will not cause changes in the data and time stamp.
Not quite sure why the cluster failure updated the date modified stamp, but presumably the cluster failed over to a different node so perhaps the fact it was being referenced by a different server? Check the next time you failover.
---------------------------------------------------------------------
February 13, 2008 at 7:45 am
An insert/update would cause a last modified time to change, but I think the file has to close for this to be triggered. So the last time your SQL Server was restarted, and the files opened/closed, is probably the date.
February 13, 2008 at 8:31 am
Steve Jones - Editor (2/13/2008)
An insert/update would cause a last modified time to change, but I think the file has to close for this to be triggered. So the last time your SQL Server was restarted, and the files opened/closed, is probably the date.
so, if autoclose is not on, which it shouldn't be in most cases, insert/update will not change date modified! 🙂
Looking at my files bounce of SQL updated modified time, so any close would., and its the close that changes the modified time, not the insert update:discuss:
either way, don't worry about modified date, its meaningless!
---------------------------------------------------------------------
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply