SQL Server – So you like to shrink do you?

If you do – shame on you and shame on me because I do.

Moving on, I found strange behaviour within SQL Server Management Studio (SSMS) version 13.0.15900.1  Look at the following screen shot; do you know what the issue is here?


Are you curious? Please read on.

First thing you probably picked up on is the strange naming convention for one of those databases, more specifically Sheep{DB}, I mean come on, who puts curly brackets into a database name? Well I do. It is this that causes the “input String was not in a correct format” error message when you try to shrink the file via SSMS.

As you can see I navigate to the option as below.


There is the error.


Strange that the Shrink > Database option works though. Remove those curly brackets and the shrinking of files via SSMS will work.

USE master
Modify Name = [SheepDB] ;

Output: The database name ‘SheepDB’ has been set.


Navigate back to the shrink file operation – it will work now.


Some discussion points here, why am I using curly brackets? Why am I shrinking? Let’s just say I am sure that my friends won’t be impressed.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s