SSIS保留未使用的和不相关的OLE DB信息



SSIS为什么保留未使用的和不相关的OLE DB项?

在这个包中,AccessMode 4表示它使用OpenRowsetVariable。但是,OpenRowset和SqlCommand可能具有引用包中未使用的表的值。为了简洁起见,我省略了几行。即使User::StgTable可能指定CUSTOMER。OpenRowset可以引用INVENTORY,SqlCommand可以引用DIVISION表。

提出这个问题的情况是,当在.dtsx包中搜索"库存"时,会找到这个包,但它实际上并不是指库存。

删除.dtsx文件中这些未使用项目的文本安全吗?

<component
description="OLE DB Destination"
<properties>
<property
dataType="System.Int32"
description="The number of seconds before a command times out.  A value of 0 indicates an infinite time-out."
name="CommandTimeout">0</property>
<property
dataType="System.String"
description="Specifies the name of the database object used to open a rowset."
name="OpenRowset"></property>
<property
dataType="System.String"
description="Specifies the variable that contains the name of the database object used to open a rowset."
name="**OpenRowsetVariable**">**User::TableNameStg**</property>
<property
dataType="System.String"
description="The SQL command to be executed."
name="SqlCommand"
UITypeEditor="Microsoft.DataTransformationServices.Controls.ModalMultilineStringEditor, Microsoft.DataTransformationServices.Controls, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"></property>
<property
dataType="System.Int32"
description="Specifies the mode used to access the database."
name="AccessMode"
typeConverter="**AccessMode**">**4**</property>

答案很简单-dtsx文件用于SSIS引擎并使用Visual Studio进行编辑,而不是直接编辑
在执行启动时,SSIS引擎将dtsx文件加载到引擎中的配置中,并根据提供的数据连接对其进行验证。一些参数可能未使用,其缺失不会影响加载和验证过程;但是,Microsoft没有对此进行记录和支持。你必须自己测试
根据我的经验,dtsx XML的一些标记和部分可以在不影响包功能的情况下删除。对于所有任务的DTSID属性和图表布局都是如此。但是,在打开的下一个文件中,Visual Studio会重新添加这些属性。

最新更新