Showing posts with label profiler. Show all posts
Showing posts with label profiler. Show all posts

Thursday, March 29, 2012

Automating SQL Profiler

The powers at be have decided that they would like to automatically run

a trace on one of our analysis servers when it processes a cube in the

early hours of the morning. Now I have no problem creating a SQL

Profile to run and store the results in a database table for them, but

I have no idea how to automate it so that it runs everyday, any help

would be greatly appreciated. My apologises for posting this in forums

let's search in the internet with your subject.

you will find a lot of articles. this is one of them.
http://www.lazydba.com/sql/1__18318.html

Automating SQL Profiler

The powers at be have decided that they would like to automatically run

a trace on one of our analysis servers when it processes a cube in the

early hours of the morning. Now I have no problem creating a SQL

Profile to run and store the results in a database table for them, but

I have no idea how to automate it so that it runs everyday, any help

would be greatly appreciated. My apologises for posting this in forums

Option B - Not sure what information you want to capture from trace but if you are processing your cube using SSIS package you can capture log in database table at package level and cube level both. In cube level log there are many options you can select like sql, start, end time and lot more. This way when your SSIS package will run your database table will also get populated.

-Ashok

|||

SP2 is going to come out with little sample application ASTrace. This tiny sample installs as a service and knows how to subsribe to Analysis Services trace and output this trace into SQL Server table.

Drop me a line if you are in urgent need to solve this problem and cant wait for SP2 (which is pretty close).

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

automating profiler

I have created a stored proc that will automate the capture of traces. The trace is captured to a file instead of a table because tracing to a table on the same server has caused performance issues.
The problem is that I really want the trace in a table so that we can produce reports with Reporting Services. I know that I can manually save the trace to a trace table. But is there a way to automate this process? I can't find any command line parameter
s for Profiler.
Sure, take a look at fn_trace_gettable in BOL. By the way you almost never
want to trace directly to a table if you care about performance.
Andrew J. Kelly SQL MVP
"Jo" <Jo@.discussions.microsoft.com> wrote in message
news:75FFDF10-B0AA-4AD4-8573-0A241F630717@.microsoft.com...
> I have created a stored proc that will automate the capture of traces. The
trace is captured to a file instead of a table because tracing to a table on
the same server has caused performance issues.
> The problem is that I really want the trace in a table so that we can
produce reports with Reporting Services. I know that I can manually save the
trace to a trace table. But is there a way to automate this process? I can't
find any command line parameters for Profiler.
>
>
|||Is there a SQL 7.0 soluthion?
"Andrew J. Kelly" wrote:

> Sure, take a look at fn_trace_gettable in BOL. By the way you almost never
> want to trace directly to a table if you care about performance.
> --
> Andrew J. Kelly SQL MVP
>
> "Jo" <Jo@.discussions.microsoft.com> wrote in message
> news:75FFDF10-B0AA-4AD4-8573-0A241F630717@.microsoft.com...
> trace is captured to a file instead of a table because tracing to a table on
> the same server has caused performance issues.
> produce reports with Reporting Services. I know that I can manually save the
> trace to a trace table. But is there a way to automate this process? I can't
> find any command line parameters for Profiler.
>
>
|||Not that I am aware of.
Andrew J. Kelly SQL MVP
"Jo" <Jo@.discussions.microsoft.com> wrote in message
news:DC0B3779-1875-40D4-848B-31473782A038@.microsoft.com...[vbcol=seagreen]
> Is there a SQL 7.0 soluthion?
> "Andrew J. Kelly" wrote:
never[vbcol=seagreen]
The[vbcol=seagreen]
table on[vbcol=seagreen]
the[vbcol=seagreen]
can't[vbcol=seagreen]
|||Do you know anything about the xp_trace_opentracefile stored proc in 7.0? Is it possible that this will do the same thing as fn_trace_gettable in 2000?
"Andrew J. Kelly" wrote:

> Not that I am aware of.
> --
> Andrew J. Kelly SQL MVP
>
> "Jo" <Jo@.discussions.microsoft.com> wrote in message
> news:DC0B3779-1875-40D4-848B-31473782A038@.microsoft.com...
> never
> The
> table on
> the
> can't
>
>
|||Do you know anything about the extended stored proc called xp_trace_opentracefile?
Will this do the same thing as fn_trace_gettable?
"Andrew J. Kelly" wrote:

> Not that I am aware of.
> --
> Andrew J. Kelly SQL MVP
>
> "Jo" <Jo@.discussions.microsoft.com> wrote in message
> news:DC0B3779-1875-40D4-848B-31473782A038@.microsoft.com...
> never
> The
> table on
> the
> can't
>
>
|||I am not familiar with the xp and don't have 7.0 anymore.
Andrew J. Kelly SQL MVP
"Jo" <Jo@.discussions.microsoft.com> wrote in message
news:5302ACCD-993C-4CD6-914A-0B2FEC8B8203@.microsoft.com...
> Do you know anything about the extended stored proc called
xp_trace_opentracefile?[vbcol=seagreen]
> Will this do the same thing as fn_trace_gettable?
> "Andrew J. Kelly" wrote:
almost[vbcol=seagreen]
traces.[vbcol=seagreen]
can[vbcol=seagreen]
save[vbcol=seagreen]
I[vbcol=seagreen]
|||The SQL Server 7.0 resource kit has a COM+ object that will allow you to
read a SQL Server 7.0 formatted trace. I don't have sample code handy but it
wasn't hard to figure out how to import the trace using some simple VB
code...
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Jo" <Jo@.discussions.microsoft.com> wrote in message
news:DC0B3779-1875-40D4-848B-31473782A038@.microsoft.com...[vbcol=seagreen]
> Is there a SQL 7.0 soluthion?
> "Andrew J. Kelly" wrote:
never[vbcol=seagreen]
The[vbcol=seagreen]
table on[vbcol=seagreen]
the[vbcol=seagreen]
can't[vbcol=seagreen]
|||Thank you, I'll give it a try.
"Brian Moran" wrote:

> The SQL Server 7.0 resource kit has a COM+ object that will allow you to
> read a SQL Server 7.0 formatted trace. I don't have sample code handy but it
> wasn't hard to figure out how to import the trace using some simple VB
> code...
> --
> Brian Moran
> Principal Mentor
> Solid Quality Learning
> SQL Server MVP
> http://www.solidqualitylearning.com
>
> "Jo" <Jo@.discussions.microsoft.com> wrote in message
> news:DC0B3779-1875-40D4-848B-31473782A038@.microsoft.com...
> never
> The
> table on
> the
> can't
>
>
|||I can't find the resource kit on the original 7.0 disks. The only sql server resource kit that I find under the MSDN subscriber downloads is for sql server 2000. Is there another place that I need to look?
"Brian Moran" wrote:

> The SQL Server 7.0 resource kit has a COM+ object that will allow you to
> read a SQL Server 7.0 formatted trace. I don't have sample code handy but it
> wasn't hard to figure out how to import the trace using some simple VB
> code...
> --
> Brian Moran
> Principal Mentor
> Solid Quality Learning
> SQL Server MVP
> http://www.solidqualitylearning.com
>
> "Jo" <Jo@.discussions.microsoft.com> wrote in message
> news:DC0B3779-1875-40D4-848B-31473782A038@.microsoft.com...
> never
> The
> table on
> the
> can't
>
>