Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are mdf,ndf,ldf files and how to see the data in those
files?

Answer Posted / ravi santlani

MDF is the main database files - It's a SQL Data files where all the data in the database objects are stored in. (like tables, stored procedures, views, triggers etc are stored in the mdf file of sql server). This is the reason whey we use .MDF file to attache the database. Once we attach the .mdf we were able to see all the data exist in that respective database.


LDF is the log files - The size of the log file(ldf) is determined my the logging level you have set up on the database. Simple, full, and buld logged are the options. Simple being the least, and full being the most. The log (if in full) will alow you to re-apply transactions to the databse incase of a failure. If your looking for some performance improvement, there are a lot of things that can be done.

Just to focus on the files you could more the location of the LDF file to a separate physical drive. This will increate performance because writing to the log and writing to the mdf files wont compete for each other for throughput tot he drive.


NDF are secondary databse files (Same as mdf, but you can only have 1 Main database file).


You can also create a NDF file for the databese, and change some of the tables to be stored on this NDF. This file also could be stored on a separate physical drive. Some advantages to this are:

Tables that are written to most frequently are stored in one file, and tables that are relatively static are in another. Having to smaller file to write to for transactions will help with throughput.

Is This Answer Correct ?    46 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me what are the essential components of sql server service broker?

941


Why is there a performance difference between two similar queries where one uses union and the other uses union all?

1032


Do you think BCNF is better than 2NF & 3NF? Why?

1278


As a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this?

1037


What does indexation mean?

973


I have all the primary data files, secondary data files as well as logs. Now, tell me can I still restore the database without having a full backup? : sql server database administration

1120


Can two tables have the same primary key?

1204


What is cursors? And what are the different types of cursor?

1144


What is shared lock?

901


Explain the stored procedure?

1052


What happens if you add a new index to large table?

937


What is nested transaction?

1099


How to rebuild all indexes on a single table?

1058


What is instead of dml trigger?

999


What is not null constraint?

1118