Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 move file to filegroup

Author  Topic 

binary
Starting Member

6 Posts

Posted - 2010-06-17 : 05:42:05
i have created a database with two ndf file and two filegroup, now i want to move my file f2.ndf to fg2, i cannot do it whith the ssms, can i do it with alter database statement

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2010-06-17 : 10:48:55
You cannot move a database file from one filegroup to another filegroup.


CODO ERGO SUM
Go to Top of Page

binary
Starting Member

6 Posts

Posted - 2010-06-17 : 11:04:23
thank you
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2010-06-17 : 17:43:16
you can create a new file on the filegroup you want to move the filegroup too and drop/recreate the objects on that filegroup...

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2010-06-17 : 17:47:50
You can also recreate the clustered index for the tables on the new filegroup, described in more detail here:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=145975
Go to Top of Page
   

- Advertisement -