I am running the following query in SSMS:
SET NOCOUNT ON ALTER DATABASE [xyz] MODIFY NAME = [xyz_]
And get this:
The database name 'xyz_' has been set. Msg 911, Level 16, State 1, Line 2 Database 'xyz' does not exist. Make sure that the name is entered correctly.
So, the query fails, but the database is still renamed!
What is going on?