Migrate Oracle DB to MSSQL DB Validation Error collum type changed

 

Hi all, 

After Migrate the ALM Oracle DB to MSSQL DB a Validation Error occured. The collum type changed. 

I see the Problem, but cannot change it in my DB Tool. The tables must be recreated, so the  message. 

How is the solution? 

when change from decimal to int:

Best wishes, 

Stefan

Top Replies

  • Verified Answer

    +1  

    Hi Stefan,

    There is a workaround for your reference. Please try it. Thanks

    Workaround:

    1. Rename the column as other name. 

    EXEC sp_rename '[td].[<table_name>].pct_auto_scale', 'pct_auto_scale_bak';

    2.Add the new column 

    alter table [td].[<table_name>] add pct_auto_scale int;

    3. Update the data from pct_auto_scale_bak. 

    update [td].[<table_name>] set pct_auto_scale = pct_auto_scale_bak;

    4. Drop the old column

     alter table [td].[<table_name>] drop column pct_auto_scale_bak;

    Regards,

    Mike Qi

  • 0   in reply to Mike Qi

    Hi Mike, 

    great advice this works fine, a new collum is created with "int"  Data type. 

    Now I have to repeat this for 14 collums in 8 different ALM projects, I got a lot to do. 

    Do you have a advice how to speed up the work? 

    Thank you for the great help, 

    Hugging

    best wishes, 

    Stefan

  • 0   in reply to Stefan Bormet

    Hi Stefan,

    It's my pleasure. 

    There is no other way to speed up. It's dependent on the data in the tables. 

    If you choose the SQL procedure with the cursor, it's also very complex and not saving time. 

    We suggest you migrate the project data by ALM QCP. 

    Otherwise, you can migrate the data from oracle to SQL server by Microsoft "SQL Server Migration Assistant for Oracle (OracleToSQL)". Before you do the migration work, you can create a new empty project with the same DB name for the project DB, then truncate all the tables data. After that, you can use Microsoft Migration Assistant to migrate the data. 

    SQL Server Migration Assistant for Oracle (OracleToSQL)

    https://learn.microsoft.com/en-us/sql/ssma/oracle/sql-server-migration-assistant-for-oracle-oracletosql?view=sql-server-ver16

    Microsoft SQL Server Migration Assistant for Oracle

    https://www.microsoft.com/en-us/download/details.aspx?id=54258

    Regards,

    Mike Qi

  • 0   in reply to Mike Qi

    Great Advice! I will try qcp Migration First! 

    Have a great day! 
    Stefan