4

In Microsoft SQL Server I can go into Database Properties > Files and change the Size of a file to a lower number. If there's space available, it will actually reduce the file's size, and never tells me it's running a shrink command or anything like that.

Image of Database Properties > Files tab

What is happening there? Am I successfully lopping off unused space without reorganizing any pages, as the interface seems to suggest? Is it running a DBCC SHRINKFILE in the background, possibly in TRUNCATEONLY mode?

0

1 Answer 1

16

If instead of clicking OK you use the Script option, you'll see it's issuing a DBCC SHRINKFILE. I got this on my Lab:

USE [Lab]
GO
DBCC SHRINKFILE (N'Lab' , 130)
GO
USE [master]
GO

GO

SSMS | Database Properties | Files

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.