Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

sql transaction log has not been updated for 30 days

Posted on 2014-09-10
5
Medium Priority
?
212 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 70

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 668 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 70

Assisted Solution

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

Accepted Solution

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

581 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