DETACH/ATTACH FILEGROUP - by Mattias Lind, Sweden

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 770846 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 11/12/2012 1:35:43 PM
Access Restriction Public


Detaching a filegroup with tables and it's indexes from one database to attach them to another database would be a great feature of SQL Server.

Sign in to post a comment.
Posted by Kevin [MSFT] on 2/13/2013 at 5:14 PM
This is an idea that we've looked at, and while it seems straightforward on the surface, in reality it would be a very large undertaking. Consistency in the database is governed by the log sequence numbers in the transaction log as well as references to LSNs throughout the data files.
If you take a filegroup and drop it into another database, the chance that the new filegroup's LSNs will make any sense at all to the database it has been added to are essentially nil.
In order to accomplish this and still guarantee consistency in all cases, we would need to have independent log streams for filegroups, which has its own problems when considering database-wide consistency. not to mention that it is a massive change to the architecture.