Julie
Julie

Reputation: 11

Issue loading-data-from-multiple-db-to-another-server-using-ssis

I am facing issue in loading-data-from-multiple-db-to-another-server-using-ssis I have referred the below link Loading data from multiple db to another server using SSIS

SSIS Package FLow :

SSIS Package Flow SSIS Package Flow SSIS Package Flow Unfortunately i am getting the error in "Execute SQL Task" as below:

[Execute SQL Task] Error: There is an invalid number of result bindings returned for the ResultSetType: "ResultSetType_Rowset".

Appreciate if you could help me with the solutions. Thanks

Upvotes: 1

Views: 219

Answers (2)

Prabhat G
Prabhat G

Reputation: 3029

Based on the comments, to solve your issue

1. Evaluate your SQL Statement. For instance : img1

2. Once your variable query is evaluating, move to Execute SQL Task. It should look like this:

img2

3. Next the resultSet should look like this (object_variable is of object type)

img3

Why are we not using anything in parameter mapping ?

Answer: If we had a SQL query like Select col1, col2 from table1 where col3 = ?, Then we would be replacing ? with either a parameter or a variable.

In your case, delete everything inside parameter mapping.

Updated : Also, since you're query is Select * into tbl2 from tbl1, ResultSet property should be None instead of any other thing.

Upvotes: 1

Wendy
Wendy

Reputation: 660

You have 2 Execute SQL Tasks

1, First Execute SQL Task, get list of tables and schema, it expects a Full Result set and map it to a object type variable.

2, Foreach loop container, ADO Enumerator, ADO source is the object type variable. Variable Mappings to 2 string type variables, 1 is for table name and 1 is for schema name.

  1. Second Execute SQL Task, it has no Full Result set, no parameter mapping. Because table name/schema name changes are taken care of by Foreach loop container.

Upvotes: 0

Related Questions