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

why we need secondary(.ndf) file in Database Expand / Collapse
Author
Message
Posted Saturday, June 8, 2013 4:52 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 15, 2014 1:22 PM
Points: 1, Visits: 8
Create Database dbTest
ON
(
NAME='sample1',
FILENAME='G:\Testing\Sample1.mdf',
SIZE=5MB,
MAXSIZE=10MB
),
(
NAME='sample2',
FILENAME='G:\Testing\Sample2.mdf',
SIZE=5MB,
MAXSIZE=10MB
),
(
NAME='sample3',
FILENAME='G:\Testing\Sample3.mdf',
SIZE=5MB,
MAXSIZE=10MB
)

if we create database with multiple mdf files,then what is use of ndf file?

I am new in sql,can anyone help me?
Post #1461271
Posted Saturday, June 8, 2013 5:19 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, August 14, 2014 2:41 AM
Points: 480, Visits: 420
whenever you create a database with multiple data files, the first file will be created as .mdf and all other as .ndf.

Normally we create database with multiple data files to keep the data on different IO disk, for better performace and management.
Post #1461272
Posted Saturday, June 8, 2013 6:10 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:51 PM
Points: 42,756, Visits: 35,850
The extensions are just a naming convention, nothing more. A secondary data file is a secondary data file, whether it has the mdf extension, the ndf extension or any other extension that you like.
SQL doesn't enforce the file extension convention anywhere, it won't automatically make secondary files have a .ndf extension.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1461275
Posted Tuesday, June 25, 2013 8:34 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Thursday, July 31, 2014 7:49 AM
Points: 608, Visits: 1,027
It's just a way to differentiate between primary and secondary data files.If we keep all the data file extension same then others might confuse between primary and secondary data file.

Primary data file contains some metadata about secondary files.

Although we can keep the extension whatever we like .x,.y etc.


Pramod
SQL Server DBA | MCSA SQL Server 2012

in.linkedin.com/in/pramodsingla/
http://pramodsingla.wordpress.com/
Post #1467196
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse