SQL Doc 2

Using the command line

SQL Doc provides a command line interface so that you can generate database documentation from the command line or in script or batch files.

Before you can use the command line to generate documentation, you must set up a documentation project, generate the documentation at least once, and then save the project. This creates a project file that contains information such as the connection details and objects to document.

To generate documentation, enter a command in the form:

sqldoc /project:project_file

To generate documentation to a different file type, use the /filetype switch to specify the file type. For example:

sqldoc /project:project_file /filetype:doc

The available file types are as follows:

doc

document (.doc)

html

web pages (.html), no frames

html-frames

web pages (.html), using frames

chm

help file (.chm)

For more information about the file types, see About documentation formats.

If the SQL Server for the database has SQL Server authentication and you have not saved the password, use the /password switch to specify the password:

sqldoc /project:project_file /password:password

Getting help from the command line

To display help from the command line, enter:

sqldoc /help

This displays basic help on all the command line switches. For more detailed help, enter:

sqldoc /help /verbose

This displays a detailed description of each switch and the values it can accept (where applicable), and all exit codes. To output the help in HTML format, enter:

sqldoc /help /verbose /html > filename.html

Entering a command

When you enter a command line, the order of switches is unimportant. Separate a switch from its values using a colon as shown below.

/project:MyProject.sqldoc

The colon must not be followed by a space; values that include spaces must be delimited by double-quotes. For example:

/project:"c:\My Project.sqldoc"

Aliases

Many of the switches have an alias. The alias provides a convenient short-hand way to specify the switch. For example, /? is the alias for the /help switch, and /v is the alias for the /verbose switch.

Switches and aliases are not case-sensitive.


Didn't find what you were looking for?