Home > Maintenance > Equally distribute data in Secondary File within a File Group

Equally distribute data in Secondary File within a File Group

This is a really a pain job.The Primary Data file has grown out of proportion and reached to the drive limit.Adding a new data file (secondary file.ndf) will only be used for new allocation of data or index pages. Then how to equally distribute data between the primary and secondary files , I have read lot of blog post but nothing actually helped me.  Eventually I thought to REBUIL all indexes with fill factor

 

 

Print 'Rebuilding indexes on every table in the database.' EXEC sp_MSforeachtable @command1="print 'Rebuilding indexes for ?' ALTER INDEX ALL ON ? REBUILD WITH (FILLFACTOR = 90)" GO

image

Categories: Maintenance
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: