?? on Job Steps and how they work

  • Hi,

    I'm trying to setup a job w 2 steps

    step1 run and emails a report via SSRS, I just created a subscription in the front end copied the step out of the job it created.

    The report sets a flag on a field with an 'x' to know which records to report on

    step2 is where I get lost...

    step2 updates the reported records with a 'y'

    problem is when the report is emailed the report is blank, I assume the report doesn't get emailed until step 2 is completed?

    If so, is there away around it? maybe 2 jobs, job2 being dependent on job1 being sucessful?

    here are my steps...

    STEP1 exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='89882d84-9810-4cdf-9e13-d74035f3ddcd'

    STEP2 exec dbo.xmL_test_UPDATE

    Thanks

    Joe

  • if emailing the report is part of Step #1 then the report gets email during Step #1 execution.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • It would happen within the step that the email execution occurs. It doesn't wait until the end of the job before it will email out the report.

    --------
    For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
    You can also follow my twitter account to get daily updates: @BLantz2455

  • Thanks for the replies...

    It's odd The report is blank when I run w step2(The update of the flag)

    I'll look closer to see if I'm missing something.....

  • Is the report dynamic (requires access to the SQL Server database when viewed) or static (the data for the report is contained in the report when it is sent to the user)?

  • Static its in XML format

Viewing 6 posts - 1 through 5 (of 5 total)

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