Solved

sql transaction log has not been updated for 30 days

Posted on 2014-09-10
5
175 Views
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,
0
Comment
Question by:BUCKBERG
  • 3
5 Comments
 
LVL 69

Expert Comment

by:ScottPletcher
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).
0
 
LVL 23

Assisted Solution

by:rhandels
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.
0
 
LVL 69

Assisted Solution

by:ScottPletcher
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.).
0
 

Author Comment

by:BUCKBERG
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.
0
 
LVL 69

Accepted Solution

by:
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.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

867 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

12 Experts available now in Live!

Get 1:1 Help Now