ssis工具

DTExec is a tool used to configure and execute SQL Server Integration Services (SSIS) packages. Many developers and database administrators use this tool, especially when automating the package execution using third-party applications or non-supported programming languages.

DTExec是用于配置和执行SQL Server集成服务(SSIS)程序包的工具。 许多开发人员和数据库管理员都使用此工具,尤其是在使用第三方应用程序或不受支持的编程语言自动执行程序包时。

This article will introduce this tool to you, also help you understand how and when should we use it?

本文将向您介绍此工具,还可以帮助您了解如何以及何时使用它?

什么是DTExec实用程序? (What is a DTExec utility?)

DTExec tool is a command prompt tool developed by Microsoft used to configure and execute SSIS packages without needing the Business Intelligence Development Studio or SQL Server data tools. It can run SSIS packages from a file system (*.dtsx), a project file (*.ispac), the msdb database, the Integration Services server, or the SSIS package store.

DTExec工具是由Microsoft开发的命令提示符工具,用于配置和执行SSIS包,而无需使用Business Intelligence Development Studio或SQL Server数据工具。 它可以从文件系统(* .dtsx),项目文件(* .ispac),msdb数据库,Integration Services服务器或SSIS包存储中运行SSIS包。

This tool can access all package configurations such as variables, parameters, connection managers, logging.

该工具可以访问所有程序包配置,例如变量,参数,连接管理器,日志记录。

什么时候安装此工具? (When is this tool installed?)

For many people, it is not clear what is the SQL Server feature that installs DTExec utility. Koen Verbeeck (a BI consultant) wrote a great article about that and there are two ways to get this tool installed:

对于许多人来说,尚不清楚安装DTExec实用工具SQL Server功能是什么。 Koen Verbeeck(BI顾问)写了一篇很棒的文章 ,有两种安装此工具的方法:

  1. Installing SQL Server Management tools (Management Studio): DTExec utility is installed, but it is not available from the command prompt. It is only used by the SQL Server Import and Export Wizard
    安装SQL Server管理工具(Management Studio):已安装DTExec实用程序,但是在命令提示符下不可用。 仅由SQL Server导入和导出向导使用
  2. Installing SQL Server Integration Services client tools: This tool will be installed and available within the command prompt
    安装SQL Server Integration Services客户端工具:该工具将安装并在命令提示符下可用

何时使用DTExec实用工具? (When is a DTExec utility tool used?)

As we explained in our previously published article, Biml alternatives: Building SSIS packages programmatically using ManagedDTS, there are two approaches to access the integration services object model; native or managed.

正如我们在先前发表的文章Biml替代品:使用ManagedDTS以编程方式构建SSIS包中所解释的那样 ,有两种方法可以访问集成服务对象模型; 本机或托管。

Integration Services fully supports the Microsoft .NET Framework. This lets the developers access to the fully managed integration service object model to develop, manage, and execute packages. Besides, the managed object model is used by the SSIS designer (BIDS or SSDT), SSIS wizards.

Integration Services完全支持Microsoft .NET Framework。 这使开发人员可以访问完全托管的集成服务对象模型来开发,管理和执行程序包。 此外,SSIS设计器(BIDS或SSDT),SSIS向导使用托管对象模型。

DTExec utility is used when we need to access the object model. Still, we are not using a .NET supported language, or we need to execute packages from the command line, batch file, or windows scheduler.

当我们需要访问对象模型时,可以使用DTExec实用程序。 尽管如此,我们仍未使用.NET支持的语言,或者我们需要从命令行,批处理文件或Windows调度程序执行程序包。

我们如何手动使用它? (How can we manually use it?)

By default, this tool is installed within the DTS executable files paths: “<installation path>\Microsoft SQL Server\<SQL version>\DTS\Binn” and which is added to the “path” system variable.

默认情况下,此工具安装在DTS可执行文件路径中:“ <安装路径> \ Microsoft SQL Server \ <SQL版本> \ DTS \ Binn”,并将其添加到“ path”系统变量中。

入门 (Getting started)

To get started with this tool, just open the command prompt and execute the “dtexec” command, you will get a message telling you that “At least one of the DTS, SQL, ISServer or File options must be specified”.

要开始使用此工具,只需打开命令提示符并执行“ dtexec”命令,您将收到一条消息,告诉您“必须指定DTS,SQL,ISServer或File选项中的至少一个”。

Now, let’s try to list all available options by running the following command:

现在,让我们尝试通过运行以下命令列出所有可用的选项:

dtexec /help

从文件系统执行包 (Executing a package from a file system)

