2

I am using Visual Studio 2017 and SQL Server 2016. I have a SSIS package and in that package I have a SQL Script Task that calls a simple script in which there is a error. I don't know why when there is a error , the flow does not go throw Failure path.

This is part of my package where I have Failure path.

enter image description here

This is my sql code :

SELECT CONVERT(BIGINT, N'aa1') AS Status

This is my error :

    [Execute SQL Task] Error: 
            Executing the query "SELECT CONVERT(BIGINT, N'aa1') AS Status
            ..." failed with the following error: 
            "Error converting data type nvarchar to bigint.". 
            Possible failure reasons: Problems with the query, 
            "ResultSet" property not set correctly, 
             parameters not set correctly,
             or connection not established correctly.

Why my task failed dispute my failure path?

enter image description here

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Ardalan Shahgholi
  • 11,967
  • 21
  • 108
  • 144
  • With the query you provide, I created a simple package with 2 task, and the failure path is executed. Can you show us what is the task linked in the failure path ? – Kobi Jul 04 '18 at 15:02
  • @EzLo Dose not work. I have put "MAximumErrorCount" to 10000 but still `Execute sql task` has error – Ardalan Shahgholi Jul 04 '18 at 15:14
  • 1
    It is normal that the task has an error because the query throw an error. The failure path is just a path to go when the task is in error it doesnt prevent error to append. Look again at my updated answer to the schema of error/success tasks. – Kobi Jul 04 '18 at 15:15
  • @Kobi Thanks. It worked for me – Ardalan Shahgholi Jul 04 '18 at 15:27

1 Answers1

3

According to the link you made between task, plain line signify AND. So the move_file_to_fatal_error cannot be executed since it is waiting both success and error path to realize.

You should edit the two link between task and FST_Move and select Logical OR

enter image description here

Kobi
  • 2,494
  • 15
  • 30