Search code examples
sql-serverssissql-server-2016execute-sql-task

SSIS component failure does not work


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


Solution

  • 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