Solved

Adding a filegroup and setting it as default in SQL Server

Posted on 2013-12-29
5
317 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
  • 3
5 Comments
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now