Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««1234»»»

DB File Extension Expand / Collapse
Author
Message
Posted Thursday, August 28, 2008 6:55 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 7:18 AM
Points: 993, Visits: 8,655
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
Post #560369
Posted Thursday, August 28, 2008 7:11 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, April 12, 2013 12:23 PM
Points: 606, Visits: 587
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)
Post #560391
Posted Thursday, August 28, 2008 7:17 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, August 29, 2014 10:23 AM
Points: 3,299, Visits: 1,978
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.
Post #560398
Posted Thursday, August 28, 2008 7:23 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, June 26, 2014 6:11 AM
Points: 1,330, Visits: 815
I suppose that technically .ldf should be included but I'm inclined to agree with most here who got stuck on wording.
Post #560407
Posted Thursday, August 28, 2008 7:43 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, August 29, 2014 3:24 PM
Points: 3,154, Visits: 8,015
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

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.
Post #560443
Posted Thursday, August 28, 2008 8:57 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, August 22, 2014 7:04 AM
Points: 3,675, Visits: 72,433
Come on if you follow the link to MS's site you find this glaring at you


SQL Server databases have three types of files:

* Primary data files
The primary data file is the starting point of the database and points to the other files in the database. Every database has one primary data file. The recommended file name extension for primary data files is .mdf.
* Secondary data files
Secondary data files make up all the data files, other than the primary data file. Some databases may not have any secondary data files, while others have several secondary data files. The recommended file name extension for secondary data files is .ndf.
* Log files
Log files hold all the log information that is used to recover the database. There must be at least one log file for each database, although there can be more than one. The recommended file name extension for log files is .ldf.


Thus log files are database files. If you actually create a database and specify a second data file and don't enter a filename in SQL 2005 it adds ndf to it. Hence mdf, ldf, and ndf are all database file extensions.

A Database to SQL server is what all of these files when combined provide. Concurrency control is a necessity in an RDBMS so having a LOG file so you can use Transactions is a must. This was an easy one.




--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #560558
Posted Thursday, August 28, 2008 9:40 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 8:24 AM
Points: 2,351, Visits: 2,700
I knew I should have checked *.ldf - even though it is a log file, so I thought it was not a database file.

I guess both are considered "database files" because they are needed for the database. Sounds picky, but the URL below makes sense - mdf/ndf files are "data files" and ldf files are "log files". Together they make up "database files."

A primer on SQL Server database files
http://articles.techrepublic.com.com/5100-10878_11-6096988.html

I should go with my gut more often. :)

webrunner


-------------------
"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Post #560608
Posted Thursday, August 28, 2008 9:55 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Friday, April 4, 2014 4:40 PM
Points: 751, Visits: 917
Michael Kipp (8/28/2008)
Please don't confuse "database files" with "data files".
A database is more than just a data file.


A database is more than just a data file, but it is not inherently dependent on a log. Many databases that are designed for single-user use do not maintain any form of log file, yet remain true databases.

Even in MS SQL Server specifically, while the log file is of great importance for many things, it at least arguably does not hold the database entities. It can be discarded and rebuilt with no challenge if you have the actual data files (.mdf and .ndf by default.)


---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
Post #560620
Posted Thursday, August 28, 2008 4:47 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, August 3, 2014 10:04 PM
Points: 2,953, Visits: 437
for those of you who says .ldf is log file not data file, please read the question carefully, it asks for database file, not data file. .ldf forms a part of database file, because database file consists of (on full and bulk-logged recovery mode) data file and log file.

I personally think it's a good question, as it tests your knowledge of differentiating data file and database file.



Urbis, an urban transformation company
Post #560896
Posted Thursday, August 28, 2008 6:32 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 5:57 AM
Points: 2,601, Visits: 1,545
yep, i was confused by the question too. I thought it was just asking for database file extension, not include database log extension, meaning only mdf and ndf by default.

What a confusing question indeed.
- Simon


Simon Liew
Microsoft Certified Master: SQL Server 2008
Post #560920
« Prev Topic | Next Topic »

Add to briefcase ««1234»»»

Permissions Expand / Collapse