Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Posts
    22

    Unanswered: Issue with shrink database.

    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...

  2. #2
    Join Date
    May 2005
    Posts
    22

    Smile

    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.

  3. #3
    Join Date
    Nov 2005
    Posts
    122
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •