sql transaction log has not been updated for 30 days

Posted on 2014-09-10
Last Modified: 2014-09-11
We have a SQL database that the last update date to the transaction log is 30 days ago.  it is set to autogrow and is no where near full size.  Actually, it is quite small compared to the database.  we have had no performance issues but this concerns me.  I am at a loss to how this can happen.

Thank you,
Question by:BUCKBERG
  • 3
LVL 69

Expert Comment

ID: 40314621
Are you going by the directory "last updated" date?  That is not necessarily accurate for SQL Server files.  SQL doesn't update the date every time it writes (good thing, as the overhead of that would be enormous).
LVL 23

Assisted Solution

rhandels earned 167 total points
ID: 40314630
The transaction log will only grow if you have the full recovery model activated.
Also, if you have full recovery model enabled the transaction log will be truncated if you do a full backup of the database or a translog log backup.

So normally your transaction log should be smaller than your database, it will only be larger than your database if you have a rather small database with a large amount of changes to the database.
LVL 69

Assisted Solution

ScottPletcher earned 333 total points
ID: 40314650
>> The transaction log will only grow if you have the full recovery model activated. <<

False.  Logging occurs in any recovery model when any type of data modification is done.

>> Also, if you have full recovery model enabled the transaction log will be truncated if you do a full backup of the database <<

False.  Backing up the database will not cause log truncation in that case, only a log backup does that, and only if the log records are not needed for any other purpose (replication, etc.).

Author Comment

ID: 40314853
Unfortunately, for the database the backup mode is "Copy Only".  I would suspect since there is no checkpoint that the transaction log would grow large, which is the experience I have with another instance at our sister site. The log file is tiny compared to database.  I will have to check if the recovery mode is simple. I am looking for another explanation.
LVL 69

Accepted Solution

ScottPletcher earned 333 total points
ID: 40314896
The database log will likely grow a lot less if it's in Simple recovery model, but the log can still grow, as logging does still occur.  The difference is that the log will be automatically truncated at checkpoint in simple mode (unless the log records are needed for some other purpose such as replication).  That allows existing log space to be used over and over rather than having to use additional log space until a log backup is done in full/bulk-logged mode.

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now