Shrink SQL Server Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tanveerbasha
    New Member
    • Jun 2024
    • 1

    Shrink SQL Server Database

    I have database with 263GB where free space is about 45GB. By using below query I executed the shrinking activity.
    Code:
    USE [BriggsAX]
    GO
    DBCC SHRINKFILE (N'BriggsAX' , 250876)
    GO
    but I got the following error after 2 and half hours. Can you please suggest how I can resolve this issue.
    Code:
    Msg 3140, Level 16, State 3, Line 1
    Could not adjust the space allocation for file 'dbfile_Dat'.
    DBCC execution completed.
    If DBCC printed error messages, contact your system administrator.
    Last edited by NeoPa; Jun 4 '24, 01:09 AM.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32662

    #2
    Hi Tanveer.

    I guess the obvious answer is to try this using a disk that has enough space for at least the original plus the shrunk copy - and then some spare. Disks never work well when they're down to the bare bones. 45GB (not Gb) is not tiny in itself, but when being asked to hold the data from a 263GB database that would have to be very sparesely populated to work.

    Comment

    Working...