Solved

sql transaction log has not been updated for 30 days

Posted on 2014-09-10
5
190 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 69

Expert Comment

by:Scott Pletcher
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:Scott Pletcher
Scott Pletcher 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:
Scott Pletcher 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Hi Everyone I posted previously on how I used Orchestrator to integrate with VMware and SCSM to create or request a new VM in VMware. Now in my Self Service Portal I had a list user input option that would require me to update the list of reso…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

726 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