• Sorry about the late reply, was swamped at work. 🙂

    One way to do it for each database is either the undocumented sp_msforeachdb feature or roll it into a loop. You can use cursors but I personally don't use them much. Here is a non-cursor version:

    declare @db_list table (dbname sysname)

    declare @dbname sysname, @query varchar(8000)

    insert @db_list(dbname)

    select name from sys.databases

    where name not in ('tempdb', 'master', 'msdb', 'model') -- feel free to change as needed

    order by name asc

    while (select count(*) from @db_list) > 0 -- one way to iterate, the list is small enough that this will have no impact

    begin

    select top 1 @dbname = dbname from @db_list

    select @query = 'use ' + quotename(@dbname) + '; INSERT THE NEW SP_SPACEUSED SCRIPT HERE'

    exec(@query)

    delete from @db_list where dbname = @dbname

    end

    Hope this helps and good luck.

    Gaby A.

    Toronto, ON

    Gaby________________________________________________________________"In theory, theory and practice are the same. In practice, they are not." - Albert Einstein