Solved

Moving existing Data file to different FileGroup

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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

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…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
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 setup several different housekeeping processes for a SQL Server.

732 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