To execute an SSIS package from a file system, you should use the “/F” or “/FILE” option and specify the package file path. As an example:

要从文件系统执行SSIS包,应使用“ / F”或“ / FILE”选项并指定包文件路径。 举个例子:

dtexec /File “D:\packagetest.dtsx”

从项目文件执行包 (Executing a package from a project file)

To execute a package from an integration services project (*.ispac) file, you must specify the project file path after the “/Project” option and the package file name after the “/Package” option. As an example:

要从Integration Services项目(* .ispac)文件执行软件包,必须在“ / Project”选项之后指定项目文件路径,并在“ / Package”选项之后指定软件包文件名。 举个例子:

dtexec /Project “C:\project.ispac” /Package “test.dtsx”

从Integration Services服务器执行程序包 (Execute a package from Integration Services Server)

To execute a package from an Integration Services server (SSISDB), you should specify the SQL Server instance after the “/Ser” or “/Server” option and the package path within SSISDB after “/ISServer” option. As an example:

要从Integration Services服务器(SSISDB)执行程序包,应在“ / Ser”或“ / Server”选项后指定SQL Server实例,并在“ / ISServer”选项后指定SSISDB中的程序包路径。 举个例子:

dtexec /Server “My-Pc/SQLInstance” /ISServer “SSISDB\MyFolder\MyProject\MyPackage.dtsx”

Note that only users with windows authentication can execute SSIS packages from the integration services server.

请注意,只有具有Windows身份验证的用户才能从Integration Services服务器执行SSIS包。

从SSIS包商店执行包 (Execute a package from an SSIS package store)

The main difference between the integration services server and the SSIS package store is that packages stored in the SSIS Package Store, are deployed using the legacy package deployment model. In contrast, packages within the integration services server are deployed to the Integration Services server using the project deployment model.

Integration Services服务器与SSIS软件包存储之间的主要区别在于,使用旧版软件包部署模型来部署SSIS软件包存储中存储的软件包。 相反,使用项目部署模型将Integration Services服务器中的程序包部署到Integration Services服务器。

To run a package stored within the SSIS package store, you should use the “/D” or “/Dts” option before passing the file system folder within the package store. As an example:

若要运行存储在SSIS软件包存储区中的软件包,应在传递文件存储在存储区中的文件系统文件夹之前使用“ / D”或“ / Dts”选项。 举个例子:

dtexec /Dts “\File System\PackageTest”

从MSDB执行程序包 (Executing package from MSDB)

To run a package stored within the Msdb database, you should use the “/S” or “/SQL” option before passing the package path within the Msdb database. You should also specify the SQL Server instance by using “/Ser” or “/Server” option. As an example:

要运行存储在Msdb数据库中的程序包,在传递Msdb数据库中的程序包路径之前,应使用“ / S”或“ / SQL”选项。 您还应该使用“ / Ser”或“ / Server”选项指定SQL Server实例。 举个例子:

dtexec /SQL “\Import\ImportPackage.dtsx” /Server “My-Pc\SQLInstance”

Note that if you need to execute the package using SQL authentication, you can use the “/U” or “User” option to specify the user name and “/P” or “/Password” option to write the password. As an example:

请注意,如果您需要使用SQL身份验证执行程序包,则可以使用“ / U”或“用户”选项指定用户名,并使用“ / P”或“ / Password”选项来编写密码。 举个例子:

dtexec /SQL “\Import\ImportPackage.dtsx” /Server “My-Pc\SQLInstance” /User sa /Password 123456

传递参数 (Passing parameters)

To pass a parameter value (Package or Project), you should use the use “/Par” or “/Parameter” option with the parameter qualified name and value separated by a semicolon (;). You should use this option for each parameter. as following:

要传递参数值(包或项目),应使用“ / Par”或“ / Parameter”选项,参数限定名称和值之间用分号(;)分隔。 您应该为每个参数使用此选项。 如下:

Dtexec /ISServer "SSISDB\MyFolder\MyProject\MyPackage.dtsx" /server "My-Pc\SQLInstance" /parameter $Project::myparam;myvalue /parameter $Project::myparam2;myvalue2

Note that this option is only available with the “/ISServer” option.

请注意,此选项仅与“ / ISServer”选项一起使用。

传递变量 (Passing variables)

To pass a variable value, you should use the “/Set” option with the variable qualified name and value separated by a semicolon (;). Also, you should use this option for each variable. As an example:

要传递变量值,应使用“ / Set”选项,变量限定名称和值之间用分号(;)分隔。 另外,您应该为每个变量使用此选项。 举个例子:

