SQL Server interview questions: – There are 2 physical files MDF and LDF, what are they?

This question is extracted from SQL Server interview question book by Shivprasad koirala , click here to know about SQL Server interview question book

Both these files are found in “C:\Program Files\Microsoft SQL Server\MSSQLX.MSSQLSERVER\MSSQL\DATA”. Please note to replace X with 10 for 2008 and 11 for 2012.

MDF file is the primary database file where the actual user data and schema gets stored. In other words table data, table structure, stored procedures, views and all SQL Server objects gets stored in to this file.

LDF file is a transaction log file to store transaction logs. They do not have the actual user data or schema definition. Every MDF will have associated LDF. While recovering the database it’s always advisable to keep the LDF so that you do not lose any transaction information.


See this mind blowing SQL Server interview question video: – What are inner joins left join and right join?

Do not forget to look in to .NET, c#, SQL Server video product SQL Server interview questions


Click to view more from author’s on SQL Server Interview question


About c# and .NET Interview questions

This blog is for developers who want to crack .NET and C# interviews. It has all tips and tricks needed to crack .NET interviews , C# interview , SQL Server interview , Java interview , WCF Interview , Silverlight interview , WPF interview , LINQ interview , Entity framework Interview. Do not forget to watch our Learn step by step video series. Learn MVC in 16 hours:- https://www.youtube.com/watch?v=Lp7nSImO5vk Learn AngularJS Step by Step:- https://www.youtube.com/watch?v=0kmdjqgO9IY Learn Design Pattern in 8 hours:- https://www.youtube.com/watch?v=YDobmucohqk Learn C# and .NET in 60 days:- https://www.youtube.com/watch?v=yh2SrzCkNQA Learn MSBI in 32 hours:- https://www.youtube.com/watch?v=mGPJx3ocFgg Learn SharePoint Step by Step in 8 hours:- https://youtu.be/C2fW76SwJNU
This entry was posted in Uncategorized and tagged , , , , , , , , . Bookmark the permalink.

One Response to SQL Server interview questions: – There are 2 physical files MDF and LDF, what are they?

  1. The only thing I would add is that the very well qualified person will know that the extension is meaningless, but only a basic convention (and what an .NDF probably is :))

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s