Showing posts with label Default. Show all posts
Showing posts with label Default. Show all posts

Monday, November 14, 2016

Set default filegroup for Microsoft Database project


1) First of all you have to create new filegroup. To do that add following file to your database project:

DataFileGroup.sql


/*
Do not change the database path or name variables.
Any sqlcmd variables will be properly substituted during 
build and deployment.
*/
ALTER DATABASE [$(DatabaseName)]
    ADD FILEGROUP [DATA]

2) Navigate to Database project properties in Visual Studio. -> Click "Database settings..."


3) Navigate to "Operational" tab -> Set default filegroup using combo-box with created filegroup on step 1.