• PI28 (7/27/2015)


    Hi all,

    I want to migrate my table in Sybase to MsSQL. I am using SSIS for this, just truncating the destination mssql table and loading it from sybase. This is the logic.

    One of the columns is of 'image' datatype. In sybase table, the max size of that column is upto 72903 bytes.

    But when I check in mssql after loading, the max size in mssql server is 32768 bytes only.

    So, all my image files are not getting loaded completely and are getting corrupted.

    How can I load my image data completely to mssql? Is there any settings I should set in MsSQL server?

    Thanks

    Don't use the image datatype. It has been deprecated. https://msdn.microsoft.com/en-us/library/ms187993.aspx Instead you should use varbinary(max). As far as the import issue I don't know if that will fix it or not but I suspect there is something else going on as that is the max size for an int. I am guessing that something else in your process is causing the truncation of the image.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/