在SSIS中动态更改服务器名称 [英] Dynamically Changing Server Names in SSIS

查看:265
本文介绍了在SSIS中动态更改服务器名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发周期(开发,质量检查,分期和生产)期间,我的SSIS包有几种环境,因此我想在SSIS中使用配置来设置我的连接管理器中的服务器名称,以便我不需要手动执行。

I have several environments that my SSIS packages move through during a development cycle (Development, QA, Staging, and Production) as such I'd like to use a configuration in SSIS to set the Server Names in my Connection Managers so that I don't need to do this by hand.

我已经阅读了关于使用xml配置文件,SQL配置表和环境变量。但是我遇到的问题是我的QA和Staging环境在同一台服务器上,但是使用两个单独的SQL实例。如何在这个实例中动态配置服务器名称?

I've read about using xml config files, SQL config tables, and environment variables. However the problem I have is that my QA and Staging environments are on the same server but using two separate SQL instances. How can I configure the Server Name dynamically in this instance?

推荐答案

确定这是我们如何处理。我们使用一个环境变量来确定数据库以从其中读取其他配置。环境变量与用户相关联,因此我们为一个用户设置了质量检查的作业,并将作业分配到另一个用户。我们的用户被称为类似SQLQA和SQLstaging,只用于运行作业。然后环境变量指向数据库,我们将其他配置存储在SSIS config中。

Ok this is how we handle. We use an environment variable to determine the database to read teh rest of teh configuration from. Environment variables are associated with users, so we set up the job for QA to one user and the job for staging to another. Our users are called something like SQLQA and SQLstaging and are only used to run jobs. Then the environment variable points to the database where we store the rest of the configurations in SSIS config.

这篇关于在SSIS中动态更改服务器名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