SSIS Package not wanting to fetch metadata of temporary table

后端 未结 6 2114
小鲜肉
小鲜肉 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 03:53

    Had the same issue as we use temp table for staging. After spending some time, found a work around.

    In the OLE DB/ADO Destination of Data flow task where you specify the name of the staging table .

    Change the AccessMode property to SQL command instead of OpenRowSet and specify SQL Command property to "select * from #temp".

    Hurray, Its working as expected.

    Catch here is when you specify Access mode other than SQL Command, SSIS expects that to be a table / view and it changed the SSIS to call sp_describe_first_result_set to get the meta data. but when you specify SQL Command, it's expecting a query or SP command etc. so luckily it still uses the old way of getting the meta data .

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cfe1c7c1-910a-4f52-9718-c3406263b177/usage-of-temp-tables-in-ssis-2012?forum=sqlintegrationservices#cfe1c7c1-910a-4f52-9718-c3406263b177

提交回复
热议问题