Skip to content

Commit 2ce7563

Browse files
Update sp_IndexCleanup.sql
1 parent 7801948 commit 2ce7563

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sp_IndexCleanup/sp_IndexCleanup.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11611161
1/0
11621162
FROM ' + QUOTENAME(@current_database_name) + N'.sys.views AS v
11631163
WHERE v.object_id = i.object_id
1164-
)';
1164+
)
1165+
AND i.is_disabled = 0
1166+
AND i.is_hypothetical = 0';
11651167

11661168
IF /* Check for temporal tables support */
11671169
(

0 commit comments

Comments
 (0)