Home > Database Technology > Partition Schemes Disabled by Default When Creating Indexes in SSMS 2008

Partition Schemes Disabled by Default When Creating Indexes in SSMS 2008

We use partitioning quite heavily at my current job. And in order to take advantage of switching data from a partitioned table into a staging table all indexes must be aligned on the partition scheme. So, I was frustrated to find out that when you attempt to script out the create statement for an index in SQL Sever Managment Studio (SSMS) 2008 it does not include the clause to create the index on the partition scheme that the index was created on.

Thankfully, Microsoft wasn’t so dense as to remove this funtionality entirely, they simply turned it off by default (which I would argue is ridiculous, but they aren’t really going to listen to little old me). So, here’s the fix.

Open up Tools -> Options then change the setting at: SQL Server Object Explorer -> Scripting -> Script Partition Schemes to TRUE. (it’s at the very bottom of the list)

SSMS Settings

  1. Rebecca
    July 15th, 2009 at 17:10 | #1

    Seriously, this is cool stuff. awesome. it doesn’t get any neater.

  1. No trackbacks yet.