HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

How to specify the exact .ndf file on a filegroup to save a table in?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
exactthefilespecifyfilegroupsavehowndftable

Problem

I have a filegroup(not the primary one) which contains two different .ndf files, for example a1.ndf and a2.ndf.

Now I want to create a table and I want my table to be saved in a2.ndf file not a1. Is there a way to do things like this? I am using SQL Server.

Thanks.

Solution

No, you can't specify the exact data file you want the data to go into.

What you can, though, is specify the filegroup at the table creation. If you want to fill in a big table on a specific disk drive, then you have to create a different filegroup, and create the table on that filegroup.

Context

StackExchange Database Administrators Q#219783, answer score: 7

Revisions (0)

No revisions yet.