Professional Web Applications Themes

sp_help_job?? store result data?? - Microsoft SQL / MS SQL Server

Hi, Is there a way to check if a scheduled job is running using TSQL? I read lot of messages, But I cant find out perfect Answer! Can I Use sp_help_job?? how can I store the result Set returning from sp?? Please Help..... Regards Dishan...

Sponsored Links
  1. #1

    Default sp_help_job?? store result data??

    Hi,

    Is there a way to check if a scheduled job is running using TSQL? I read lot
    of messages, But I cant find out perfect Answer! Can I Use sp_help_job?? how
    can I store the result Set returning from sp??

    Please Help.....

    Regards
    Dishan


    Sponsored Links
    Dishan Guest

  2. #2

    Default Re: sp_help_job?? store result data??

    sp_help_job is one of the most useful sp's when it comes to the status of
    your jobs. You can create a temp table with a column equivalent for each of
    the columns returned by sp_help_job and do this:

    CREATE TABLE #Temp (....)

    INSERT INTO #Temp EXEC sp_help_Job


    --

    Andrew J. Kelly
    SQL Server MVP


    "Dishan" <com> wrote in message
    news:phx.gbl... 
    lot 
    how 


    Andrew Guest

  3. #3

    Default Re: sp_help_job?? store result data??

    This does not work

    create table #sphelpjob
    (
    job_id uniqueidentifier null,
    originating_server nvarchar(128) null,
    name nvarchar(128) null,
    enabled int null,
    description nvarchar(128) null,
    start_step_id int null,
    category nvarchar(128) null,
    owner nvarchar(128) null,
    notify_level_eventlog int null,
    notify_level_email int null,
    notify_level_netsend int null,
    notify_level_page int null,
    notify_email_operator nvarchar(128) null,
    notify_netsend_operator nvarchar(128) null,
    notify_page_operator nvarchar(128) null,
    delete_level int null,
    date_created datetime null,
    date_modified datetime null,
    version_number int null,
    last_run_date int null,
    last_run_time int null,
    last_run_outcome int null,
    next_run_date int null,
    next_run_time int null,
    next_run_schedule_id int null,
    current_execution_status int null,
    current_execution_step nvarchar(128) null,
    current_retry_attempt int null,
    has_step int null,
    has_schedule int null,
    has_target int null,
    type int null
    )

    insert into #sphelpjob exec msdb.dbo.sp_help_job

    Server: Msg 8164, Level 16, State 1, Procedure sp_get_composite_job_info,
    Line 67
    An INSERT EXEC statement cannot be nested.

    Net

    Please reply only to the newsgroups.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use.
    Copyright SQLDev.Net 1991-2003 All rights reserved.

    "Andrew J. Kelly" <com> wrote in message
    news:%phx.gbl... 
    of 
    > lot 
    > how 
    >
    >[/ref]


    Gert Guest

  4. #4

    Default Re: sp_help_job?? store result data??

    this works
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=%23nGfuVM9CHA.2104%4
    0TK2MSFTNGP11.phx.gbl&rnum=2

    regards
    dishan


    Dishan Guest

Similar Threads

  1. Question about get web service result in actionscriptand convert data format
    By TigerLittle in forum Macromedia Flex General Discussion
    Replies: 8
    Last Post: June 14th, 08:37 PM
  2. data binding : how to tell a XML connector to returna specific result ?
    By DaOrangeMan in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: October 18th, 06:31 PM
  3. Total result from datagrid data
    By Vishal in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: December 16th, 08:24 PM
  4. Replies: 1
    Last Post: October 3rd, 08:16 PM
  5. [PHP] How to store result in array for later display?
    By P Cuce in forum PHP Development
    Replies: 0
    Last Post: September 3rd, 01:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139