Solved

Moving existing Data file to different FileGroup

Posted on 2010-09-16
4
339 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

920 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

17 Experts available now in Live!

Get 1:1 Help Now