SSIS package while running from SQL server agent Job, converts dot to comma in exported csv file.

Deeba Parveen 1 Reputation point
2021-12-27T12:35:23.91+00:00

Hello all,

I have created a SSIS package that is extracting data from a database table to a CSV file.

When I run the package directly from SSIS Catalog it is working OK ( the decimal point is a point) but when I call the same package from a SQL Server Agent job of an instance located on the same server as SSIS, the output CSV file will have the comma instead of a decimal point that is messing the columns of csv.

Output from CSV:

Col1 Col2
11.5 15.2

Output from SQL Job:

Col1 Col2
11, 5 15, 2

Any help would be appreciated.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
Developer technologies Transact-SQL
SQL Server Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 26,586 Reputation points
    2021-12-27T13:27:09.227+00:00

    Hi @Deeba Parveen ,

    SSIS is using a Flat File connection in the Flat File Destination.
    Flat File destination has a LocaleID property that controls commas, dots, etc.

    It seems that the SQL Server Agent job is using a modified connection via a different SSIS Environment.
    So, you need to check that setting.

    160684-ssis-flat-file-connection.png

    0 comments No comments

  2. Tom Phillips 17,771 Reputation points
    2021-12-27T13:44:01.68+00:00
    0 comments No comments

  3. ZoeHui-MSFT 41,491 Reputation points
    2021-12-28T01:58:42.233+00:00

    Hi @Deeba Parveen ,

    The issue seems to be the Locale settings of the file connection in SSIS are different to the language settings in SQL Server.

    In SSIS, go to the Properties window for your File Connection (Right-click->Properties). There should be a setting for LocaleID that will need to be set to match SQL Server (or to English).

    You may refer how-to-import-a-flat-file-without-changing-regional-settings-on-the-deployment-s

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.