怎样在SQL Server上部署SSIS包 2

源网址:https://www.sqlshack.com/deploying-packages-to-sql-server-integration-services-catalog-ssisdb/

-------------------------------------

Starting with SQL Server 2012, Integration Services (SSIS) packages can now be deployed to a single source for managing execution in multiple environments. The SSIS Catalog is a single database container for all deployed packages. The configuration files are replaced with Environments. Deployed versions are tracked historically and a package can be reverted to a previous deployment. On top of these features, internal reports with a dashboard help when debugging errors or examining performance over time.

To use this feature, the SSIS Catalog must be created. The System Administrator of the SQL Server instance needs to create the Catalog or a user with elevated permissions for creating databases. Figure 1 shows the menu after right-clicking on the Integration Services Catalog folder in SQL Server Management Studio (SSMS).

Figure 1 – Integration Services Catalog

The Create Catalog… meu option will launch the Create Catalog window. Some configuration takes place during its creation. CLR Integration will need to be enabled on this instance. On SQL Server Startup, the automatic execution of SSIS stored procedure(s) can be enabled or not. The most important part is to provide a strong password for the management of this new database container.

Figure 2: Create Catalog window

When the configuration is complete, a new database is created on this instance: SSISDB. The database needs the same maintenance as any other production database on this system. Maintenance items include backups, index rebuild/reorganize and update statistics. The recovery mode of the database inherits the properties from the Model database just like all new databases. Simple recovery mode is adequate for SSISDB because of the infrequent deployments.

Figure 3: SSIS Catalog Projects Deployed

A user does not need to be a SysAdmin to deploy projects (and packages) to the Catalog. There is a Database Role named ssis_admin in the SSISDB database. This role contains the permissions to deploy projects from Visual Studio. A developer’s Active Directory (AD) account or an AD group can be added to this role.

Figure 4: ssis_admin Database Role in SSISDB

Deploying SSIS projects, along with the project’s package(s), was added in SQL Server 2012 as well as the SSIS Catalog. This organization of packages in a SSIS Project enables objects, properties and values to be shared among the packages in a project. Figure 5 shows the project.param file associated with a SSIS Project.

Figure 5: Project Parameters

This project has multiple packages. The Source Database and Source Server is shared with packages like DimProduct and DimCategory. The connection is created under the Connection Manager in the Project’s solution as seen in Figure 6. Not only can the packages can share parameter values, it also shares these database connections. This example contains staging, source and destination databases. The prefix (project) is added to the Package Connection Managers’ connections as seen in Figure 6 under the objects of the package.

Figure 6: Project Connection Managers

In this environment, the development team uses a separate server as the testing team and production system. The use of Project Parameter enables a single change to effect multiple packages in the project. To deploy the project to the SSIS Catalog, right-click the project in the solution explorer of Visual Studio.

Figure 7: Deploy Project and Packages

The Integration Services Deployment Wizard will show a welcome screen. You can disable this screen for future deployments. The Select Source will default to the project selected while in Visual Studio. The wizard first brings you to the Select Destination page, but you can use the back button to go to the Select Source page. The Source Selection can be changed, but usually the deployment wizard is launched from the project being deployed. Figure 8 shows the Select Destination screen where the Server Name and Path in the SSIS Catalog are selected.

Figure 8: Select Destination Screen of SSIS Deployment Wizard

The Server name will be the instance the Catalog was created. The Path can be an existing one or a New Path can be created. The same path can be used for different projects. All project packages will be together under the project in the Path.

The Review screen gives the options to view the selected source and destination. Once the Deploy button is selected on the Review screen, the Results screen will show the success list or an indication of what failed during deployment.

Figure 9: Results screen of SSIS Deployment Wizard

A package can be launched in several ways. In SQL Server Management Server (SSMS), the Integration Services Catalog folder can be expanded to see the Paths created in the Catalog. Figure 10 shows the menu from right-clicking the package DimCategory in the SSIS Catalog.

Figure 10: Executing a Package from SSIS Catalog

After selecting Execute… from the menu, the execution prompts for Parameters, Connection Managers and Advanced options. Figure 11 show the Parameters that can be changed before the DimCategory package is executed. This is where we can change the server or database names for the Project Parameters before the package is executed.

Figure 11: Executing a Package from SSIS Catalog

One of the cool features of the SSIS Catalog are free reports. Figure 12 shows the execution report that can be displayed after launching the package. There is a prompt to view or not view the report. There are two additional links to drill down into Messages and Performance. Individual Tasks can be drilled into to show messages from different steps of the package.

Figure 12: Report Overview of Package Execution

If there is an error, the messages are the best place to start to debug a package. To see the performance of this package over time, click the View Performance drill down report.

There is a main Dashboard that can be used to see an overview of all packages running from the Catalog. This dashboard is launched from SSMS by right-clicking on the SSISDB folder under the Integration Services Catalog. Figure 13 shows the path to the report.

Figure 13: Launching the Integration Services Dashboard

Figure 14 shows for today one package has executed successfully and another has failed.

Figure 14: Integration Services Dashboard

By clicking on the Failed number, the next report gives the ability to drill into the Messages returned from the success and fail steps of the package like in Figure 15

Figure 15: Failed Package Messages report

As you can see, the SSIS Catalog has a wealth of information and management for SSIS projects and packages. The reports and drill down capabilities help with debugging problems before opening the package in Visual Studio. Performance reports can give an idea if a package is taking longer to run in the last execution than previous executions. History can be configured and is explained more in the side note at the end of this article. The Catalog is a great place to store and manage SSIS package deployment and execution.

