Solved

Moving existing Data file to different FileGroup

Posted on 2010-09-16
4
337 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
  • 2
4 Comments
 
LVL 32

Expert Comment

by:ewangoya
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

746 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

13 Experts available now in Live!

Get 1:1 Help Now