简体   繁体   English

使用 TFS 命令行部署 SSIS 项目

[英]Deploy SSIS Project using TFS Command Line

How do I deploy an SSIS project from TFS 2015?如何从 TFS 2015 部署 SSIS 项目?

For regular database projects, it is sqlpackage.exe /publish with publish profile.对于常规数据库项目,它是带有发布配置文件的sqlpackage.exe /publish

What is the command line argument to auto deploy SSIS Project Model into a server?将 SSIS 项目模型自动部署到服务器的命令行参数是什么?

We are using SQL Server 2016 Enterprise.我们正在使用 SQL Server 2016 Enterprise。

Why using runas command ?? 为什么使用runas命令

Runas command allows a user to run specific tools and programs with different permissions than the user's current logon provides. Runas命令允许用户运行具有与用户当前登录提供的权限不同的权限的特定工具和程序。

Based on Deploy an SSIS project from the command prompt with ISDeploymentWizard.exe: : 基于使用ISDeploymentWizard.exe从命令提示符部署SSIS项目

If you're deploying to a SQL Server with the Deployment Wizard, you have to use Windows authentication; 如果使用“部署向导”部署到SQL Server,则必须使用Windows身份验证; you can't use SQL Server authentication. 您不能使用SQL Server身份验证。

Then if the current user has access to the remote server you don't need to use runas command then no need to provide a password. 然后,如果当前用户可以访问远程服务器,则无需使用runas命令,则无需提供密码。


How to use IsDeploymentWizard to automate ssis project (.ispac) deployment? 如何使用IsDeploymentWizard自动化ssis项目(.ispac)部署?

First of all, run ISDeploymentWizard.exe /? 首先,运行ISDeploymentWizard.exe /? from a command prompt, and you'll see the full list of arguments it supports with their abbreviations. 从命令提示符,您将看到它支持的缩写的完整参数列表。

在此输入图像描述

You only have to use IsDeploymentWizard in silent mode to prevent showing the wizard, but you should specify the argument needed. 您只需在静默模式下使用IsDeploymentWizard以防止显示向导,但您应指定所需的参数。

ISDeploymentWizard /S /SP:foo.ispac /DS:myserver /DP:/ssisdb/test/test 

A shortcut to building the initial arguments for the ISDeploymentWizard is provided by the GUI version of the program. 程序的GUI版本提供了构建ISDeploymentWizard的初始参数的快捷方式。 In the confirmation screen, you would see an image like the following 在确认屏幕中,您将看到如下图像

确认屏幕

Note the Command Line section - those are the arguments you will need to pass for an automated deployment (Ctrl-C will copy that entire line if you select it) 请注意命令行部分 - 这些是您为自动部署需要传递的参数(如果您选择,Ctrl-C将复制整行)

References & Helpful Links 参考和有用的链接

If you want to deploy SSIS from CMD line to another server with Windows Authentication, then this should work for you: 如果您想使用Windows身份验证将SSIS从CMD线路部署到另一台服务器,那么这应该适用于您:

runas /netonly /user:mbase\bogdancioata "C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\ISDeploymentWizard.exe"

After you run this command, you will be asked to provide the password for the user domain. 运行此命令后,系统将要求您提供用户域的密码。

However, be accurate when typing the password, because if you provide a wrong password, it will still open the Integration Services Deployment Wizard, but when you proceed the deployment to the server, it will fail. 但是,在输入密码时要准确,因为如果提供了错误的密码,它仍然会打开Integration Services部署向导,但是当您继续部署到服务器时,它将失败。

--Edit: - 编辑:

As you asked for an automatic deployment, without passing manually a password, then this should do the trick, as the runas tool does not support password argument (see documentation ): 当你要求自动部署而不手动传递密码时,这应该可以解决问题,因为runas工具不支持密码参数 (参见文档 ):

  • Create a .txt file containing the password written on the first line. 创建一个包含第一行写入的密码的.txt文件。
  • Create a .bat file containig the following code: 创建一个包含以下代码的.bat文件:

runas /netonly /user:mbase\\bogdancioata "C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\ISDeploymentWizard.exe" < password.txt

Personally, I do not recommend doing this, as it is unsafe. 就个人而言,我不建议这样做,因为它不安全。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM