[译]Stairway to Integration Services Level 18 – 部署和执行

介绍

在本文中,我们要创建一个SSIS Catalog 实例,部署我们的项目,并且运行 weather data loader 包.

 

SSIS 2012 部署模型   SSIS 2012 Deployment Models

SQL Server 2012 Integration Services 支持两种部署模型:

  1. 包部署模型  Package Deployment Model
  2. 项目部署模型  Project Deployment Model

包部署模型是向后兼容的,支持SSIS 2012以前的版本,这样方便从SSIS 2008 R2 升级:

  • 部署到文件系统  Deployment to the File System
  • 部署到MSDB数据库 Deployment to the MSDB database

项目部署模型 是SSIS 2012 默认的. 为了使用 SSIS Catalog,你的SSIS项目必须使用项目部署模型.

 

创建  SSIS 2012  Catalog   Creating the SSIS 2012 Catalog

先连接SQL Server 实例

在Object Explorer 下面右击  “Integration Services Catalogs”节点,然后点击 “Create Catalog…” :

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 2

点击后界面如下

CLR (Common-Language Runtime) Integration 默认不启用(为什么我的默认启用了而且还无法修改….) . SQL CLR integration 允许开发者使用.Net 编写存储过程.  SSIS Catalog 与 .Net assemblies 结合管理 SSIS 包执行.

点击 Enable CLR Integration 复选框:

“Enable automatic execution of Integration Services stored procedure at SQL Server startup” 允许存储过程在SQL Server服务启动后做一次"清理". 存储过程检查相关的整合服务. 比如说存储过程检查SQL Server 服务关闭后执行的 SSIS包, 然后修复他们的状态.

  • “Name of the catalog database”的名字是 SSISDB 这个是强制性的,没法改变.
  • “Password” ,“Retype Password”  密码用来加密 SSIS Catalog.

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 5

点击OK按钮以后会创建SSIS Catalog.然后有两个东西会生成.

一个是integration Services Catalogs 多了一个SSISDB的节点 

还有就是一个名为 SSISDB 数据库被建立了.

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 6

The SSISDB Database

在SSISDB 数据库里面有很多表格,视图,和存储过程.

因为 SSISDB 是一个数据库, 所以你可以用T-SQL 与 SSIS Catalog 交互 .在后面的文章中我们会有用T-SQL 执行SSIS包的例子.

 

The SSIS Catalog

In the SSMS Object Browser, expand the Integration Services Catalogs node to reveal the SSIS Catalog, named SSISDB, shown in Figure 10:

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 10

SSIS Catalog 在 SQL Server 里面有四层:

  1. Catalog
  2. Folder
  3. Project
  4. Package

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 11

每个SQL Server实例只能拥有一个 Catalog实例 . 当然你可以安装多个SQL SERVER实例来增加 SSIS Catalogs 数量

Catalog 包含一个或多个目录. 用来帮助对SSIS项目分组. 这个完全取决于你. 每个目录可以包含一个或多个SSIS项目. 项目名是你在 SSDT里面创建的名字.

每个项可以包含一个或多个SSIS 包. 单独的包也可以被添加进一个SSIS项目

 

SSIS Catalog 配置 SSIS Catalog Configuration

右击SSISDB,然后点属性:

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 12

SSIS Catalog 属性窗口显示如下:

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 13

这个配置页面的配置属性蛮多的:

  • 日志清理周期 Clean Logs Periodically  是一个布尔值.用来决定是否在每天午夜用 SQL Agent Job 执行名为“SSIS Server Maintenance Job”的任务 . Phil Brammer 有一篇文章讲解这个 SSIS 2012 – Beware the SSIS Server Maintenance Job.
  • 保存期 Retention Period (days) – 用来设定“SSIS Server Maintenance Job” 多少天才删掉 SSIS执行和操作的日志.
  • 日志级别 Server-wide Default Logging Level 有四个:
  • None
  • Basic (默认)
  • Performance
  • Verbose
用SSDT-BI 部署项目  Deploying the Project from SQL Server Data Tools – Business Intelligence

只有项目部署模式才能把SSIS项目发布到 SSIS Catalog. 右击项目然后点击Deploy 发布

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 14

Server name:  选择本地数据库. Patch ,建立如下目录 

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 16

Once configured, the “Select Destination” page will appear similar to that shown in Figure 17:

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 17

预览界面

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 18

点击Deploy后如图 :

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 19

可以看到 项目已经被部署到SSIS Catalog 

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 20

我们发布SSIS 项目的同时, SSIS会在后台建立一个 ISPAC file.

 

从 ISPAC文件 部署项目   Deploying the Project from an ISPAC File

ISPAC 文件默认建立在 e <SSIS Project>\bin\ 开发目录. 文件名 <SSIS Project>.ispac. 下图是 My_First_SSIS_Project 生成的ISPAC 文件 :

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 21

其实 ISPAC文件是个zip包.你可以解压 :

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 22

双击以后就会出现和前面用SSDT-BI 部署的类似界面 :

[译]Stairway to Integration Services Level 18 – 部署和执行

Figure 23

后面执行太基础,连SQL Agent都没用,不高兴翻译了……有兴趣的同学看原文

原文连接 http://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/109944/

项目文件 My_First_SSIS_Project_After_Step_16.7z