AgentSkillsCN

ssis-best-practices

优化 SSIS(SQL Server 集成服务)与 ETL 包,包括数据流缓冲区调优、Lookup Transform 缓存策略(全缓存 vs 部分缓存 vs 无缓存)、OLE DB 目标快速加载配置、增量加载模式(水印、CDC)、通过事件处理器进行错误处理,以及包日志记录标准。

SKILL.md
--- frontmatter
name: ssis-best-practices
description: Optimize SSIS (SQL Server Integration Services) and ETL packages including Data Flow buffer tuning, Lookup Transform cache strategies (Full Cache vs Partial vs No Cache), OLE DB Destination Fast Load configuration, incremental load patterns (watermark, CDC), error handling with event handlers, and package logging standards.

SSIS / ETL Best Practices

This skill helps optimize SSIS packages and ETL processes for SQL Server environments.

When to Use

  • Reviewing SSIS package designs for performance
  • Optimizing Data Flow throughput
  • Choosing Lookup Transform cache modes
  • Implementing incremental load strategies
  • Setting up error handling and logging
  • Converting row-by-row ETL to set-based operations

Key Decision Points

Lookup Cache Strategy

ModeWhen to UsePerformance
Full CacheReference table fits in memory (< 25%)Best — preloaded at start
Partial CacheRepeated lookups, large reference tableGood — LRU cache
No CacheAvoid when possibleWorst — DB query per row

Load Strategy

PatternWhen to Use
WatermarkSource has reliable modified_date column
CDCSQL Server Change Data Capture enabled
Hash comparisonNo reliable timestamp, need change detection
Full reloadSmall tables, or when incremental is impractical

Destination Configuration

SettingRecommended Value
Table LockON
Check ConstraintsOFF (validate before load)
Rows per Batch10,000–100,000
Max Insert Commit Size0 (all at once) or batch size

Reference Material

Detailed configuration, anti-patterns, and logging standards: