Solution for dump the Activity Monitor Results

  • Dear All,

    I need a quick reply which helps me a lot to proceed my work.

    I need a solution that will dumps the Activity Monitor results to a database table.

    Please reply back if any there is any possibility to dump this records

    Thanks & Regards,

    Sri Sagar.P

  • Hi,

    As far as I know there is no inbuilt system for this. But you can do that if you can write your customized queries for getting the data into a table. I had traced for Job activity monitor using a profiler.

    create table #tmp_sp_help_category

    (category_id int null, category_type tinyint null, name nvarchar(128) null)

    insert into #tmp_sp_help_category exec msdb.dbo.sp_help_category

    SELECT

    sv.name AS [Name],

    CAST(sv.enabled AS bit) AS [IsEnabled],

    tshc.name AS [Category],

    null AS [CurrentRunStatus],

    null AS [CurrentRunStep],

    null AS [HasSchedule],

    null AS [HasStep],

    null AS [HasServer],

    null AS [LastRunDate],

    null AS [NextRunDate],

    null AS [LastRunOutcome],

    CAST(sv.job_id AS nvarchar(100)) AS [job_id]

    FROM

    msdb.dbo.sysjobs_view AS sv

    INNER JOIN #tmp_sp_help_category AS tshc ON sv.category_id = tshc.category_id

    drop table #tmp_sp_help_category

    Thanks

    Chandra Mohan N

    [font="Verdana"]Thanks
    Chandra Mohan[/font]

  • select * into your_table_name from master.sys.sysprocesses

    where spid > 50

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

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