Solved

Moving existing Data file to different FileGroup

Posted on 2010-09-16
4
350 Views
Last Modified: 2012-05-10
I currently have a database where the 1st data file is in one filegroup and the other 8 files are in a second filegroup.  I want to move the 1st file into the secondary filegroup.  Some basic directions would be appreciated.

0
Comment
Question by:blberger
[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
  • 2
4 Comments
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 33697953
Easiest way to do so is to detach database, move file, then re-attach
 
0
 

Author Comment

by:blberger
ID: 33704117
Not physically moving the datafile. The primary datafile (.mdf) is in a different firlegroup than the other datafiles (ldf).  I need to move the primary file into the same filegroup as the others and not move the datafile from drive to drive.
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 33707037
>> I want to move the 1st file into the secondary filegroup.  Some basic directions would be appreciated.

From BOL,
"The primary filegroup contains the primary data file and any other files not specifically assigned to another filegroup. All pages for the system tables are allocated in the primary filegroup."

So you can't move primary data file *.mdf from Primary filegroup and place it in another filegroup.
Instead You can move your other files from user created filegroup to Primary filegroup itself
0
 

Author Closing Comment

by:blberger
ID: 33718129
I guess that I was just being stubborn and wnated to keep the other filegroup instead.
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how the fundamental information of how to create a table.

689 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