dtexec /File testpackage.dtsx /Set \package.variables[myvariable].Value;myvalue

Note that we can also use this option to set parameter value.

注意,我们也可以使用此选项来设置参数值。

编辑连接 (Editing Connections)

You can set a connection manager’s connection string property using the “/Connection” option with connection manager name or GUID and the connectionstring value. As an example:

您可以使用带有连接管理器名称或GUID以及连接字符串值的“ / Connection”选项来设置连接管理器的连接字符串属性。 举个例子:

dtexec /File F:\testpackage.dtsx /Connection SourceOleDbConnection;” Provider=SQLNCLI11;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;”

设置记录级别 (Set Logging level)

You can add package logging but use “/L” or “/Logging” option with the log provider and connection. As example:

您可以添加程序包日志记录,但在日志提供程序和连接中使用“ / L”或“ / Logging”选项。 例如:

dtexec /File "F:\testpackage.dtsx" /Logging "DTS.LogProviderTextFile;F:\Packagelog.txt"

设置报告级别 (Set Reporting level)

You can set the package reporting level using “/Reporting” option. You should select the reporting options from the list below:

您可以使用“ / Reporting”选项设置软件包报告级别。 您应该从下面的列表中选择报告选项:

  • N (No reporting)
    N(无报告)
  • E (Errors are reported)
    E(报告错误)
  • W (Warnings are reported)
    W(已报告警告)
  • I (Informational messages are reported)
    I(报告信息性消息)
  • C (Custom events are reported)
    C(报告自定义事件)
  • D (Data Flow task events are reported)
    D(报告数据流任务事件)
  • P (Progress is reported)
    P(报告进度)
  • V (Verbose reporting)
    V(详细报告)

By default, the reporting level is set to E, W, and P.

默认情况下,报告级别设置为E,W和P。

包裹退出码 (Package exit code)

When DTExec is executed, it returns an exit code that reflects the error level. The following exit code list was taken from the official documentation:

执行DTExec时,它将返回反映错误级别的退出代码。 以下退出代码列表来自官方文档 :

  • 0: The package ran successfully
    0:包运行成功
  • 1: The package failed
    1:打包失败
  • 3: The package was canceled by the user
    3:该软件包已被用户取消
  • 4: The utility was unable to locate the requested package. The package could not be found
    4:该实用程序无法找到请求的程序包。 找不到包裹
  • 5: The utility was unable to load the requested package. The package could not be loaded
    5:该实用程序无法加载请求的程序包。 无法加载该软件包
  • 6: The utility encountered an internal error of syntactic or semantic errors in the command line
    6:该实用程序在命令行中遇到语法或语义错误的内部错误

验证包 (Validating packages)

DTExec utility is not used only to execute packages; it serves as a validation tool. TO validate a package, you can use the “/Validate” option.

DTExec实用程序不仅用于执行程序包; 它用作验证工具。 要验证软件包,可以使用“ / Validate”选项。

dtexec /File “F:\testpackage.dtsx” /Validate

有没有相关工具? (Is there any related tool?)

There is a related tool called DtExecUI, which is a user interface for this utility. This utility is used when you try to execute a package from SQL Server or when you open it from the command line using “dtexecui” command.

有一个名为DtExecUI的相关工具,它是此实用程序的用户界面。 当您尝试从SQL Server执行程序包或使用“ dtexecui”命令从命令行打开程序包时,将使用此实用程序。

32位和64位 (32-bit vs. 64-bit)

You can execute SSIS packages in 32-bit or 64-bit mode. As we mentioned above, this utility is installed within two paths Program Files and Program Files (x86). Based on that, if you need to execute the SSIS package in 32-bit mode, you should use the executable in the Program Files (x86) path. For 64-bit mode, you should use the other path.

您可以在32位或64位模式下执行SSIS包。 如上所述,此实用程序安装在程序文件程序文件(x86)的两个路径中。 基于此,如果需要以32位模式执行SSIS包,则应在“ 程序文件”(x86)路径中使用可执行文件 。 对于64位模式,应使用其他路径。

结论 (Conclusion)

In this article, we explained what DTExec utility is? When is it installed? And we illustrated some of the different options related to this tool by providing examples.

在本文中,我们解释了DTExec实用程序是什么? 什么时候安装? 我们通过提供示例说明了与此工具相关的一些不同选项。

翻译自: https://www.sqlshack.com/an-overview-of-dtexec-utility-in-ssis/

ssis工具

