• Grey Twitter Icon
  • Grey Facebook Icon
  • Grey LinkedIn Icon
  • Grey Google+ Icon

© 2016 - 2019 All rights reserved. PigeonSQL.com | Filip Holub

Add New FileGroups and Files in Database

January 11, 2017

This post will be about FileGroups. FileGroups contain few database (.ndf) which is very good. For example for performance, separate tables in different files, save data files to another disk and etc..

 

But today I want to write about: 

 

How to add FileGroups and Files to Database?

 

It's a very simple task, there are two ways how to do it:

 

1) Using T-SQL

2) Using Management Studio

 

First of all, I will show you how to add FileGroup and File via T-SQL.

 

In my case I will be using the Pigeon database.

 

a) T-SQL for adding a new FILEGROUP:

 

 

T-SQL for adding new FILES:

 

 

 

a) Right click on the Database and choose Properties. Then click on Filegroups, click Add Filegroup below Rows and write name. Confirm OK.

 

 

b) Right click on the Database and choose Properties. Then click on Files, click Add.

 

As you can see I added new files in the "NewFileGroup" in column FileGroup I chose NewGroup, set Initial Size, Autogrowth and place for new datafile (.ndf) and confirm OK.

 

And that is All! See you later.

 

 

 

Please reload

RECENT POST
Please reload

  • Facebook Social Icon
  • Google+ Social Icon
  • LinkedIn Social Icon
  • Twitter Social Icon