I have made the following script for SQL Server 2012 and would appreciate any suggestion for its performance enhancement.
DECLARE @dbname varchar(50) DECLARE