SSIS Package not wanting to fetch metadata of temporary table

后端 未结 6 2117
小鲜肉
小鲜肉 2020-11-29 03:39

I have an SSIS Package, which contains multiple flows.

Each flow is responsible for creating a \"staging\" table, which gets filled up after creation. These tables a

6条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 04:01

    I had faced a similar issue when SSSI packages were migrated from 2008 to 2016. The latest version uses sp_describe_first_result_set to fetch metadata and it does not work with temporary tables. As a workaround, I used the below query in the OLEDB source editor. I did not change the SQL stored procedure, and it still uses a temporary table. Do be sure to use the Parse Query and Preview option to ensure it works fine. See the image below.

    Query:

    EXEC [dbo].[spGetNames]
    WITH RESULT SETS((
            FirstName varchar(50), 
            LastName varchar(50)
    ));
    

    See Image

提交回复
热议问题