After you have selected the options to manage synchronization script output and set synchronization options, you can create custom scripts that will be run before or after schema synchronization.
1. To open the synchronization wizard, click Synchronize objects to the target database.
2. In the Schema Synchronization Wizard that opens, switch to the Additional Scripts tab to add pre and/or post scripts.
3. To insert the script to be executed before schema synchronization, select the Scripts to execute before check box and then select either of the following options:
For example, you need to create partition tables in the target database. However, there are no files and filegroups in that database. Schema Compare works only with database-level objects, all server-level objects will not be included in the comparison and, thus, in the synchronization script. In this case, you can run the script before schema synchronization.
4. To insert the script to be executed after schema synchronization, select the Scripts to execute after check box and then select either of the following options:
5. Optional: Switch to the Summary tab and verify the synchronization options.
6. After you’ve configured the synchronization options, click Synchronize.