Automate and schedule SQL database synchronization from the Command Line - dbForge Compare Bundle

Automate and schedule SQL database synchronization from the Command Line - dbForge Compare Bundle


In this demo, we will show you:

- How to set up the deployment of changes from the source databases to the target ones,
- How to create a *.bat file using the Command-Line Wizard,
- How to create a daily database synchronization task using Windows Task Scheduler.

We will be using dbForge Compare Bundle, a powerful set of tools for handling changes in SQL Server data and schemas.
It contains two separate tools: Data Compare and Schema Compare.
The Schema Comparison Wizard opens for you to check the databases you want to compare and set the options as required.
To sync DB diffs, you can use the Command-Line Wizard that allows setting up the deployment options and preview the contents of the *.bat file.
You can configure the Windows Task Scheduler to automatically run the synchronization.

⭐️Timestamps:
00:38 Let's compare two SQL databases on different servers.
00:52 Select Source and Target Databases.
1:10 configuring the comparison options.
1:20 Start the comparison process to detect differences between the two databases.
1:35 Create the batch file for database synchronization using the Command-Line Wizard.
1:58 Run the *.bat file to deploy the changes directly to the database.
2:03 Check successful deployment of the detected differences.
02:55 Configure the Windows Task Scheduler to automatically run the synchronization.
03:45 Test out the scheduled task for synchronization databases differences.

👉🏽That's it! Try it yourself - just download a 30-day free trial of dbForge Compare Bundle
https://www.devart.com/dbforge/sql/compare-bundle/download.html
Start saving time and effort when performing routine database comparison and deployment tasks.
👉🏽Check more useful information:
https://www.devart.com/dbforge/sql/compare-bundle/
►Subscribe to the Devart Youtube channel:
https://www.youtube.com/user/DevartSoftware

#CompareBundle
#SchemaCompare
#DataCompare
#SQLServer
#SQLDatabase
#dbForge
#Devart
Closed Caption:

[Music]
in this demo we will show you how to set
up the deployment of changes from the
source databases to the target ones how
to create a batch file using the command
line wizard how to create a daily
database synchronization task using
windows task scheduler
we will be using db forge compare bundle
a powerful set of tools for handling
changes in sql server data in schemas it
contains two separate tools data compare
and schema compare
let's say we want to compare the bicycle
store dev database which is our
development database with bicycle store
stage which is as its name implies our
staging database
note that these databases reside on
different servers
to compare them we should first invoke
the schema comparison ssms add-in on
bicycle store dev
as you can see it gets set as the source
now just drag bicycle store stage to the
target area to compare it against
bicycle stored dev
you can see the bicycle store stage is
set as the target
to move on to configuring the comparison
hit the start comparison button
the schema comparison wizard opens for
you to check the databases you want to
compare and set the options as required
now let's start the comparison
as we can see the schema comparison
process is extremely fast you can see
that schema compare has detected
differences between the two databases
let's synchronize these differences
considering that we want to deploy the
changes to the database directly
let's invoke the command line wizard
that allows setting up the deployment
options and preview the contents of the
batch file next we save the batch file
to a new folder
finally we run the file to deploy these
differences
let's check whether they have been
deployed successfully to do that go back
to the tool and click refresh
bingo the databases are identical
now we make a change to the development
database by adding a new column to the
table
let's check whether schema compare will
detect that change
as you can see it copes well with the
task
now we launch the batch file once again
and check whether the tool will deploy
the change we have made
yes the databases are identical so every
time you launch the batch file schema
compare synchronizes the target database
with the source one
having created the batch file for the
database synchronization we can
configure the windows task scheduler to
automatically run the synchronization in
the task scheduler window that opens
navigate to the actions pane and click
create basic task to create a scheduled
task
next in the create basic task window
that opens enter the name in the
description of the task and click next
on the trigger tab choose when to launch
the task and then click next
on the action tab select start a program
and then click next
on the start a program sub tab click
browse to select the batch file you have
created with the help of schema
synchronization wizard and then click
next
on the finish tab verify the settings
and click finish
now let's make yet another change to the
database
schema compare detects it perfect as
always
let's have a look at our scheduled task
it is set to be launched every day at
the specified time but we don't want to
wait and so we force the task to test it
out as you can see task scheduler has
launched our task
and the differences have been
successfully deployed
that's it try it yourself just download
a 30-day free trial of db forge compare
bundle and start saving time and effort
when performing routine database
comparison and deployment tasks

Video Length: 04:36
Uploaded By: Devart
Published: 10/7/2021
View Count: 5,604

Related Software Products
dbForge Compare Bundle for SQL Server
dbForge Compare Bundle for SQL Server

Published By:
Devart

Description:
dbForge Compare Bundle for SQL Server: Schema Compare and Data Compare, 37-40% Cheaper Together dbForge Compare Bundle for SQL Server is Devart's pack of two Windows tools (both also usable from SSMS): dbForge Schema Compare for SQL Server, which finds structural differences and writes the T-SQL deployment script, and dbForge Data Compare for SQL Server, which finds differing rows and writes the data sync script. Professional costs $359.95 a year...


Related Videos
Compare and deploy database schemas with dbForge Schema Compare for SQL Server
Compare and deploy database schemas with dbForge Schema Compare for SQL Server

Video Length: 03:16
Uploaded By: Devart (7/11/2019)
View Count: 4,938

Database Data Synchronization - using dbForge Data Compare for SQL Server
Database Data Synchronization - using dbForge Data Compare for SQL Server

Video Length: 04:54
Uploaded By: Devart (1/23/2023)
View Count: 2,178

Get started with dbForge Schema Compare
Get started with dbForge Schema Compare

Video Length: 02:09
Uploaded By: Devart (3/21/2022)
View Count: 1,041

Copyright © 2026, Ivertech. All rights reserved.