September 28, 2007 at 8:04 am
Hi I am new to SQL Server,
I have questions regarding theses files TRN, LDF, MDF and BAK.
I have a maintenance plan that backups the .TRN and .BAK everynight in a folder e:/mssqlsrv/MSSQL/Bakup.
When I look at the date modified in windows explorer they are exactly like I programmed it in the maintenance plan.
Now when I look in the folder e:/mssqlsrv/MSSQL/Data I see the .LDF and .MDF files and they are way out of date.
How do they get copied there (the ldf and mdf)? With the maintenance plan? What is the difference between the TRN and the LDF?
How does a restore work? I am so confused? Please explain to me?
September 28, 2007 at 1:51 pm
The MDF and LDF files are integral to the database. They are dynamic and they reflect each change to the database since inception.
The TRN and BAK files are optional: They are only created when a backup is performed of the Transaction Log or the Database respectively. Once created they are static and you are apparently seeing the date of creation when you look at the file statistics.
Restores take the information stored in the BAK or TRN files to recreate the database at the state it was in when the backups were taken.
This is a very abbreviated explanation. There is a good resource which will explain the types of backups and restores available to you. It is called Books On Line (BOL for short) and can be downloaded from the Microsoft website, if it isn't already loaded onto your server.
Good hunting,
Elliott
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply