ssis 计划任务

In this article, we will explain the File Transfer Protocol (FTP), and we will give an overview of the FTP task in SQL Server Integration Services (SSIS) and FTP connection manager.

在本文中,我们将解释文件传输协议(FTP),并概述SQL Server Integration Services(SSIS)和FTP连接管理器中的FTP任务。

介绍 (Introduction)

As the name implies, File Transfer Protocol (FTP) is a network protocol to transfer files between computers. This protocol is built on a client-server model. Using FTP you can send or receive files; sending files is noted as “put” and receiving is noted as “get”.

顾名思义,文件传输协议(FTP)是在计算机之间传输文件的网络协议。 该协议建立在客户端-服务器模型上。 使用FTP,您可以发送或接收文件; 发送文件标记为“ 放置” ,接收文件标记为“ 获取”。

You don’t need to go through more details about FTP, the main thing you should know is that even you didn’t hear about this protocol you have surely used it when uploading or downloading files and applications from your web browser or download manager.

您无需了解有关FTP的更多详细信息,您应该知道的主要事情是,即使您没有听说过该协议,您在从Web浏览器或下载管理器上载或下载文件和应用程序时也肯定使用过该协议。

If you want to learn more about FTP, you can do a simple search for “FTP” word, and there are plenty of articles online that describes this protocol very well.

如果您想了解有关FTP的更多信息,可以简单地搜索“ FTP”一词,在线上有很多文章很好地描述了该协议。

In the following sections, we will describe how to establish an FTP connection and perform FTP Tasks using SQL Server Integration Services. To run an example, we will enable the FTP server feature on our local machine (Windows 10).

在以下各节中,我们将描述如何使用SQL Server Integration Services建立FTP连接和执行FTP任务。 为了运行示例, 我们将在本地计算机 (Windows 10) 上启用FTP服务器功能 。

SSIS FTP连接管理器 (SSIS FTP connection manager)

Before illustrating the SSIS FTP Task, we should explain the FTP connection manager, since it is used to establish a connection with an FTP server which is required by the FTP Task.

在说明SSIS FTP任务之前,我们应该先说明FTP连接管理器,因为它用于与FTP任务所需的FTP服务器建立连接。

If you right-click on in the connection manager tab, you may note that this type of connection manager is not available in the context menu strip. To add this connection manager, you must click on the “New connection” button as shown below:

如果在“连接管理器”选项卡上单击鼠标右键,您可能会注意到,上下文菜单栏中没有这种类型的连接管理器。 要添加此连接管理器,必须单击“新建连接”按钮,如下所示:

Figure 1 – Adding an FTP connection manager

图1 –添加FTP连接管理器

Then from the connection managers list, you must choose the FTP connection manager:

然后,从连接管理器列表中,必须选择FTP连接管理器:

Figure 2 – Selecting FTP from connection managers list

图2 –从连接管理器列表中选择FTP

After selecting the FTP connection manager, the connection manager form appears. To run an example, we have created an FTP site on port 21 which read from a local folder and doesn’t require permissions. Based on that we configured the connection manager as shown below:

选择FTP连接管理器后,将显示“连接管理器”表单。 为了运行示例,我们在端口21上创建了一个FTP站点,该站点从本地文件夹读取并且不需要权限。 基于此,我们配置了连接管理器,如下所示:

Figure 3 – FTP connection manager configuration

图3 – FTP连接管理器配置

You can note that the FTP connection manager contains the following properties:

您可以注意到,FTP连接管理器包含以下属性:

  • Server Name: The FTP server name (example: ftp.companyame.com) 服务器名称: FTP服务器名称(例如:ftp.companyame.com)
  • Server Port: The port number used 服务器端口:使用的端口号
  • User Name: The user name used for authentication 用户名:用于认证的用户名
  • Password: The password used for authentication 密码:用于验证的密码
  • Use passive mode: If checked the client activates the connection (passive mode), else the server initiates the connection 使用被动模式:如果选中,客户端将激活连接(被动模式),否则服务器将启动连接
  • Retries: Number of retires allowed to establish a connection 重试次数:允许建立连接的退休次数
  • Test Connection:  check whether our connection is successful or not 测试连接:检查我们的连接是否成功

You can read more about the FTP connection manager on the Microsoft official documentation.

您可以在Microsoft官方文档中阅读有关FTP连接管理器的更多信息。

SSIS FTP任务 (SSIS FTP Task)

After creating an FTP connection manager, we should add an SSIS FTP Task to download and upload files and manages directories on the FTP server. As shown in the image below, the FTP Task is described as a task that “Works with FTP Servers. Manage directories or download and upload data files”.

创建FTP连接管理器后,我们应该添加一个SSIS FTP任务来下载和上传文件以及管理FTP服务器上的目录。 如下图所示,FTP任务被描述为“与FTP服务器一起使用。 管理目录或下载和上传数据文件”

Figure 4 – FTP Task description from SSIS Toolbox

图4 – SSIS工具箱中的FTP任务描述

In the SSIS FTP Task editor form, there are three tab pages:

在“ SSIS FTP任务编辑器”表单中,有三个选项卡页:

  • General: On this page, we should specify the task name, description, the FTP connection manager we will use to establish a connection and whether this task stops on FTP operation failure

    常规 :在此页面上,我们应该指定任务名称,描述,将用于建立连接的FTP连接管理器以及该任务是否在FTP操作失败时停止

    Figure 5 – FTP Task general tab page

    图5 – FTP Task的General选项卡页面

  • File Transfer: On this page, we can configure the operation we need to execute. As shown in the image below, there is a different operation that can be executed such as:

    文件传输 :在此页面上,我们可以配置需要执行的操作。 如下图所示,可以执行不同的操作,例如:

    • Send files: Upload files from your machine to the FTP server 发送文件 :将文件从您的计算机上载到FTP服务器
    • Receive files: Download files from the FTP server 接收文件 :从FTP服务器下载文件
    • Create a local directory: Create a directory on your machine 创建本地目录 :在计算机上创建目录
    • Create a remote directory: Create a directory on the FTP server 创建远程目录 :在FTP服务器上创建目录
    • Remove local directory: Delete a directory on your machine 删除本地目录 :删除计算机上的目录
    • Remove remote directory: Delete a directory on the FTP server 删除远程目录 :删除FTP服务器上的目录
    • Delete local files: Delete files from your machine 删除本地文件 :从您的计算机上删除文件
    • Delete remote files: Delete files from the FTP server 删除远程文件 :从FTP服务器删除文件

    And each one of these operations has its configuration, you will note that the available properties on this page will change when the operation type change

    每个操作都有其配置,您会注意到,当操作类型更改时,此页面上的可用属性也会更改

    Figure 6 – FTP task file transfer tab page

    图6 – FTP任务文件传输选项卡页面

  • Expressions: This page is used to evaluate the SSIS FTP Task properties as expressions (similar to any other SSIS task) 表达式 :此页面用于将SSIS FTP任务属性评估为表达式(类似于任何其他SSIS任务)

In this example, we will upload files from the local machine to the FTP server, so we will select the “Send Files” operation type. As shown in the image below, we have to set the following parameters:

在此示例中,我们将文件从本地计算机上载到FTP服务器,因此我们将选择“发送文件”操作类型。 如下图所示,我们必须设置以下参数:

  • Local Parameters: which are related to the files we need to upload: 本地参数 :与我们需要上传的文件有关:

    • IsLocalPathVariable: Specify if we need to read the local path from an SSIS variable IsLocalPathVariable :指定是否需要从SSIS变量读取本地路径
    • LocalPath: Specify the local file path; if IsLocalPathVariable is set to true then we have to select the SSIS variable. Else, we need to select a File Connection Manager LocalPath :指定本地文件路径; 如果IsLocalPathVariable设置为true,那么我们必须选择SSIS变量。 否则,我们需要选择一个文件连接管理器
  • Operation: which are related to the FTP operation: 操作 :与FTP操作有关:
    • Operation: The operation type (we mentioned it above) 操作 :操作类型(我们在上面提到过)
    • IsTransferASCII: Indicate whether files transferred to and from the remote FTP server should be transferred in ASCII mode IsTransferASCII :指示是否应以ASCII模式传输往返于远程FTP服务器的文件。
  • Remote Parameters: which are related to the destination (FTP Server) 远程参数 :与目标(FTP服务器)相关
    • IsRemotePathVariable: Specify if we need to read the destination path from an SSIS variable IsRemotePathVariable:指定是否需要从SSIS变量读取目标路径
    • RemotePath: Specify the destination file path; if IsRemotePathVariable is set to true then we have to select the SSIS variable. Else, we need to enter it manually RemotePath:指定目标文件路径; 如果IsRemotePathVariable设置为true,那么我们必须选择SSIS变量。 否则,我们需要手动输入
    • OverwriteFileAtDest: Select if we want to overwrite the existing file on the FTP server OverwriteFileAtDest :选择是否要覆盖FTP服务器上的现有文件

Figure 7 – Configuring FTP Task

图7 –配置FTP任务

After configuring the FTP task, we execute the package. If we go to the remote directory, we will see that the file is uploaded successfully.

