You can use the native Linux command line to run dbForge Studio for SQL Server.
Note
This topic describes the CLI-powered access to the functionality of dbForge Studio installed into a CrossOver bottle. For more information on the command-line functionality of the Studio, refer to the corresponding topics of the documentation.
As an example, let’s see how to compare schemas of two databases from the command line. To do that, run the following command:
"/opt/cxoffice/bin/wine" --bottle "dbForgeStudioSQL" --check --wait-children --start "C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com" /schemacompare /source connection:"Data Source=[server_name/address];Integrated Security=False;User ID=[yourusername]; database=[yourdb]" /target connection:"Data Source=[server_name/address];Integrated Security=False; User ID=[yourusername];database=[yourdb]"
In this example:
"/opt/cxoffice/bin/wine"
…is the command that initiates CrossOver.
--bottle "dbForgeStudioSQL"
…is the parameter that specifies the name of the bottle that contains dbForge Studio for SQL Server.
--check --wait-children --start
…are the options that configure the launch of the application.
"C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com" /schemacompare /source connection:"Data Source=[server_name/address];Integrated Security=False;User ID=[yourusername]; database=[database_name]" /target connection:"Data Source=[server_name/address];Integrated Security=False; User ID=[yourusername];database=[database_name]"
…is the command to run a schema comparison with the specified options.
Let us look at a worked example demonstrating how to compare two SQL Server databases.
"/opt/cxoffice/bin/wine" --bottle "dbForgeStudioSQL" --check --wait-children --start "C:\Program Files\Devart\dbForge Studio for SQL Server\dbforgesql.com" /schemacompare /source connection:"Data Source=172.168.0.132\SQLSERVER2019;Integrated Security=False;User ID=yourusername; database=AdventureWorks2019" /target connection:"Data Source=172.168.0.132\SQLSERVER2019;Integrated Security=False; User ID=yourusername;database=AdventureWorks2019Test"
The schema comparison process begins.
And finishes 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.
"/opt/cxoffice/bin/wine" --bottle "dbForgeStudioSQL" --check --wait-children --start "C:\users\crossover\My Documents\compare.bat"
In this example:
"/opt/cxoffice/bin/wine"
…is the command that initiates CrossOver.
--bottle "dbForgeStudioSQL"
…is the parameter that specifies the name of the bottle that contains dbForge Studio for SQL Server.
--check --wait-children --start
…are the options that configure the launch of the application.
"C:\users\crossover\My Documents\compare.bat"
…is the parameter that specifies the path to the batch file.
Note
You can automate the launch of dbForge Studio from the command line using the standard Linux scheduler.