ssis工具_SSIS中的DTExec实用工具概述相关推荐

  1. 介绍几个网络攻击中溯源的实用工具

    介绍几个网络攻击中溯源的实用工具 1.Rootkit 查杀:http://www.chkrootkit.org Rootkit是一种特殊的恶意软件,它的功能是在安装目标上隐藏自身及指定的文件.进程和网 ...

  2. pc工具不支持stb的加密方式_那些工作中常用的实用工具

    DESIGN 古人云:工欲善其事,必先利其器.俗话说:巧妇难为无米之炊.两句话都讲的是,做专业的事,要有专业的工具,保证品质的同时呢,又能提高生产效率.作为一名设计师,同样需要专业的工具输出我们的产品 ...

  3. SQL Server中的bcp实用工具(批量复制程序)简介

    介绍 (Introduction) The Bulk copy program aka bcp is the console application used to export and import ...

  4. 【工具】13 款 Linux 实用工具推荐,个个是神器!(附下载链接)

    本文介绍几款Linux比较实用的工具,希望有所帮助. 1.查看进程占用带宽情况-Nethogs Nethogs 是一个终端下的网络流量监控工具可以直观的显示每个进程占用的带宽. 下载:http://s ...

  5. java的开发工具_Java中常用的开发工具有哪些

    Eclipse   据数据显示很多Java开发人员的Java开发工具便是Eclipse,这主要得益于Eclipse是一个开源的.可以基于Java的可扩展开发平台.Eclipse本身而言,它只是一个框架 ...

  6. 【Linux工具】13款Linux实用工具

    文章目录 前言 1.查看进程占用带宽情况-Nethogs 2.硬盘读取性能测试-IOZone 3.实时监控磁盘IO-IOTop 4.网络流量监控-IPtrafIPtraf是一个运行在Linux下的简单 ...

  7. SQL数据库中勒索病毒检测工具 服务器中勒索病毒检测工具

    为了让客户更加了解SQL数据库被勒索病毒加密后的损坏比列,我们开发了此款工具,支持MDF NDF 文件和 非压缩BAK备份文件的损坏率检测. 对于 丢失占比在0-50%的 一般都可以恢复,大于50%的 ...

  8. 云脉文档管理系统,工作中的实用工具

    对于办公人员来说,每天工作中都在不停地产生大量纸质文件,例如各种合同.票据.杂乱的笔记等等.在这个场景下,云脉推出了文档管理系统. 在文字录入方面,采用了先进的OCR文档识别技术,利用光学设备(照相机 ...

  9. aqlserver实用程序_sqlserver命令提示实用工具的介绍

    除上述的图形化管理工具外,SQL Server2008还提供了大量的命令行实用工具,包括bcp.dtexec.dtutil.osql.reconfig.sqlcmd.sqlwb和tablediff等, ...

最新文章

  1. 基于OpenCV的气体泵扫描仪数字识别系统
  2. android 2.0 软件,Apeaksoft Android Toolkit
  3. 一起学android之怎样设置TextView中不同字段的字体颜色(22)
  4. 谷歌Analytics添加到您的SharePoint 2010网站的2种方法
  5. swift 注意事项 (十六) —— 可选链
  6. 电脑手写输入法_QQ拼音输入法除了能打字,竟然还有 N 多妙用!
  7. 多线程锁--怎么理解Condition
  8. 关于WPF装饰器的笔记
  9. CleanCodeHandbook Chapter 5: Bit Manipulation(33-34)
  10. 服务台与事件管理解决方案
  11. SURF算法python实现
  12. 条件概率公式图解推导
  13. 京东话费充值,点击出现的css样式
  14. Android应用各个开放平台市场
  15. AI崛起,阿里的科技孵化力
  16. 【飞书集成自建应用教程】
  17. 微信公众号+Vue+JS-SDK配置注册失败,显示config:fail,Error: 系统错误,错误码:63002,invalid signature等解决方法
  18. Adobe BrowserLab开放注册并发布升级
  19. QT5.8 中创建插件时Q_INTERFACES提示Undefined interface
  20. MIT线性代数笔记十七讲 正交矩阵和施密特正交化

热门文章

  1. html+cs入门实例,CS50 HTML和CSS基础(介绍最简单的HTML和CSS)
  2. 田字格怎么用C语言编写程序,怎么写算法设计
  3. CSS如何水平垂直居中?
  4. 2017IEC计算机第二次作业
  5. python 字典格式转换
  6. CTSC2017 APIO2017 THUSC2017 游记
  7. 没钱也创业——教你空手道白手创业
  8. 【Vue2.0】— TodoList案例(十七)
  9. JavaScript学习(三十四)—事件委托
  10. HTML+CSS实现品优购登录界面