How to output results from a "Execute T-SQL Statement Task" in a Maintenance Plan in SQL 2008

  • This may already have been answered somewhere in this Forum but haven't been able to locate anything yet.

    Is there is anyway to output the results from the T-SQL you put into a "Execute T-SQL Statement Task" in a Maintenance Plan in SQL 2008 to the Maintenance SubPlan Report that is generated upon execution of the Plan?

    To be specific I'm trying to output the results of DBCC SQL PERF(Logspace) to the same Report file. The Report file I'm referring to is the built-in one that that tracks the status, duration, start, end, etc. of the Task.

    Incidentally, I can't enable the ‘xp-cmdshell’ option to run OS commands. This is a very tight yet primitive environment.

    Thanks.. 🙂

  • Try putting the results into a table then reporting off the table.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply