locked
DBCC shrinkdatabase not able to release allocated unused space RRS feed

  • Question

  • I am trying to release allocated free space from my database. Cuurent state of my database 

    

    I was trying to run DBCC SHRINKDATABASE (N'DBName') command and it will end up with following message. I want to reduce this allocatedUnused Space to zero(almost). Any help appropriated. 

    -----------------------------------------------------------------------------------------

    DBCC SHRINKDATABASE: Page 1:6914608 could not be moved because it is an off-row persistent version store page. Page holdup reason: Unknown. Page holdup timestamp: -1.


    Let us TRY this |


    My Blog :: http://quest4gen.blogspot.com/

    Friday, May 15, 2020 11:01 AM

All replies

  • Hi Manish Sharma-ETL,

    Try code as:

    DBCC SHRINKDATABASE(dbname,0)

    Best Regards.

    yuxi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, June 1, 2020 5:05 AM
  • Hi Manish Sharma-ETL,

    Do you solve th eissue?

    Is the reply helpful?

    Best Regards.

    m


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, June 11, 2020 1:37 AM
  • Hi Manish,

    Kindly share output of following query.

    use dbname

    go

    select growth, name,filename, size*8.0*1024/(1024*1024) as TotalMB, fileproperty(name,'SpaceUsed')*8.0*1024/(1024*1024) as UsedMB, size*8.0*1024/(1024*1024) - fileproperty(name,'SpaceUsed')*8.0*1024/(1024*1024) as FreeMB from sysfiles where (status & 0x2) <> 0 --and filename like ' %'

    where is free space available in mdf or ldf.

    Make sure that there should not active transaction  or shrink db in no business hour.


    https://social.technet.microsoft.com/wiki/contents/articles/37872.sql-server-installation-on-centos-linux.aspx

    Sunday, June 14, 2020 1:39 PM