Alex Gay (1/22/2010)
Quick bug fix.The line "EXEC ('USE '+@DB_NAME+';"
Should be "EXEC ('USE ['+@DB_NAME+'];"
otherwise it fails if you have a database name with spaces in.
Not that any of us would do this, but third parties who don't know any better do/did.
Otherwise a very useful script.
S i agreed.I missed that one.Thanks
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/