配置FTP任务后,我们执行该程序包。 如果转到远程目录,将看到文件已成功上传。

Figure 8 – File uploaded to the remote path

图8 –文件上传到远程路径

If you need to read more information about different SSIS FTP Task operations, you can refer to the Microsoft official documentation.

如果需要阅读有关不同的SSIS FTP任务操作的更多信息,则可以参考Microsoft官方文档。

结论 (Conclusion)

In this article, we have briefly described File Transfer Protocol (FTP) and how to establish FTP connections and how to perform FTP operations such as uploading and downloading files in SQL Server Integration Services.

在本文中,我们简要介绍了文件传输协议(FTP)以及如何建立FTP连接以及如何执行FTP操作,例如在SQL Server Integration Services中上载和下载文件。

翻译自: https://www.sqlshack.com/an-overview-of-ssis-ftp-task/

ssis 计划任务

ssis 计划任务_SSIS FTP任务概述相关推荐

  1. ssis 计划任务_SSIS Hadoop连接管理器和相关任务

    ssis 计划任务 In this article, we will give a brief introduction of Hadoop and how it is integrated with ...

  2. ssis 计划任务_SSIS Web服务任务

    ssis 计划任务 SQL server Integration services provides us with SSIS Web Service Tasks which assist us to ...

  3. SSIS 学习之旅 FTP访问类

    这章把脚本任务访问FTP的方法 全部给大家. 控件的使用大家如果有不懂得可以看下我之前的文章. 第一章:SSIS 学习之旅 第一个SSIS 示例(一)(上) 第二章:SSIS 学习之旅 第一个SSIS ...

  4. ssis 列转换_SSIS中的术语提取转换

    ssis 列转换 This article explores the Term extraction transformation in SSIS and its usage scenario. 本文 ...

  5. ssis配置文件优先级_SSIS优先约束概述

    ssis配置文件优先级 This article explores the SSIS Precedence Constraints, along with examples and scenarios ...

  6. ssis组件_SSIS脚本组件概述

    ssis组件 SSIS Script component is a prominent strength of SQL Server Integration Services since it all ...

  7. ssis修改数据库数据_SSIS平衡数据分配器概述

    ssis修改数据库数据 In this article, we will give a brief overview of SSIS Balanced Data Distributor (BDD). ...

  8. 查看ssis执行日志_SSIS包日志记录概述

    查看ssis执行日志 This article gives an overview of the different methods of SQL Server SSIS Package Loggin ...

  9. ssis 列转换_SSIS组播转换概述

    ssis 列转换 This article explores the SSIS Multicast Transformation for creating different logical copi ...

最新文章

  1. Spring MVC 学习笔记 对locale和theme的支持
  2. MySql - 索引
  3. IoAttachDevice源码
  4. LeetCode Algorithm 897. 递增顺序搜索树
  5. CSS 技巧tips1
  6. CentOS 7 上 Docker 安装
  7. Datahub Python SDK入门手册
  8. 新代系统plc梯形图说明书_东莞自动化PLC编程需要多少钱
  9. Linux Virtual Server LVS Load Balancing
  10. 容器大小_C++复习篇(7)序列式容器vector
  11. /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o:在函数‘_start’中:(.text+0x20):对‘main’未
  12. idea svn分支与分支合并_Idea svn 合并分支方式(坑)
  13. svn可视化操作工具
  14. linux无桌面浏览器,Ubuntu无桌面进行Web浏览器测试
  15. linux导航改端口波特率,各大导航端口速率修改方法
  16. 2014新生暑假个人排位赛06 D. 爱好和平
  17. 高数笔记(六):拉格朗日中值定理,柯西中值定理,洛必达法则,泰勒定理
  18. 英语语法高考英语单词拼写必背全表
  19. Android手写签名 附带背景图设置
  20. 计算机科学导论【第四版】读书笔记 (一)

热门文章

  1. php mysql销售_计算用于销售应用程序的php / mysql中的损益(每日,每月和每年)...
  2. mybatis plus当月数据查询_mybatis plus的3种查询方式(小结)
  3. Linux磁盘分区/格式化/挂载目录
  4. npm install --save 与 npm install --save-dev 的区别
  5. 怎样在virtualbox下WIN7共享XP的文件
  6. node.js学习-整理
  7. LeetCode(1089)——复写零(JavaScript)
  8. ★LeetCode(538)——把二叉搜索树转换为累加树(JavaScript)
  9. HIT Software Construction Review Notes(2-1 Software Lifecycle and Configuration Management)
  10. 【博客项目】—登录验证功能实现( 五)