Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Script New Columns As NULL. In cases when the synchronization of the schema requires adding a NOT NULL column on the target but, no default constraint has been specified then SQL Server the server will reject the action and the synchronization will fail. In such scenarios the best course of action would be to add a default constraint on the source, however, if for one reason or another you cannot add the constraint on the source you can add the column to the target as a "NULL ALLOWED" column to ensure the schema synchronization operation completes successfully. After the synchronization you can connect to the target and handle the changing of that particular column from NULL ALLOWED to NOT NULL.
  • Script New Constraints WITH NOCHECK. When the schema synchronization requires adding new constraints like foreign key constraints and check constraints on tables that contain data there is a it is possible that the existing data violates those constraints in which case SQL Server will reject the action and the synchronization script will fail to execute. To bypass this obstacle and allow the synchronization operation to go through you can choose to add those constraints WITH NO CHECK first and then check to see if the existing data violates the constraint. When this option is ON then Idera SQL schema compare will generate two synchronization scripts that are executed one after the other:
    • Synchronization Script. This will create the new constraints with NOCHECK so the script will execute successfully.
    • Constraint Enabling Script. This script enables the constraints that were created WITH NOCHECK and runs on a separate transaction. If the existing data violates one or more of those constraints then the script will fail but that failure does not affect the overall synchronization of the schemas. In case of failure you will need to address the constraint violations on case by case bases.

...

Scroll pdf ignore

Total compare from data to schema with IDERA SQL Comparison Toolset. Learn more > >