?
Solved

Adding a filegroup and setting it as default in SQL Server

Posted on 2013-12-29
5
Medium Priority
?
324 Views
Last Modified: 2013-12-30
Is it possible to set a new filegroup as default somewhere within this code?

ALTER DATABASE TestDB
ADD FILEGROUP USER_DATA;
GO

Or can it only be done separately with the MODIFY keyword?

ALTER DATABASE [TestDB] MODIFY FILEGROUP [USER_DATA] DEFAULT
0
Comment
Question by:TimHudspith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 2000 total points
ID: 39745592
In order to set a new Filegroup as default, it requires three steps(you missed the second one)
1. Create a Filegroup
2. Create a File into that Filegroup.
3. Set the Filegroup as default.

And hence it needs to be done in this order as three steps and not in a single command.
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39745837
I hope my answer clarified you completely and deserve a A Grade and justify why it was given a B Grade, also let me know if you require more details so that I can assist you..
0
 

Author Comment

by:TimHudspith
ID: 39746201
How do I change it?
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39747600
Hi Tim,

I've requested Moderators to help on this perspective.
Thanks for responding..

Hi Moderators,

Kindly do the needful.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question