Limitations Handling

Check udf computed columns Failed

The problem:

  1. The computed columns which use User-defined functions are converted to base type by our product.
  2. This can lead to 'pre-migration-validation' failures, which you can find in the pre-migration-validation summary as:
    Check udf computed columns Failed
  3. If you check the full pre-migration-validation report, you’ll find failures like:
      "error_type": "Check udf computed columns Failed",
      "error_message": "Column '<column_name>' of table <table_name>
    is a computed column which uses a Scalar User defined function.
    These columns will be converted to base data types in the
    target DB, if continued."

  4. After unchecking the pre-migration-validation field you can continue this migration with the limitation.

How to handle post-migration:

  1. For each of the above occurrences, you can handle this by re-creating the columns as desired computed columns in the target database. Follows these steps as detailed in the provided external links regarding the re-creation of columns as computed columns:
    1. Preserve the old data:

      EXEC sp_rename 'MyTable.OldCol', 'RenamedOldCol', 'COLUMN';
    2. Add computed column:

      ALTER TABLE MyTable ADD ComputedCol AS (some expression);
    3. Finally, after validating the computed data, you can drop the preserved column from step 1:

      ALTER TABLE MyTable DROP COLUMN RenamedOldCol;
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request