搜索
首页数据库mysql教程如何自动从 SSIS .dtsx 文件检索版本号?

How Can I Automate Version Number Retrieval from SSIS .dtsx Files?

自动从 .Dtsx 文件检索版本号

从 SSIS 包检索包版本

如果您需要读取版本SSIS包内的信息,您可以访问SSIS系统之一变量:

Variable Type Description
VersionBuild Int32 The package version
VersionComment String Comments about the package version
VersionGUID String The unique identifier of the version
VersionMajor Int32 The major version of the package
VersionMinor Int32 The minor version of the package

查找包 SQL Server 版本

要确定存储在 .dtsx 文件中的包 SQL Server 版本:

  1. 以文本(或 XML)文档形式打开 .dtsx 文件。
  2. 搜索PackageFormatVersion 属性。

从 .Dtsx 文件中提取值

使用 SQL Server

请参阅以下内容用于从存储在 SQL 中的 .dtsx 文件中检索信息的 SQL 查询的资源服务器:

  • [bill Fellows 文章 - SSIS 包查询](https://billfellows.com/aa/sspackages/default.htm)
  • [Microsoft TechNet 文章 - 列出所有SSIS包存储在msdb中数据库](https://technet.microsoft.com/en-us/library/ms165744.aspx)

使用编程方法

使用正则表达式

以下代码使用Regex循环 .dtsx 文件,提取包属性,包括 PackageFormatVersion:

Private Sub ReadPackagesInfo(ByVal strDirectory As String)
Dim regexPattern As String = "(?)(.*)(?=)"
...
Dim strPackageFormatVersion = Regex.Match(strContent, regexPattern, RegexOptions.Singleline).Value
...

使用 XMLParser

Private Sub ReadPackagesInfoUsingXmlParser(ByVal strDirectory As String)
Dim ns As XNamespace = "www.microsoft.com/SqlServer/Dts"
...
If Not xml.Root Is Nothing AndAlso
    Not xml.Root.Descendants(ns + "Property").Attributes(ns + "Name") Is Nothing AndAlso
         xml.Root.Descendants(ns + "Property").Attributes(ns + "Name").Where(Function(x) x.Value = "PackageFormatVersion").Count > 0 Then
    strPackageFormatVersion = xml.Root.Descendants(ns + "Property").Attributes(ns + "Name").Where(Function(x) x.Value = "PackageFormatVersion").FirstOrDefault.Parent.Value
End If
...

其他资源

  • [SQL 研究 - 什么 SQL 版本是我的 SSIS 包吗?](https://blog.sqlauthority.com/2010/09/23/sql-server-what-sql-version-is-my-ssis-package/)
  • [MSDN - SQL Server 中的包格式更改Denali](https://docs.microsoft.com/en-us/sql/integration-services/developers/package-format-changes-in-sql-server-denali)

以上是如何自动从 SSIS .dtsx 文件检索版本号?的详细内容。更多信息请关注PHP中文网其他相关文章!

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
mysql:blob和其他无-SQL存储,有什么区别?mysql:blob和其他无-SQL存储,有什么区别?May 13, 2025 am 12:14 AM

mysql'sblobissuitableForStoringBinaryDataWithInareLationalDatabase,而alenosqloptionslikemongodb,redis和calablesolutionsoluntionsoluntionsoluntionsolundortionsolunsolunsstructureddata.blobobobsimplobissimplobisslowderperformandperformanceperformancewithlararengelitiate;

mySQL添加用户:语法,选项和安全性最佳实践mySQL添加用户:语法,选项和安全性最佳实践May 13, 2025 am 12:12 AM

toaddauserinmysql,使用:createUser'username'@'host'Indessify'password'; there'showtodoitsecurely:1)choosethehostcarecarefullytocon trolaccess.2)setResourcelimitswithoptionslikemax_queries_per_hour.3)usestrong,iniquepasswords.4)Enforcessl/tlsconnectionswith

MySQL:如何避免字符串数据类型常见错误?MySQL:如何避免字符串数据类型常见错误?May 13, 2025 am 12:09 AM

toAvoidCommonMistakeswithStringDatatatPesInMysQl,CloseStringTypenuances,chosethirtightType,andManageEngencodingAndCollat​​ionsEttingsefectery.1)usecharforfixed lengengters lengengtings,varchar forbariaible lengength,varchariable length,andtext/blobforlabforlargerdata.2 seterters seterters seterters seterters

mySQL:字符串数据类型和枚举?mySQL:字符串数据类型和枚举?May 13, 2025 am 12:05 AM

mysqloffersechar,varchar,text,and denumforstringdata.usecharforfixed Lengttrings,varcharerforvariable长度,文本forlarger文本,andenumforenforcingDataAntegrityWithaEtofValues。

mysql blob:如何优化斑点请求mysql blob:如何优化斑点请求May 13, 2025 am 12:03 AM

优化MySQLBLOB请求可以通过以下策略:1.减少BLOB查询频率,使用独立请求或延迟加载;2.选择合适的BLOB类型(如TINYBLOB);3.将BLOB数据分离到单独表中;4.在应用层压缩BLOB数据;5.对BLOB元数据建立索引。这些方法结合实际应用中的监控、缓存和数据分片,可以有效提升性能。

将用户添加到MySQL:完整的教程将用户添加到MySQL:完整的教程May 12, 2025 am 12:14 AM

掌握添加MySQL用户的方法对于数据库管理员和开发者至关重要,因为它确保数据库的安全性和访问控制。1)使用CREATEUSER命令创建新用户,2)通过GRANT命令分配权限,3)使用FLUSHPRIVILEGES确保权限生效,4)定期审计和清理用户账户以维护性能和安全。

掌握mySQL字符串数据类型:varchar vs.文本与char掌握mySQL字符串数据类型:varchar vs.文本与charMay 12, 2025 am 12:12 AM

chosecharforfixed-lengthdata,varcharforvariable-lengthdata,andtextforlargetextfield.1)chariseffity forconsistent-lengthdatalikecodes.2)varcharsuitsvariable-lengthdatalikenames,ballancingflexibilitibility andperformance.3)

MySQL:字符串数据类型和索引:最佳实践MySQL:字符串数据类型和索引:最佳实践May 12, 2025 am 12:11 AM

在MySQL中处理字符串数据类型和索引的最佳实践包括:1)选择合适的字符串类型,如CHAR用于固定长度,VARCHAR用于可变长度,TEXT用于大文本;2)谨慎索引,避免过度索引,针对常用查询创建索引;3)使用前缀索引和全文索引优化长字符串搜索;4)定期监控和优化索引,保持索引小巧高效。通过这些方法,可以在读取和写入性能之间取得平衡,提升数据库效率。

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

Dreamweaver CS6

Dreamweaver CS6

视觉化网页开发工具

WebStorm Mac版

WebStorm Mac版

好用的JavaScript开发工具

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )专业的PHP集成开发工具

mPDF

mPDF

mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),