Ssis124enjavhdtoday200821020007 Min: Free Work
Drag and drop a Data Flow Task from the SSIS Toolbox to the Control Flow design surface.
public class ScriptMain
| Step | Action | |------|--------| | | Enable SSIS logging (Provider = SSIS log provider for SQL Server ) on the package. | | 2 | Add an OnPreExecute event handler that writes the current free memory (counter Memory\Available Mbytes ) and free disk ( LogicalDisk\Free Megabytes for the temp drive) to a custom table dbo.SSIS_RunMetrics . | | 3 | Add an OnPostExecute event handler that repeats the snapshot. | | 4 | In the Data Flow (or a Script Task that runs periodically), query the same counters and store the minimum value seen in a package variable ( User::MinFreeMemoryMB , User::MinFreeDiskMB ). | | 5 | At package completion, write those minima to the same dbo.SSIS_RunMetrics table. | ssis124enjavhdtoday200821020007 min free
CREATE TABLE dbo.SSIS_RunMetrics ( RunID BIGINT IDENTITY(1,1) PRIMARY KEY, PackageName NVARCHAR(200), RunStartTime DATETIME2(3), RunEndTime DATETIME2(3), MinFreeMemoryMB INT, MinFreeDiskMB INT, ServerName NVARCHAR(128), RunStatus NVARCHAR(20) -- Success / Failure / Canceled ); Drag and drop a Data Flow Task from