• Need some help...

    The following gives an error.

    SELECT '--Shows avail free DB space ' as ' '

    exec sp_MSForEachDB 'Use ? SELECT name AS ''Name of File'', size/128.0 -CAST(FILEPROPERTY(name, ''SpaceUsed'' )

    AS int)/128.0 AS ''Available Space In MB'' FROM .SYSFILES'

    I also got this when I tried to execute - EXEC sp_msForEachDB 'PRINT ''?'''

    Could not find stored procedure 'sp_msForEachDB'.

    We are on SQL Server Enterprise 2005

    Any ideas ?

    Regards

    Gagan