You can automate schema comparison and synchronization using the command line.
Click Start, and type cmd in the Run line. Press ENTER. The Command Prompt opens.
Type a path to the dbforgesql.com file, located in dbForge Studio for SQL Server installation folder on your PC, and press SPACEBAR.
Type all the arguments (actions you want to run) in the Command Prompt. You can do this in three ways:
/schemacompare /source connection:"Data Source=source_name;Integrated Security=False;User ID=yourusername;
Password=yourpassword;database=database_name" /target connection:"Data Source=tartget_name;
Integrated Security=False;User ID=yourusername;Password=yourpassword;database=database_name"
/schemacompare /compfile:"D:\file_name.scomp"
/argfile:"D:\file_name.txt"
C:\Program Files\Devart\dbForge Studio for SQL Server>dbforgesql.com /schemacompare /argfile:file_name.txt /sync
Tip: To see a quick help on the arguments available in the command line, type the following:
dbforgesql.com /?
Press ENTER to run the process.
/schemacompare
/schemacompare /source connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;User ID=yourusername;
database=AdventureWorks" /target connection:"Data Source=DBMSSQL\MSSQL2012;Integrated Security=False;
User ID=yourusername;database=AdventureWorks"
You can also use the schema comparison document that already contains Source and Target connection strings.
/schemacompare /compfile:"C:\MyComparison.scomp"
/log:"C:\Log.log"
/report:"C:\Report.html"
/sync
/sync:"C:\sync_script_name.sql"
Discover the process of automating database comparisons using PowerShell in conjunction with dbForge Studio for SQL Server.