• Excellent script. However, I don't understand the reason for the test in:

    IF CAST(LEFT(CAST(SERVERPROPERTY('ProductVersion') AS VARCHAR),1) AS INT)>8

    I understand that the ComputerNamePhysicalNetBIOS property did not exist prior tp SQL 2000 but your test would return a 1 for SQL 2008.

    I assumed your code was for SQL 2005 or higher since you query sys.databases and use sp_send_dbmail.

    Thanks again for a very usefull script.

    Lee