When i try to shrink the database, i am getting the following error:
Cannot use the PAGE granularity hint on the table "dbo.salary" 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...My issue is fixed now..Previously i didn't have cluster index on table and have non-clustered indexes. So i created the cluster indexes and tried shrink database, now it is not giving the error.
:)|||Unless you are running out of disk space, don't shrink your database files. It is time consuming for SQL Server to increase them again.
No comments:
Post a Comment