我可以将服务器名称作为列值导出到平面文件目标中吗?

发布于 2025-01-30 08:21:35 字数 297 浏览 3 评论 0 原文

我在SSIS中有一个参数化的OLE DB源连接管理器。由此,我只想检索服务器名称并将其打印在平面文件目的地中。

连接管理器是类似的

"Data Source=TESTSERVER.local;Initial Catalog=TEST_DB;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;"

,我想仅检索 testserver.local.local 并将其用作列值。有人可以在这里帮我吗?

I have a parameterized OLE DB Source connection manager in SSIS. From that I want to retrieve just the server name and print it as a row in a flat file destination.

The connection manager is something like

"Data Source=TESTSERVER.local;Initial Catalog=TEST_DB;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;"

From this I want to retrieve just TESTSERVER.local and use it as a column value. Can anyone please help me here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苍白女子 2025-02-06 08:21:35

对于整个连接字符串,您应该可以访问该参数。

尝试在派生列中两次使用令牌。

TOKEN(TOKEN(Parameter, ";",1), "=",2)

You should have access to that parameter for the whole connection string.

Try using TOKEN twice in a derived column.

TOKEN(TOKEN(Parameter, ";",1), "=",2)

https://learn.microsoft.com/en-us/sql/integration-services/expressions/token-ssis-expression?view=sql-server-ver15

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文