• SET FMTONLY generates metadata using the structure of the query - metadata can be derived from the types of constants, columns, or expressions.

    In the case of stored procedures, which aren't typed, SET FMTONLY needs to execute the SP in order to determine the metadata. This may also be true for inline table-valued functions - but I'm not sure.

    If you need more information, check out SQL Server books online at http://msdn.microsoft.com/en-us/library/ms173839.aspx or post a question in the general T-SQL forums.