SSAS Trace using SQL Server Agent

  • I have seen how SQL Server Agent can be used to set up, start, and stop a SQL Server Profiler Trace by schedule, but I have only seen this demonstrated/documented for traces towards the Database Engine. How is this done towards SSAS?

  • rcf64 - Thursday, November 1, 2018 6:07 AM

    I have seen how SQL Server Agent can be used to set up, start, and stop a SQL Server Profiler Trace by schedule, but I have only seen this demonstrated/documented for traces towards the Database Engine. How is this done towards SSAS?

    It's fairly similar - your using xmla and a different job step type. Those are pretty much the differences that I found.

    If you are going to create the trace first in Profiler, you select Analysis Services for server type and still do the same to export the SQL for the trace...File, Export, Trace Definition.
    After you create the xmla file, you can copy it into a job step and for the type on the job step, select SQL Server Analysis Services Command, paste in the xmla. Then schedule it
    In terms of stopping, I had that as a different job. It's another xmla command used to delete the trace.
    <Delete xmlns="http://schemas.microsoft.com/analysisservices/2003/engine" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

    <Object>

    <TraceID>YourTraceName</TraceID>

    </Object>

    </Delete>

    You can find a better explanation and examples in the following MS blog post
    Managing Server Side Analysis Services Profiler Trace

    Sue

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

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