VInayK
VInayK

Reputation: 1559

Execute SQL task with T-SQL query and with stored procedure in SSIS

In SSIS Execute SQL Task currently I am calling a stored procedure and inside the procedure I have a MERGE statement.

Is there any difference if I call that query (T-SQL MERGE) directly in the Execute SQL Task? (are there any differences like Log will create if we used SP?)

Please reply me...

Thanks in advance

Upvotes: 0

Views: 479

Answers (1)

Daryl Wenman-Bateson
Daryl Wenman-Bateson

Reputation: 3964

Stored procedure will provide you with a more maintainable solution as you will be able to leverage code reuse and there will be no need to change / re-release the package if your query logic changes

A stored procedure is also likely to provide you with the fastest execution time as it will be compiled and the execution plan will be reused on subsequent runs

Upvotes: 1

Related Questions