This topic describes the CLI-powered access to the functionality of dbForge Schema Compare installed into a CrossOver bottle. For more information on the command-line functionality of dbForge Schema Compare, refer to the corresponding topics of the documentation.
As an example, let’s see how to create a snapshot from the terminal. To do that, run the following command:
/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin/wine --bottle 'dbForge_Schema_Compare' --check --wait-children --start "C:/Program Files/Devart/Compare Bundle for SQL Server/dbForge Schema Compare for SQL Server/schemacompare.com" /snapshot /connection:"User Id=[yourusername];Host=[host]" /database:[database] /password:[yourpassword] /file:"C:\users\crossover\My Documents\backup\file_name.sql"
Where:
Let us look at a worked example command to create a snapshot of the SQL AdventureWorks2016 database that resides on the demo-mssql\SQLEXPRESS server.
/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin/wine --bottle 'dbForge_Schema_Compare' --check --wait-children --start "C:/Program Files/Devart/Compare Bundle for SQL Server/dbForge Schema Compare for SQL Server/schemacompare.com" /snapshot /connection:"User Id=yourusername;Host=demo-mssql\SQLEXPRESS" /database:AdventureWorks2016 /password:yourpassword /file:"C:\users\crossover\My Documents\snapshot\adventureworks2016.sql"
The snapshot has been created successfully.
You can run not only individual commands but also generated batch files (.bat/.cmd files), which are to be created as usual Windows batch files.
Let’s look at an example of code for a batch file.
/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin/wine --bottle "dbForge_Schema_Compare" --check --wait-children --start "C:\users\crossover\My Documents\snapshot.bat"
Where:
Note
You can automate the launch of dbForge Schema Compare from the command line using the standard macOS scheduler.