• The script actually returns the amount of time since the database was created. Since the tempdb is created every time SQL Server is started, this gives you the up-time for SQL Server.

    You can run this to get list of all database names, total minutes, total days, hours within days and minutes within hours since each database has been created.

    SELECT @@servername,

    name, DATEDIFF (mi,crdate,GETDATE()) as 'Total Minutes',

    DATEDIFF (day,crdate,GETDATE()) as 'Total Days',

    (DATEDIFF (mi,crdate,GETDATE()) - (DATEDIFF (day,crdate,GETDATE()) * 1440)) / 60 as 'Hours within day',

    DATEDIFF (mi,crdate,GETDATE()) - (DATEDIFF (day,crdate,GETDATE()) * 1440) -

    (((DATEDIFF (mi,crdate,GETDATE()) - (DATEDIFF (day,crdate,GETDATE()) * 1440)) / 60) * 60) as 'Minutes with hour'

    FROM sysdatabases

    ORDER BY name

    As for looping through all your servers here are couple of options:

    1) Create linked servers and run the query against each of them.

    2) Create SSIS package that loops through a list of servers and runs the script

    For either of these, you can load the data into a local working table then run a final query to pull that data out of the working table. You probably would want to include @@servername in the query so your results will include the server name.

    Hope this helps

    David