• DBCC INPUTBUFFER(spid)

    This only gets the first 255 characters of the command.

    SP3 introduced the fn_get_sql function (see the updated SP3 BOL for details), which returns the information in a text column.