Database Reference
In-Depth Information
SSDT, return to the Parent.dtsx package's OnError event handler that we con-
figured earlier. Add an Execute SQL task and rename it Log Error . Open the editor
and configure the ConnectionType and Connection properties to connect to the
SSISConfig database via ADO.Net. Set the SQLStatement property to
log.LogError and the IsQueryStoredProcedure property to True . Navigate to the
Parameter Mapping page and add the following parameters:
• Variable Name: User::AppInstanceID
• Direction: Input
• Data Type: Int32
• Parameter Name: AppInstanceID
• Variable Name: User::PkgInstanceID
• Direction: Input
• Data Type: Int32
• Parameter Name: PkgInstanceID
• Variable Name: System::SourceName
• Direction: Input
• Data Type: String
• Parameter Name: SourceName
• Variable Name: System::ErrorDescription
• Direction: Input
• Data Type: String
• Parameter Name: ErrorDescription
We created the AppInstanceID and PkgInstanceID SSIS variables earlier
in this appendix. You are now using the two variables from the System
namespace— SourceName and ErrorDescription —which are two of the fields
populated when an error event is first raised by the originating task.
Once these parameters are mapped, close the Execute SQL Task Editor and connect
a precedence constraint from the Log Error Execute SQL task to the Log Application
Failure Execute SQL task, as shown in Figure A-16 .
 
Search WWH ::




Custom Search