You can use noexec mode to capture abstract plans without actually executing the queries. If noexec mode is in effect, queries are optimized and abstract plans are saved, but no query results are returned.
To use noexec mode while capturing abstract plans, execute any needed procedures (such as sp_add_qpgroup) and other set options (such as set plan dump) before enabling noexec mode. The following example shows a typical set of steps:
sp_add_qpgroup pubs_dev go set plan dump pubs_dev on go set noexec on go select type, sum(price) from titles group by type go