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 GO ALTER DATABASE [Sheep{DB}] Modify Name = [SheepDB] ; GO
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.
Filed under: Admin, SQL SERVER Tagged: Admin, GUI, Shrink, SQL server, SSMS