Archive

Archive for June 19, 2013

SQL SERVER – List All Objects Created on All Filegroups in Database

June 19, 2013 Leave a comment

List All Objects Created on All Filegroups in Database

Advertisements
Categories: INDEXES

How to move table to particular file in database

June 19, 2013 Leave a comment

moving Tables from one filegroup to another filegroup ENJOY 🙂

Sql And Me

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

Categories: INDEXES