This project use ANTLRv4 to parse TSql schema and build two compare file and one update schema.
Extract from SqlManagement the database creation schemas of the origin and destination databases.
- Choose the origin schema database.
- Choose the destination schema database.
- Choose an output directory where errors and diff schema will be saved
- Load schema.
- Choose a file name. It will contain the update schema.
- Choose the db objects that you want compare or you want update.
- Choose a suffix(_diff is the default) and click compare to generate two files with the difference between schemas.
- Click create update file to create a file with sql statement to modify the destination as origin database.
Use clear to load other schemas
The compare feature creates two files that you can compare with WinMerge or other tool for comparing file. This feature discard from the schemas the objects that are equals and put in the files the creation statements that are different. They are ordered alphabetically. You can choose the output directory where create the diff files and a suffix.
The name of the diff files created are:
- origin + suffix.extensionOfOriginFile
- destination + suffix.extensionOfDestinationFile
An ErrorCompare.txt file is created with errors when parsing.
Update feature creates an update schema from origin to destination. You can choose the name of update schema file.
An erro file is created with errors when parsing with name:
- UpdateSchemaFileName + _errorsUpdateSchema.extensionOfUpdateSchemaFileName