Archive
SQL SERVER – List All Objects Created on All Filegroups in Database
List All Objects Created on All Filegroups in Database
How to move table to particular file in database
moving Tables from one filegroup to another filegroup ENJOY 🙂
Well, it can’t be done. You cannot move a table to a particular file in database.
Â
What you can do is move the table to a particular file group. A FILEGROUP contains one or more data files. If the FILEGROUP contains more than one data file, SQL Server uses a proportional fill algorithm to make use of all data files in the FILEGROUP. On the other hand, if the FILEGROUP contains a single data file, then you can say that you have moved the table to a particular file without any doubts.
To move a table to a particular file file group, you need to re-create the clustered index on the table. Recreating an index effectively moves the table to the new FILEGROUP. The example below demonstrates the same.
Â
Let’s create a test database to work with:
USEÂ Â [master]
GO
Â
CREATEDATABASE [TestDB]
View original post 715 more words