SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


why we need secondary(.ndf) file in Database


why we need secondary(.ndf) file in Database

Author
Message
karnikshukla
karnikshukla
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 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?
Bhaskar.Shetty
Bhaskar.Shetty
SSC Eights!
SSC Eights! (868 reputation)SSC Eights! (868 reputation)SSC Eights! (868 reputation)SSC Eights! (868 reputation)SSC Eights! (868 reputation)SSC Eights! (868 reputation)SSC Eights! (868 reputation)SSC Eights! (868 reputation)

Group: General Forum Members
Points: 868 Visits: 509
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.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)

Group: General Forum Members
Points: 91685 Visits: 45285
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, MVP, M.Sc (Comp Sci)
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


psingla
psingla
SSC Eights!
SSC Eights! (894 reputation)SSC Eights! (894 reputation)SSC Eights! (894 reputation)SSC Eights! (894 reputation)SSC Eights! (894 reputation)SSC Eights! (894 reputation)SSC Eights! (894 reputation)SSC Eights! (894 reputation)

Group: General Forum Members
Points: 894 Visits: 1249
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 | MCSE SQL Server 2012/2014

in.linkedin.com/in/pramodsingla/
http://pramodsingla.wordpress.com/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search