Cannot use the PAGE granularity hint on the table because locking at the specified granularity is inhibited.

Posted on : 30-04-2012 | By : Devi Prasad | In : SQL Errors

Share:

0


Error:

Msg 651, Level 16, State 1, Line 1
Cannot use the PAGE granularity hint on the table [table name] because locking at the specified granularity is inhibited.

This error could occur due to creation of indexes on the table with ALLOW_PAGE_LOCKS = OFF

Check the indexes on the table to see if there is any index with ALLOW_PAGE_LOCKS off.

Query:

SELECT * FROM sys.indexes 
WHERE  ALLOW_PAGE_LOCKS = 0 and object_name(object_id) = [table name]

Replace the [table name] with the table name in the error and check if there are any indexes with ALLOW_PAGE_LOCKS disabled.

Fix:
1. Disable the index or change the index to enable page locks.
2. Use row locks or table locks instead.

(Visited 471 times, 1 visits today)



References : Devi Prasad (sqlserverlearner.com)

Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.


Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.




Write a comment



Tags: