Top Features of dbForge Schema Compare for SQL Server (and How to Use Them)
dbForge Schema Compare for SQL Server is a focused tool for comparing and synchronizing database schemas. Below are its top features and concise, actionable steps showing how to use each one.
1. Accurate Schema Comparison
- What it does: Compares objects (tables, views, stored procedures, functions, types, triggers, etc.) between two SQL Server databases, snapshots, or a database and a source control folder.
- How to use:
- Open Schema Compare and set the Source and Target (databases, snapshots, or scripts folder).
- Click Compare.
- Review the results grid showing added, changed, and deleted objects.
- Use filters to focus on object types or change types.
2. Visual Difference Viewer
- What it does: Shows side-by-side object definitions with color-coded differences for quick inspection.
- How to use:
- In the comparison results, select an object marked as different.
- The viewer displays Source and Target definitions side by side.
- Use navigation controls to jump between differences and copy fragments if needed.
3. SQL Synchronization Script Generation
- What it does: Generates a safe, editable synchronization script to apply schema changes from Source to Target.
- How to use:
- After comparing, select the objects to include in synchronization.
- Click Synchronize → choose Create script.
- Review and edit the generated script in the built-in SQL editor.
- Optionally, execute the script directly or save it for deployment.
4. Deployment Preview and Execution
- What it does: Lets you preview deployment actions and execute synchronization with transaction support and backup options.
- How to use:
- From the generated script, choose Synchronize → Deploy.
- Review the deployment summary and enable options (wrap in transaction, create backups).
- Execute and monitor progress; view detailed logs on completion.
5. Filtering and Rule-Based Comparison
- What it does: Apply filters and rules to include/exclude schema objects or ignore specific differences (e.g., whitespace, permissions).
- How to use:
- Open comparison options before running Compare or from results via Options.
- Set rules (ignore owner, ignore filegroup, ignore comments) and object filters (by name pattern or type).
- Re-run Compare or refresh results to apply filters.
6. Schema Snapshots and Baselines
- What it does: Create snapshots to capture schema state for audits, testing, or offline comparison.
- How to use:
- Choose Create snapshot from the database context menu.
- Save snapshot to disk.
- Use snapshot as Source/Target in comparisons to analyze historical changes.
7. Integration with Source Control
- What it does: Compare a live database with a source-controlled scripts folder to keep schema changes in version control.
- How to use:
- Point Source/Target to the database and the scripts folder (local VCS working copy).
- Compare and generate scripts to apply or commit changes to source control.
8. Command-Line and Automation Support
- What it does: Run comparisons and generate synchronization scripts from CLI for CI/CD pipelines.
- How to use:
- Use the command-line utility (check product docs for exact parameters).
- Script comparison and sync steps in build pipelines to automate schema deployments.
9. Detailed Reporting and Logs
- What it does: Produces reports and logs for audits and troubleshooting, including actions taken during synchronization.
- How to use:
- Enable logging in options or choose report generation after comparison.
- Save or export reports for compliance and review.
10. Safe Modification Handling (Dependencies & Order)
- What it does: Detects object dependencies and orders synchronization actions to avoid errors during deployment.
- How to use:
- Let the tool analyze dependencies during Compare.
- Review the planned action order in the generated script and adjust manually only if necessary.
Quick Workflow Example
- Create a snapshot of the production database.
- Compare snapshot (Source) with local development database (Target).
- Review differences using the Visual Difference Viewer.
- Select changes and generate synchronization script.
- Review, enable transaction backup, and deploy in a staging environment.
- Run final comparison to confirm synchronization.
Final Tip
Always create backups or snapshots before deploying schema changes and run synchronization first in a staging environment.
Leave a Reply