I have seen various questions related to TUF files,and one of the discussion was interesting and it was something like below-
<Start>
John – I don’t understand why we need this TUF file in SQL Server, what does it do? I have been looking around for more information, but seems there is no great information around the same.
Kim – Are you talking about .TRN files?
John – No, I am talking about .TUF files. Trust me it’s there!
Kim – Oh, then I am missing something. Let me check that out.
</End of discussion>
So what is this TUF file is all about?
I was also not very sure of what TUF file deals with, however after some research I was able to understand the concept of TUF files and decided to write this post.
TUF file or a Transaction Undo File is created when performing log shipping to a server in Standby mode. This file contains information on all the modifications performed at the time backup is taken.
This file is important in Standby mode of log shipping were you can access the secondary database. Database recovery is done in standby mode when log is restored.
While restoring the log backup, un-committed transactions will be recorded to the undo file and only committed transactions will be written to disk there by making users to read the database. When we restore next Tlog backup SQL server will fetch the un-committed transactions from undo file and check with the new Tlog backup whether the same is committed or not. If its committed the transactions will be written to disk else it will be stored in undo file until it gets committed or rolled back.
A small graphical representation of the above statement is shown below –
I configured log shipping to test TUF file and created a scenario like below –
1. Created a primary database.
2. Configured log shipping to another Instance within the same box.
3. Backup, Copy and Restore to happen every 15 minutes.
4. Continuously inserted data to the primary database to simulate TUF creation.
5. I was able to find TUF file created under the same path were I had placed my system databases files.
There seems to be changes in this path were we can find the TUF files. It will be available in the root as mentioned above for SQL Server 2008 above and used to be in the LS_Copy folder for earlier versions.
Coming up next – What happens when I delete this file? So please stay tuned my friends.
Thanks for reading.
Pingback: Deleted the TUF file!!! Boy, that’s trouble « SQLSailor
if you delete TUF file, log shipping won’t work and you have to start it again from scratch.
by the way .TUF file used in Log shipping.
Yes,I wrote about the same already https://sqlsailor.com/2012/01/12/deleted-the-tuf-file-boy-thats-trouble
You can check that out