Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

move all indexes to a secondary file group

By MVDBA,

Move all (or chosen) standard indexes from your primary file group to a secondary file group (hopefully located on a seperate array)

excludes clustered indexes, statistics and indexes associated with a primary key

when you run it - set the debug to 1 to identify what the script will move, set it to 0 to actually perform the move.

the @rowcnt parameter will also allow you to specify the max number of rows in the index to move - I tried moving an index from a V V V large table (240Gb) and it took 2 hours.



Total article views: 4990 | Views in the last 30 days: 19
 
Related Articles
FORUM

index

index

FORUM

Index

Index

FORUM

Index

index

FORUM

Indexes

Clustered Index and Nonclustered Index

Tags
indexing    
miscellaneous    
sqlinsider scripts    
t-sql    
 
Contribute