Command-line mode on macOS

You can use Terminal to run dbForge Documenter for SQL Server on a Mac.

Note

This topic describes the CLI-powered access to the functionality of dbForge Documenter installed into a CrossOver bottle. For more information on the command-line functionality of Documenter, refer to the corresponding topics of the documentation.

As an example, let’s see how to compare schemas of two databases from Terminal. To do that, run the following command:

/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin/wine --bottle 'dbForge_Documenter' --check --wait-children --start "C:\Program Files\Devart\dbForge Documenter for SQL Server\documenter.com" /document /connection:"Data Source=[server_name/address];Integrated Security=False;User ID=[yourusername]; database=[database_name]" 

In this example:

/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin/wine

…is the command that initiates CrossOver.

--bottle 'dbForge_Documenter'

…is the parameter that specifies the name of the bottle that contains dbForge Documenter for SQL Server.

--check --wait-children --start

…are the options that configure the launch of the application.

"C:\Program Files\Devart\dbForge Documenter for SQL Server\documenter.com" /document /connection:"Data Source=[server_name/address];Integrated Security=False;User ID=[yourusername]; database=[database_name]" 

…is the command to document a database with the specified options.

Worked example

Let us look at a worked example demonstrating how document a SQL Server database.

/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin/wine --bottle 'ddbForge_Documenter'--check --wait-children --start "C:\Program Files\Devart\dbForge Documenter for SQL Server\documenter.com" /document /connection:"Connection Timeout=20;Data Source=DBFSQLSRV\SQL2019;Initial Catalog=AdventureWorks2019;Integrated Security=False;Packet Size=1024;User ID=yourusername"

The process begins. And finishes successfully.

Creation of documentaion from CLI

Run a batch file

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_Documenter" --check --wait-children --start "C:\users\crossover\My Documents\document.bat" 

In this example:

/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin/wine

…is the command that initiates CrossOver.

--bottle 'dbForge_Documenter'

…is the parameter that specifies the name of the bottle that contains dbForge Documenter for SQL Server.

--check --wait-children --start

…are the options that configure the launch of the application.

"C:\users\crossover\My Documents\document.bat"

…is the parameter that specifies the path to the batch file.

Note

You can automate the launch of dbForge Documenter from the command line using the standard macOS scheduler.