Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

move all indexes to a secondary file group

By MVDBA, 2006/06/19

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: 4239 | Views in the last 30 days: 58
 
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

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones