Monday, March 19, 2012

Can move a file outside of PRIMARY to a new file group?

So I messed up and didn't create file groups for my scheme
partitioning strategy... can I create a file group and then take a
file out of PRIMARY and move it to SAN1_FILEGROUP for example?
I'm thinking take the database OFFLINE
and ALTER DATABASE to move the file to the SAN1_FILEGROUP?
Thanks
ErikNo, that is because SQL Server don't place objects on a certain file, it places objects on a
filegroup. So, create a new filegroup, add file(s) to it, move the objects, shrink the original file
using (EMPTYFILE) and then drop that file.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Erik G" <info@.fdaregulatory.com> wrote in message
news:1174936993.128302.101110@.l75g2000hse.googlegroups.com...
> So I messed up and didn't create file groups for my scheme
> partitioning strategy... can I create a file group and then take a
> file out of PRIMARY and move it to SAN1_FILEGROUP for example?
> I'm thinking take the database OFFLINE
> and ALTER DATABASE to move the file to the SAN1_FILEGROUP?
> Thanks
> Erik
>

No comments:

Post a Comment