What are the challenges you face when working across database platforms? Take the survey
Options

Hi I'm using SQL Compare and I'm wanting to migrate a feld from VARCHAR(8000) to VARCHAR(MAX)

VickiHVickiH Posts: 3 New member
I'm getting a warning that data might be truncated.  It seems to me that it would not get truncated since I'm going up in size.  What can I do to make sure my data is not truncated.
Tagged:

Best Answer

  • Options
    VickiHVickiH Posts: 3 New member
    Thank you so much for your response.  Can you clarify what you mean by using SQL Data Compare to create a deployment script for the data?  Do you mean, make a backup copy of the using Data compare?  We have over 10 million records we are working with. 

Answers

  • Options
    Hi @VickiH

    I'm confident that the message is only warning and I don't believe you'll run into any truncation issues, especially since you are going to a higher limit. 

    If you are concerned, I would recommend using SQL Data Compare to create a deployment script for the data in that table so that you have a file to reference should you need to restore any of the previous data. However, I don't think this will be needed.

    Kind regards,

    Kurt McCormick
    Product Support Engineer, Redgate

    Need help? Take a look at our Help Center

  • Options
    Hi @VickiH,

    Certainly. Yes, you are essentially creating a backup insert script of that data.

    Below are some screenshots showing what you would do to create a deployment script within SQL Data Compare. You'll notice that I selected the 'Scripts folder' option as the target, which is limited to the professional license, however you can also use the 'Database' option as well, but you will first have to create a blank database and clone the schema with SQL Compare first.

    The goal here is just to have SQL Data Compare think it's deploying to somewhere, so you can save the deployment script for safe keeping. 





    You can click 'Save Script' here, or click the 'Open script in editor' button to continue opening it up within SSMS.


    Kind regards,

    Kurt McCormick
    Product Support Engineer, Redgate

    Need help? Take a look at our Help Center

  • Options
    VickiHVickiH Posts: 3 New member
    Thank you so very much for these detailed instructions.  I'll study it and see if we can make this work.
Sign In or Register to comment.