The feature can be very annoying and luckily it can be disabled.
To disable the feature, in the visual studio menu, select Tools -> Options -> Environment -> Tabs
EXEC sp_msforeachdb "IF '?' NOT IN ('master','tempdb', 'model', 'msdb') BEGIN PRINT '?' END"
EXEC sp_MSforeachdb 'USE ?; EXEC sp_spaceused'
sp_MSforeachdb 'DBCC CHECKDB(?)'
EXEC sp_msforeachdb 'IF ''?'' NOT IN (''master'',''tempdb'', ''model'', ''msdb'') BEGIN SELECT name,physical_name,state,size FROM [?].sys.database_files END'
DECLARE @DbSize TABLE ( mame NVARCHAR(50), physical_name NVARCHAR(500), size INT, growth INT, is_percent_growth BIT, type_desc NVARCHAR(10) ) INSERT INTO @DbSize EXEC sp_MSforeachdb 'IF ''?'' NOT IN (''master'', ''tempDB'',''model'',''msdb'') BEGIN SELECT name,physical_name,size, growth, is_percent_growth, type_desc FROM ?.sys.database_files END' SELECT * FROM @DbSizeCodeProject