• The background for the design decision to execute all commands through a CommandExecute stored procedure is that I would like to have a consistent error handling and logging. Information about all commands are logged with start time, command text, command output and end time. Here's an example of how a command is logged.

    DateTime: 2008-03-05 21:58:59

    Command: ALTER INDEX [IX_Address_StateProvinceID] ON [AdventureWorks].[Person].[Address] REORGANIZE

    Comment: IndexType: 2, LOB: 0, PageCount: 1001, Fragmentation: 7.40741

    DateTime: 2008-03-05 21:59:10

    Ola Hallengren

    http://ola.hallengren.com