Smart Rename Filtered Index

danfountaindanfountain Posts: 12
edited March 27, 2013 12:25PM in SQL Prompt Previous Versions
Hi,

I have found a little bug in smart rename. On the object i rename i have a filtered index that looks like this:
CREATE UNIQUE NONCLUSTERED INDEX [IX_UNQ_Name] ON [Config].[tbl_Users] 
(
	[Name] ASC
)
WHERE ([Name] IS NOT NULL)
WITH (PAD_INDEX  = ON, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 100) ON [PRIMARY]

However when it recreates the index on a smart rename (its dropped at the start) it does this:
CREATE UNIQUE NONCLUSTERED INDEX [IX_UNQ_Name] ON [dbo].[tblmi_Usersx] ([Name]) WITH (FILLFACTOR=100, PAD_INDEX=ON) ON [PRIMARY]

Missing the most the where clause. This causes my rename script to fail.

Many thanks

Dan

Comments

  • Sorry just to clarify (sorry i cut the wrong bit out of a script).

    The names of the indexes should be the same. The only bit which is causing a problem is the missing where clause.

    The first part is what the index currently looks like. The second part is what is attempted to be put back on by rename on the renamed table.

    Dan
  • Eddie DEddie D Posts: 1,802 Rose Gold 5
    Hi

    Thank you for your forum post and sorry that you have encountered a problem.

    I was able to recreate the bug using your example, therefore I have submitted a bug report, the bug report reference is SP-4661.

    At this time I have no further information as to when this bug will be fixed, but I will be maintaining what our bug tracking system calls a 'watch' on the bug report submitted. This means I will be able to update this forum post when the bug is fixed at some point in the future.

    Thank you for bringing this problem to our attention.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.