none
Wrong code page when executing package on server, but correct in Visual Studio RRS feed

  • Question

  • Hi

    I have an ssis packge that loads hard coded strings into a table in a data flow task. The columns of the table are all nvarchar, and the text that is loaded contains the Swedish special letters: "Å Ä Ö". When I check the meta data inside the data flow task, the columns have the data type "DT_WSTR"

    When the package is executed from inside Visual studio, all is fine and the text in the table is exactly as it should be.

    However

    WHen I deploy the very same package to the same server as Visual Studio executed against, and execute it on the server by right clicking on the package, the text that is loaded to the same table is not correct.

    Instead of this:

    "Ack första halvåret t.o.m. april"

    I get this

    "Ack första halvåret t.o.m. april"

    How can this be?

    It seems to me like there is a property on the server that somehow change the codepage?

    I dont know if it matters but the default collation of the server is SQL_Latin1_General_CP1_CI_AS, and that is also the collation of the database.

    Wednesday, January 22, 2020 10:44 AM

All replies

  • Hi TheBIConsultant,

    1. Please confirm that both Visual Studio (dev. environment) and SSIS (run-time environment) on a server load data into the same database.
    2. How do you check correctness of the text in the DB table, via the same SSMS?

    Overall, you need to check two setting in the target DB:

    • Column data type. It shall be VARCHAR(...)
    • Column collation

    • Proposed as answer by Lily Lii Tuesday, January 28, 2020 1:58 AM
    Wednesday, January 22, 2020 2:28 PM
  • Hi TheBiConsultant,

    It seems that the codepage in the server and in Visual Studio should be matched when deploying the package.

    According to Code Page IdentifiersANSI code pages can be different on different computers, or can be changed for a single computer, leading to data corruption. For the most consistent results, applications should use Unicode, such as UTF-8 or UTF-16, instead of a specific code page.

    Best Regards,

    Lily


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by Lily Lii Tuesday, January 28, 2020 1:58 AM
    Thursday, January 23, 2020 9:01 AM
  • Hi TheBiConsultant,

    Do the answers above help you? Appreciate it if there is anything new to update.

    If you find any post in the thread is helpful, you could kindly mark it as answer. This would benefit the community, and also encourage the community member to keep working on your issues.

    Best Regards,

    Lily


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, January 28, 2020 1:59 AM