DBCC SHRINKFILE Error

I am trying to compress a database in a test system, but the file will not become smaller. The mdf file is 47 GB and the unused space is 38 GB. A large amount of data was deleted from the database, therefore a large amount of unused space.

The following error will appear: Run dbcc shrinkfile (Olympus_dat, 46912) on 2015-07-23 15: 27: 19.300 DBCC SHRINKFILE: Page 1: 6017543 cannot be moved because it is not formatted.

How can I fix this error?

SQL Server 2012 x64

Additional Information. The following queries return an error:

DBCC TRACEON(3604)
GO

DBCC page('Olympus', 1, 6017543, 1)
Go

DBCC TRACEOFF(3604)
GO

DBCC executed. If DBCC printed error messages, contact your system administrator.

PAGE: (14440: 908631589)

BUFFER:

BUF @ 0x0000000009682040

bpage = 0x00000002B46B8000 bhash = 0x0000000000000000 bpageno = (1: 6017543) bdbid = 6 breferences = 1 bcputicks = 0 bsampleCount = 0 bUse1 = 23548 bstat = 0x809 blog = 0x5adb215a bnext = 0x0000000000000000

PAGE HEADER:

@0x00000002B46B8000

m_pageId = (14440: 908631589) m_headerVersion = 252 m_type = 226 m_typeFlagBits = 0xf9 m_level = 216 m_flagBits = 0xd676 m_objId (AllocUnitId.idObj) = -1238914908 m_indexId (AllocUnitId.idInd) = 23941 : AllocUnitId = 6738992698879115264 : PartitionId = 0 : IndexId = -1 : ObjectId = 0 m_prevPage = (35510: 854211095) m_nextPage = (61606: 1041616947) pminlen = 43990 m_slotCnt = 27900 m_freeCnt = 40464 m_freeData = 34288 m_reservedCnt = 12643 m_lsn = (-257029635: 1920476993: 30788) m_xactReserved = 11969 m_xdesId = (25449: 1820050307) m_ghostRecCnt = 61532 m_tornBits = -213551362 DB Frag ID = 1

GAM (1: 5623552) = (1: 5623553) =
PFS (1: 6017472) = 0x40 0_PCT_FULL DIFF (1: 5623558) = ML (1: 5623559) = NOT MIN_LOGGED

CompressionInfo @0x00000000309682B0

CompressionInfo

( ) = 0 PageModCount = 50289 CI =

DATA:

Slot 0, Offset 0x4ad2, Length 1, DumpStyle BYTE

= () EMPTY_GHOST_RECORD = 1

CD

000000003096EAD2: 05.
Msg 0, 11, 0, 0 . , , .

+4

Source: https://habr.com/ru/post/1599320/


All Articles