08-27-2010 03:55 AM
Solved! Go to Solution.
08-27-2010 06:09 AM
set quoted_identifier off
go
SELECT "alter index [" + i.name + "] ON [" + s.name + "].[" + t.name + "]
SET (ALLOW_PAGE_LOCKS = ON)
"
FROM sys.schemas s
JOIN sys.tables t ON
t.schema_id = s.schema_id
JOIN sys.indexes i ON
i.object_id = t.object_id
WHERE
i.index_id > 0
AND INDEXPROPERTY(i.object_id, i.name, 'IsPageLockDisallowed') = 1
Option 1: No row returns --- No action needed
Option 2. Rows returned. --- Copy the result and run in the same database, it will fix the indexes in question.
08-27-2010 06:03 AM
08-27-2010 06:09 AM
set quoted_identifier off
go
SELECT "alter index [" + i.name + "] ON [" + s.name + "].[" + t.name + "]
SET (ALLOW_PAGE_LOCKS = ON)
"
FROM sys.schemas s
JOIN sys.tables t ON
t.schema_id = s.schema_id
JOIN sys.indexes i ON
i.object_id = t.object_id
WHERE
i.index_id > 0
AND INDEXPROPERTY(i.object_id, i.name, 'IsPageLockDisallowed') = 1
Option 1: No row returns --- No action needed
Option 2. Rows returned. --- Copy the result and run in the same database, it will fix the indexes in question.
08-27-2010 06:15 AM
08-27-2010 06:28 AM
08-27-2010 07:02 AM
08-27-2010 08:17 AM
08-27-2010 11:53 AM