Error with Flow Logic when creating a JOB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thiko

    Error with Flow Logic when creating a JOB

    I have a sql server automatic job set up containing 2 steps.

    First step is an Operating System Command (CmdExec) type job which
    runs a .bat file which copies across a backup file to this machine.

    The second step is a Transact -SQL Script (TSQL) type job which runs
    the RESTORE DATABASE REPLACE command which restores the backup file
    copied across in step 1.

    Step 1's advanced option says: On Success Action: Goto Step [2]
    Restore the database.

    Step 2's advanced option says: On Success Action: Quit the job
    reporting success.

    On clicking ok I receive the error message:

    "WARNING: The following job step(s) cannot be reached with current
    flow logic: [1] Transfer the Backup File. Are you sure this is what
    you want".

    The job fails to run.

    Both steps do run successfully when set up as two separate jobs - not
    like this which has the two steps in one job.

    Anyone have any ideas as to what the flow logic problem is?

    Thiko!
  • DHatheway

    #2
    Re: Error with Flow Logic when creating a JOB

    I would guess that you have somehow set Step 2 as the starting step in the
    package. Look at the "properties " for the job, check the "steps" tabbed
    dialog and verify that the "start step" in the dropdown list box in the
    lower middle of this dialog is set to your step 1 task. Reset it, if
    necessary.

    Otherwise, you could throw the job away and start over, being careful to put
    your step 1 in first and then your step 2 in second to help SQL server
    understand what you're trying to do.

    "Thiko" <biwombi@hotmai l.com> wrote in message
    news:b8d3b40c.0 309120657.1eeb5 35@posting.goog le.com...[color=blue]
    > I have a sql server automatic job set up containing 2 steps.
    >
    > First step is an Operating System Command (CmdExec) type job which
    > runs a .bat file which copies across a backup file to this machine.
    >
    > The second step is a Transact -SQL Script (TSQL) type job which runs
    > the RESTORE DATABASE REPLACE command which restores the backup file
    > copied across in step 1.
    >
    > Step 1's advanced option says: On Success Action: Goto Step [2]
    > Restore the database.
    >
    > Step 2's advanced option says: On Success Action: Quit the job
    > reporting success.
    >
    > On clicking ok I receive the error message:
    >
    > "WARNING: The following job step(s) cannot be reached with current
    > flow logic: [1] Transfer the Backup File. Are you sure this is what
    > you want".
    >
    > The job fails to run.
    >
    > Both steps do run successfully when set up as two separate jobs - not
    > like this which has the two steps in one job.
    >
    > Anyone have any ideas as to what the flow logic problem is?
    >
    > Thiko![/color]


    Comment

    • Thiko

      #3
      Re: Error with Flow Logic when creating a JOB

      Yes, you were right. Thank you very much :) It's all sorted now. I
      had the start steps the wrong way round.

      "DHatheway" <dlhatheway@mmm .com.nospam> wrote in message news:<bjsp89$re i$1@tuvok3.mmm. com>...[color=blue]
      > I would guess that you have somehow set Step 2 as the starting step in the
      > package. Look at the "properties " for the job, check the "steps" tabbed
      > dialog and verify that the "start step" in the dropdown list box in the
      > lower middle of this dialog is set to your step 1 task. Reset it, if
      > necessary.
      >
      > Otherwise, you could throw the job away and start over, being careful to put
      > your step 1 in first and then your step 2 in second to help SQL server
      > understand what you're trying to do.
      >
      > "Thiko" <biwombi@hotmai l.com> wrote in message
      > news:b8d3b40c.0 309120657.1eeb5 35@posting.goog le.com...[color=green]
      > > I have a sql server automatic job set up containing 2 steps.
      > >
      > > First step is an Operating System Command (CmdExec) type job which
      > > runs a .bat file which copies across a backup file to this machine.
      > >
      > > The second step is a Transact -SQL Script (TSQL) type job which runs
      > > the RESTORE DATABASE REPLACE command which restores the backup file
      > > copied across in step 1.
      > >
      > > Step 1's advanced option says: On Success Action: Goto Step [2]
      > > Restore the database.
      > >
      > > Step 2's advanced option says: On Success Action: Quit the job
      > > reporting success.
      > >
      > > On clicking ok I receive the error message:
      > >
      > > "WARNING: The following job step(s) cannot be reached with current
      > > flow logic: [1] Transfer the Backup File. Are you sure this is what
      > > you want".
      > >
      > > The job fails to run.
      > >
      > > Both steps do run successfully when set up as two separate jobs - not
      > > like this which has the two steps in one job.
      > >
      > > Anyone have any ideas as to what the flow logic problem is?
      > >
      > > Thiko![/color][/color]

      Comment

      Working...