源机器表 a (有主键id)
目机器的表 a (有主键id)     2个a字段所有信息都一样的。
现在要求必须用2008 ssis工具来实现2个表数据的定时迁移 (每天0点执行一次)      
如果没有主键是很简单的。 现在【数据流】目的表里的 主键总是提示column id only read没有办法编译通过 
这个问题本质如下
2008 ssis工具 如何在这个工具里实现先 SET IDENTITY_INSERT aa ON
把数据导完后(这个使用数据流 )
再 启用 SET IDENTITY_INSERT aa OFFSET IDENTITY_INSERT aa ONSET IDENTITY_INSERT aa OFF 这2个如何用ssis的什么项目来实现 (我用了‘Execute SQL task’死活通不过)。 关键这3步必须放到一个session里 。 不知道如何用ssis来实现   (有人说可以用 script component 来实现。  但不知道这个东西如何具体使用   当前环境是xp sql2008  是否还安装其他的 什么东西词啊能运行script component)

解决方案 »

  1.   

    ssis    含有 image字段的如何导出2个 都是 08的库。 不在同一机器上。 现在不知道什么原因说 system was low on virtual memory ,but was unable to swap out any buffer. 我用拆分工具导1条记录 也发现错误 [OLE DB Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "在 TDS 流中的协仪错误".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "通讯链接失败".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "TCP 提供程序: An existing connection was forcibly closed by the remote host.
    ".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "通讯链接失败".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "TCP 提供程序: An existing connection was forcibly closed by the remote host.
    ".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "通讯链接失败".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "TCP 提供程序: The specified network name is no longer available.
    ".
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "OLE DB Source" (1) returned error code 0xC0202009.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    [OLE DB Destination [16]] Information: The final commit for the data insertion in "component "OLE DB Destination" (16)" has started.
    [OLE DB Destination [16]] Information: The final commit for the data insertion  in "component "OLE DB Destination" (16)" has ended.
    Warning: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.该表有300多m  感觉也不大 啦 
      

  2.   

    image 字段 select * from a 那个字段内容如下
    89504E470D0A1A0A0000000D494844520000001800000018080我的环境 
    sqlserver2008(a机器)---》   sqlserver2008(b机器)
    使用ssis 用了 data conversion转换组件      转为unicode test stream但还是失败
      

  3.   

    将 olddb  那个参数设置为 true观察源头数据  ,看是否是高并发 环境锁表  或者镜像环境下的  还原状态 必须分析问题 。有好的 编程解决问题思路差不多