Useful links

Side Note

Other configuration options are available by going to the properties of the Integration Services Catalog from SSMS. Clean Logs Periodically can be set to true or false. This enables or disables a SQL Server Agent Job that is run on a scheduled time. Retention Period (days) indicates to the job how long to keep history of the execution of the packages.

The descriptions of the Server-wide Default Logging Level options can be seen at the following link: Enable Logging for Package Execution on the SSIS Server. The Maximum Number of Version per Project indicates how many deployments will be saved to the catalog of a project. Purging these versions can be controlled by the property Periodically Remove Old Versions.

Figure 16: Catalog Properties

原文地址:https://www.cnblogs.com/ziqiumeng/p/9429813.html

时间: 2024-10-09 03:39:31

怎样在SQL Server上部署SSIS包 2的相关文章

查看SQL语句在SQL Server上的执行时间

set statistics profile onset statistics io onset statistics time ongo--begin <这里写上你的语句...>  select * from ......  --end <这里写上你的语句...> set statistics profile offset statistics io offset statistics time OFFgo --执行后查看[消息],有很清楚的执行情况. 查看SQL语句在SQL S

一步一步部署SSIS包图解教程

本文就SQL统计分析SSIS包的部署进行一次详细的部署图解教程,Sql Server Integration Services 提供了非常简单的部署工具,利用这些工具可以方便地将包文件(*.dtsx).包配置文件(*.dtsconfig)以及包的其它相关文件,打包成一个安装文件,以利于到其它计算机安装与部署. 下面我们以前面介绍的DEPJ1200 为例,来详细介绍包部署的完整过程. (-)生成安装部署文件.  在SQL Server Business Intelligence Developme

初识SQL Server Integration Services (SSIS)

1 什么是微软的SQL Server Integration Services(SSIS) 微软SSIS是构建企业级数据集成和数据转换解决方案平台.您可以使用集成服务来解决复杂的业务问题通过复制或下载文件,发送电子邮件以响应事件,更新数据仓库. 清洗和挖掘数据和管理 SQL Server 对象和数据.包可以单独或与其他包一起复杂的业务需求.集成服务可以提取和转换数据从各种各样的来源,如 XML 数据文件. 平面文件和关系数据源,然后将数据加载到一个或多个目标数据载体中. SSIS包括一组丰富的内

SQL Server AlwaysOn部署

一. AlwaysOn简介 AlwaysOn可用性组是在SQL Server 2012开始提供的全新功能,确保了应用程序数据的可用性,实现零数据丢失.AlwaysOn可用性组技术融合了数据库群集和数据库镜像的优点,此技术的一大好处是提供非共享存储,可以避免因为存储的单点故障而造成的整个可用性方案失效. AlwaysOn可用性组基于数据库(组)级别,是将一组用户数据库(可以是一个或多个)划到一个组中.每组可用性数据库都由一个可用性副本承载.可用性副本包括一个主副本和一到四个辅助副本. 主副本用于承

如何在阿里云上部署war包到tomcat服务器

一. 准备工作:xshell和xftp 首先我们得确保,xshell能够远程连接阿里云ECS,xftp能够保证windows和linux之间的文件传输(当然也可以选择FileZilla,但xftp感觉更好用一些) 如何配置xshell和xftp: 名称:自定义 协议和端口号:xshell默认是SSH协议,端口号是22,xftp是FTP协议,端口号是21,但是我用FTP协议连接阿里云,总是连接不上,所以把协议换成SFTP,端口号换成22,就可以连上,所以建议这种情况下,都填成SSH协议 登录名和密

SQL Server 2008部署链接服务器

链接服务器让用户可以对OLE DB数据源进行分布式异类查询.在创建某一链接服务器后,可对该服务器进行分布式查询,并且可以链接来自多个数据源的表.如果链接服务器定义为SQL Server实例,则可执行远程存储过程. 环境:主服务器,10.20.9.2    备服务器,10.20.9.3 现在在主服务器上创建一个链接服务器. 第一步:打开"Microsoft SQL Server Management Studio",登陆SQL库 第二步:新建链接服务器 依次打开"服务器对象&q

在MS sql server上如何创建mysql链接服务器

系统环境: Microsoft Windows Server 2003 Enterprise Edition Service Pack 2 [Microsoft Windows NT-5.2(3790)] SQL Server Enterprise Edition 8.00.2066(sp4) centOS mysql 部署步骤: linux环境 1.在mysql中创建账号及访问数据库权限(包括允许的访问IP) windows环境 1.在mssql中创建本地账号,最好和mysql中创建的账号一样

thinkphp 3.2.3 连接sql server 2014 WAMPSERVER环境包

安装 sqlsrv 扩展 首先  sql server 2014 安装没啥说的 链接信息自己设置 php 版本 :5.5.12 sqlsrv 驱动  微软提供了 3.0 和3.1 版本  3.0 对应php 5.4  3.1对应着5.5 PS: win7 64位系统 下载sql server 驱动http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx Version 3.0 supports PHP 5.4 Version 3.1 supp

Maven下载Sql Server 2008的驱动包

这是对于JRE8所支持的驱动 ,JRE7的版本是 6.1.0.jre7: <dependency>      <groupId>com.microsoft.sqlserver</groupId>      <artifactId>mssql-jdbc</artifactId>      <version>6.1.0.jre8</version>  </dependency> 驱动名称还是:driverClass