DB File Extension

  • Muhammad Tariq

    Ten Centuries

    Points: 1020

    Comments posted to this topic are about the item DB File Extension

    Tariq
    master your setup, master yourself.
    http://mssqlsolutions.blogspot.com

  • Ben Leighton

    SSCommitted

    Points: 1838

    why oh why did I think this was a trick question?:)

    Of course .ldf is a sql server file extension... but is .ldf really a "sql server database" file extension. My reasoning? For a fully functioning sql server database you need all the .mdf and .ndf files that were set up when the database was created... the .ldf is merely a list of recent transactions. Lose either the .mdf and .ndf files and you will have nothing that will work... delete the .ldf and you simply lose a few transactions.

    One valuable point missed I think!

  • TimothyAWiseman

    SSCrazy Eights

    Points: 8819

    I'm inclined to agree with Ben. It does depend on how you define the terms, but I generally do not think of ldf as a database file.

    It stores log information, and while that can be valuable it does not store relational database information per se. You can destroy and recreate the ldf file with very minimal consequences, but if an mdf or ndf file is damaged you will be looking for the backups.

    ---
    Timothy A Wiseman
    SQL Blog: http://timothyawiseman.wordpress.com/

  • rodjkidd

    SSCoach

    Points: 15776

    Actually they are all listed in BOL together as files, so i would agree with the Question. Helps I got it right as well 😉

    ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/39e00ebe-c9b7-4d53-90bd-15de2015fd34.htm

    Not sure if that works for everyone, as I find it weird that my local BOL gives a web type address for the pages... So no idea if that's universal for all installs.

    Actually I was in two minds about .ndf - I knew it was a suggested extension for secondary data files but wasn't sure if it was the default. Picked it anyway, so for once I got a fifty fifty right! I get a very high number of fifty fifty's wrong - which statistically speaking shouldn't the be the case 🙂

  • Wilfred van Dijk

    SSCrazy Eights

    Points: 8906

    aaaargh! .ldf is not a databasefile extension, but a logfile extension. :crazy:

    So i disagree with the suggested "correct" answer

    Wilfred
    The best things in life are the simple things

  • rajankjohn

    SSCertifiable

    Points: 5001

    another confusing QOD

  • elbedata

    SSCarpal Tunnel

    Points: 4204

    He, He, Didn't think about *.ldf as a "database" extension.

    Sometimes the QOD wording could be better... 😛

    Lars Broberg
    Elbe-Data AB

  • Mighty

    SSCrazy Eights

    Points: 8398

    Please don't confuse "database files" with "data files".

    A database is more than just a data file.

  • skyline666

    Ten Centuries

    Points: 1069

    Michael Kipp (8/28/2008)


    Please don't confuse "database files" with "data files".

    A database is more than just a data file.

    According to the link provided with the QOD, .mdf, .ndf and .ldf all come under "database files", and it states .mdf and .ndf as "data files".

  • Jamie-2229

    SSCrazy Eights

    Points: 8151

    Gee... I figured I would get this one wrong. It was so obvious that the question was not specifically including log files when the statement asked for database files, that the question was not, what are the extensions, but was the person writing the question going to be grouping log files with database files? Now I can see that the person is actually Microsoft and they call them database files. I call them log files. Same thing. So the question is now - is Microsoft right or me?

    OK, Microsoft, I concede - you're bigger than I am.

    Jamie

  • Steve Eckhart

    SSCommitted

    Points: 1880

    I didn't select .ndf because it is a suggested name, not a default. A default implies that if the user makes no other selection, the system will automatically set a value. So, if I add a new data file to a database and don't specify an extension, SQL would automatically append .ndf to the file name. This is not the case. If you add a file (in SQL Server 2000) to a database and do not include an extension, SQL Server doesn't append any extension.


    Steve Eckhart

  • sqlizer

    SSCrazy

    Points: 2090

    I disagree with the answers, .ldf is for logfile not for datafile. the question specifically asks for the database files.

    SQL Server 2005 does not enforce database filename extensions, but which of the following are the default file extensions for database files? (choose all that apply):w00t:

  • Ken Wymore

    SSCoach

    Points: 16354

    This QOD had trick question written all over it, or so it seemed to me. I almost chose .mdf and .ndf based on the word "database" in the question but then checked BOL, saw all 3 grouped together and decided to include .ldf anyway. I got it right but certainly did not like the way it was worded.

  • jim.powers

    SSCrazy Eights

    Points: 8605

    I suppose that technically .ldf should be included but I'm inclined to agree with most here who got stuck on wording.

  • Alvin Ramard

    SSC-Forever

    Points: 41190

    Like someone already said, do not confuse database files with data files.

    If you do not agree that the log file is a database file then go ahead and remove the log file from your databases. We can revisit the issue after that.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 15 posts - 1 through 15 (of 32 total)

You must be logged in to reply to this topic. Login to reply