Before any sync: back up the target, generate the script, and review it in SSMS. Compare does not auto-execute scripts against production.
Typical Workflows
Deploy Development Changes to Staging
- Connect Dev as Source, Staging as Target
- Run Schema Compare
- Select only the objects you intend to deploy
- Click Schema for target, or For target on one object. Review the Sync Script tab, then execute it on Staging
Audit Production vs DR
- Connect Production as Source, DR as Target
- Run Schema Compare, then Discover + Data Compare on critical tables
- Investigate any Modified / Source Only / Target Only results
Post-Deployment Validation
- Before deployment: compare and note outstanding differences
- After deployment: re-run Compare and confirm differences are resolved
- Export Report as HTML or Excel and keep the file with the release notes
Align Database Configuration
- Connect the desired database as Source and the database to update as Target
- Open Config Compare and select Database configuration
- Review Modified rows such as recovery model, compatibility level, and file growth
- Click Config for target. Comments call out file paths, collation, and other settings that are not changed automatically
- Review the script, then run it on the target
Compare Two Instances
- Connect both SQL Servers. A database selection is not required
- Open Config Compare, leave Instance configuration selected, and click Compare Configuration
- Export the result when you need a record of edition, memory, or
sp_configuredrift
Fail a Pipeline When Schema Drifts
- Put DBLenseCompare.exe on a Windows runner. Open the app once on that machine so the trial or license is stored
- Run
compare --mode schemawith--reportand, if you want object files,--scripts-folder - Treat exit code 1 as a failed check. Exit code 0 means the two databases match. Exit code 2 means the compare itself failed
- Publish the HTML, Excel, XML, or PDF report as a build artifact. Commit the scripts folder when the change is intentional