SQL Server Performance Forum – Threads Archive
Issue with shrink database.When i try to shrink my database i am getting the following error:
Cannot use the PAGE granularity hint on the table "dbo.Tablename" because locking at the specified granularity is inhibited.
DBCC SHRINKDATABASE: Heap page 1:422421 could not be moved.
The statement has been terminated.
DBCC execution completed. If DBCC printed error messages, contact your system administrator. (.Net SqlClient Data Provider) any help apreciated. kIRAN
Looks like table has no clustered indexes which might be cuasing this when moving the data…Try to run backup log if the db recovery model is full or checkpoint if it is simple then run shrink again…. Other wise you can try after creating the clustered on the tables…
SQL-Server-Performance.com All postings are provided â€œAS ISâ€ with no warranties for accuracy.
Thanks a lot..I created the cluster Index and tried shrink database, i am not geting error now.. kIRAN
Other question is why you are trying to SHRINK the database if the storage is not a problem, I can see if the processess are contributing the size to the database why not leave it as it is without any further usage of SQL resource that are not required. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.