如何在不更改部署服务器上的区域设置的情况下导入平面文件? [英] How to import a flat file without changing regional settings on the deployment server?

查看:142
本文介绍了如何在不更改部署服务器上的区域设置的情况下导入平面文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在SSIS(2005/2008)中读取文本文件。我创建了到文件的连接并放置了平面文件源,并且在预览中工作正常,但是当我尝试运行时,出现错误提示:

I am trying to read a text file in SSIS (2005/2008). I created a connection to the file and placed flat file source, and it works fine in preview but when I try to run I get error saying:

[Derived Column [91848]] 
Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR

因此,我确定有几列使用小数点分隔的小数点。但是由于我在斯堪的纳维亚环境中工作,因此服务器希望逗号作为分隔符。

So I have identified that there are couple of columns with decimal numbers which use period as delimiters. But since I work in Scandinavian environment, the servers expect comma as delimiters.

有效的方法是在Windows服务器上的区域设置中手动将定界符从逗号更改为句点,但这不是适当的解决方案。

What works is manually changing delimiter from comma to period in regional settings on the windows server but this is not an adequate solution.

如何在不更改部署程序包的服务器上的区域设置的情况下使用SSIS导入平面文件?

How do I import the flat file using SSIS without having to change the regional settings on the server where the package is deployed?

推荐答案

您应该能够设置 LocaleID 在平面文件连接对象上。这将在读取文件时应用英语语言环境设置,而不会影响计算机上的其他内容。 (在属性窗口中查看,而不是在编辑器对话框中。)

You should be able to set the LocaleID on the Flat File connection object. That will apply the English locale settings when reading that file without affecting the other things on your computer. (Look in the Properties window, not the Editor dialog.)

右键单击 连接管理器下的平面文件连接 部分,然后选择 属性 。您还可以选择平面文件连接管理器,然后按 F4 查看属性。

Right-click on the flat file connection under Connection Managers section and select Properties. You can also select the flat file connection manager and press F4 to view the properties.

设置 LocaleID 根据您的喜好。

这篇关于如何在不更改部署服务器上的区域设置的情况下导入平面文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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