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

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

问题描述

我的 SSIS 包在开发周期(开发、QA、暂存和生产)中有多个环境,因此我想使用 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?

推荐答案

好的,我们就是这样处理的.我们使用环境变量来确定要从中读取其余配置的数据库.环境变量与用户相关联,因此我们将 QA 作业设置为一个用户,将作业设置为另一个用户.我们的用户被称为 SQLQA 和 SQLstaging 之类的东西,仅用于运行作业.然后环境变量指向我们在 SSIS 配置中存储其余配置的数据库.

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天全站免登陆