ApexSQL Doc Command Line Interface (CLI) switches

Applies to
ApexSQL Doc

Summary
This article explains the ApexSQL Doc CLI switches, and their usage through the examples.

Description

Using the CLI in ApexSQL Doc allows you to set the documenting process for SQL databases, SSIS packages, SSAS cubes, SSRS items, Tableau server sites and automate the documenting process. Using an argument file or a project file allows you to save the settings into one of these files and run it in the CLI.

Connection switches

/database_engines Include specific database engine servers and databases
Alias: /dbes
Format: /database_engines:“[server]
.[database1].[database2]:user.password”
/integration_services_
packages
Include specific Integration services packages from SQL Server package store
Alias: /isps
Format: /integration_services_packages:services:
SQL2014.”package1”.”package2”[:password]
/analisys_services_
databases
Include specific Analysis services database engine servers and databases
Alias: /asdb
Format: /analisys_services_databases:“[server].[database1].[database2]:user.password”
/package_files Include specific package files from the file system
Alias: /pfs
Format: /package_files:“packagepath”:[password]
/sql_server_packages Include specific packages from SQL Server
Alias: /ssp
Format: /sql_server_packages:server.user
.password:”package1”.”package2”
Quick tip icon

Quick tip:

SQL Server or Integration Service name can be: server name/service name or [ipaddress].

/integration_
services_
catalog
Include specific Integration services packages from SSIS DB Catalog
Alias: /isdbc
Format: /integration_services_database_
catalog:“[server]“:package1.package2
/integration_
services_
project_file
Include specific Integration services project files
Alias: /ispf
Format: /integration_services_project_file:
“ssisprojectfilepath“:package1.package2
/exclude_databases Treat databases as an exclude list
Alias: /ed
/exclude_database_
engines
Specifies server and exclude database list
Alias: /edbes
Format: /exclude_database_engines:“[server]
.[database1].[database2]:user.password”

Note: server can be either server name or
[ipaddress]
/exclude_integration_
services_packages
Specifies Integration services package store and excludes the package list
Alias: /eisps
Format: /exclude_integration_services_packages:
services:SQL2014.”package1”.”package2”
[:password]
/exclude_analisys_
services_databases
Specifies Analysis services server and exclude SSAS database list
Alias: /easdb
Format: /exclude_analisys_services_databases:
“[server].[database1].[database2]:user.password”

Note: server can be server name or [ipaddress]
/exclude_sql_server_
packages
Specifies SQL Server and an exclude the package list
Alias: /essp
Format: /exclude_sql_server_packages:
server.user.password:”package1”
.”package2”

Note: server can be either server name or [ipaddress]
/reporting_services_
items_from_file
Include Reporting Services items from the file system
Alias: /rsff
Format: /reporting_services_items_from_
file:“ssrsitempath1”.”ssrsitempath2”
/exclude_reporting_
services_items_
from_file
Exclude Reporting Services items from file
Alias: /ersff
Format: /exclude_reporting_services_
items_from_file:“ssrsitempath1”
.”ssrsitempath2”
/reporting_services_
items_from_native
Include Reporting Services items from the Native web service
Alias: /rsfn
Format: /reporting_services_items_from_native:[nativeservice].[folder]
Note: specifying a folder is optional
/exclude_reporting_
services_items_
from_native
Exclude Reporting Services items from Native web service
Alias: /ersfn
Format: /exclude_reporting_services_
items_from_native:[nativeservice].[folder]
/reporting_services_
items_from_sharepoint
Include Reporting Services items from the SharePoint web service
Alias: /rsfs
Format: /reporting_services_items_from_
sharepoint:[webservice].[folder]
.[user].[password]
/exclude_reporting_
services_items_
from_sharepoint
Exclude Reporting Services items from SharePoint web service
Alias: /ersfs
Format: /exclude_reporting_services_items_
from_sharepoint:[webservice].[folder]
.[user].[password]
/tableau_server_sites Include Tableau Server sites into the processing
Alias: /tss
Format: /tableau_server_sites:server
.site1.site2[:user[.password]]
/exclude_tableau_
server_sites
Specifies Tableau Server and exclude sites list
Alias: /etss
Format: /exclude_tableau_server_sites:
server.site1.site2[:user[.password]]
/tableau_online_sites Include Tableau Online sites into the processing
Alias: /tos
Format: /tableau_online_sites:server
.site[:user[.password]]
/database_snapshot Include database snapshot into the processing
Alias: /dbsnp
Format: /database_snapshot:“shapshotpath”
/sharepoint_farm Include SharePoint farm into the processing.
Mandatory argument is [connect]. If no other SharePoint switch is present, the switch includes all objects and options.
Alias: /sp
Format: /sp:connect
/sharepoint_server_
object_details
Include specific SharePoint server object details
Alias: /spobj
If no SharePoint option switch is specified, the switch selects all options for the specified objects

[appm] – include Application management section
[app] – include Application section
[bnr] – include Backup and restore section
[frmo] – include Farm overview section
[gas] – include General application settings section
[mon] – include Monitoring section
[secu] – include Security object section
[sif] – include Servers in farm object section
[sos] – include Services on server object section
[syss] – include System settings object
[upam] – include Update and migration object
[usrl] – include User licensing object
/sharepoint_server_
options_details
Include options for SharePoint object details
Alias: /spopt

[spdb] – include database as part of Application management
[ssa] – include service applications as part of Application management
[scol] – include site collection as part of Application management
[wapp] – include web applications as part of Application management
[appu] – include Application URLs as part of Application
[appl] – include Applications licenses as part of Application
[mapp] – include Monitored applications as part of Application
[bh] – include Backup history as part of Backup and restore
[bs] – include Backup settings as part of Backup and restore
[cdbs] – include Content databases as part of Farm overview
[sif] – include Servers in farm as part of Farm overview
[wasc] – include Web applications and site collections as part of Farm overview
[cd] – include Content deployment as part of General application settings
[esc] – include External service connections as part of General application settings

Export options

/create_database_
snapshot
Specify the database to create a database snapshot
Alias: /cdbsnp
/database_snapshot_
output_directory
Specify the output directory in which the database snapshot will be created
Alias: /dbsnpod
/database_snapshot_
file_name
Specify the file name of the database snapshot that will be created
Alias: /dbsnpfn
/intermediary_files_
location
The intermediary files location
Alias: /ifl
Note: If the switch is omitted, the default directory is used
/intermediary_files_
keep
Keep intermediary files
Alias: /ifk
Quick tip icon

Quick tip:

Using this switch allows you to keep the intermediary files and edit them after the documentation is finished. Once edited, those files can be compiled manually to CHM. If the switch is omitted, the intermediary files will be deleted after the documentation is created.
Note: This applies only when the output format is set to chm

/compile_timeout Specifies the chm compilation timeout in minutes
Alias: /cti
Note: the default value is 600 seconds (10 minutes)
/output_directory Specifies the output directory
Alias: /od
Note: if the switch is omitted, the current directory is used
/output_name Specifies the filename template for CHM files, or the directory name template for the HTML documentation. A full or relative path cannot be used here
Alias: /on
Note: If the switch is omitted “/output_name:[servername].[databasename]” format is used
/output_type Specifies the output file format type

  • chm [chm]
  • html [htm]
  • doc [doc]
  • docx [docx]
  • pdf [pdf]

Alias: /ot
Format: “/output_type: [chm]
Note: If the switch is omitted, documentation will be created in CHM output format

Specific options

/include Include specific objects specified via regular expressions.
Alias: /inc
Format: “/include:Server1.Database1
.TypeConstant1: Expr1

(TypeConstant is a bitwise value of the object type)
/exclude Exclude specific object specified via regular expressions.
Alias: /exc
Format: “/exclude:Server1.Database1
.TypeConstant1: Expr1

(TypeConstant is a bitwise value of the object type)
/server_include Include specific server objects specified via regular expressions.
Alias: /sinc
Format: “/server_include:Server1
.TypeConstant1:Expr1

(TypeConstant is a bitwise value of the object type)
/server_exclude Exclude specific server objects specified via regular expressions.
Alias: /sexc
Format: “/server_exclude Server1
.Typeconstant1:Expr1

(TypeConstant is a bitwise value of the server object type)
/comments Document user comments.
Alias: /dc
Note: If the switch is omitted, an empty string will be used.
/stylesheet Specifies the style sheet file path.
Alias: /sf
Note: If the switch is omitted, default path will be ‘/sf:Templates\style.css’.
/date_format Specifies date format.
Alias: /df
Note: If the switch is omitted “/df:mm/ss/yyyy” format will be used.
/collapsible_sections Make documentation sections collapsible.

DEFAULT – Default
NONE – None
Alias: /cs

/optional_items Optional documentation settings.

ExtProperties [e] – include the “Extended properties” section
ResultSet [s] – include the “Result Set” section
Glossary [g] – include the “Glossary” section
ShowDefaultOwner [do] – use the default owner/schema qualification in the generated documentation
DDL [dd] – include the “DDL” section
DataModels [dm] – include the ‘Data model’ section
None [n] – None of the available options
Default [d] – Default options (Extended properties, Result set, Glossary, DDL)
Alias: /oi

/performance_
intensive_items
Performance intensive settings.

SyntaxHighlighting [h] – include the “Syntax highlighting” section
GrDeps [dp] – include the “Graphical dependencies” section
Dependencies [de] – include the “Dependencies” section
ExplicitlyParse [ep] – explicitly parse the database
StatisticalDataAnalysis [sd] – include the “Statistical data analysis” section
IncludeSystemObjects [is] – include system objects in processing
DDL [dd] – include the “DDL” section
ResultSet [s] – include the “Result Set” section
Bookmarks [b] – include bookmarks and hyperlinks
ExtraAttributes [ea] – Include “Data size KB”, “Index size KB”, “Creation date” in “Tables”, and “Default”, “IsGUID”, “SPARSE”, “Computed value” in “Columns” documentation.
None [n] – None of the available options
Default [d] – Default (SyntaxHighlighting, Dependencies, DDL and Resultset)
Alias: /pi

/groupings Additional grouping settings.

GroupOwner [o] – include the “Owner” grouping
GroupFilegroup [f] – include the “Group filegroup” grouping
GroupPartitionScheme [p] – include the “Group partition scheme” grouping
ShowWordToc [t] – Include TOC in Word documentation
None [n] – None of the available options
Default [d] – Default (GroupOwner, GroupFilegroup, GroupPartitionScheme)
Alias: /gr

/empty_items Empty item settings.

ShowEmptySections [s] – include the “Show empty sections” section
ShowEmptyNodes [nd] – include the “Show empty nodes” section
ShowSrvNode [ssn] – show the Server node as the index one when documenting in .chm
ShowExternalProperties [exp] – include the ‘Graphical dependencies’ section
None [n] – None of the available options
Default [d] – Default (ShowEmptySections, ShowEmptyNodes)
Alias: /em

/database_details Database details.

DatabaseSummaryInfo [ds] – include database summary information
None [n] – None of the available options
Default [d] – Default (DatabaseSummaryInfo)
Alias: /dbd
Note: arguments can be combined

/server_details Server details.

Properties [sp] – include the “Server info” section
None [n] – None of the available options
Default [d] – Default (Properties)
Alias: /srd

/ssis_details Integration Service details.

ConnectionManagers [cm] – include the “Connection managers” section
ControlFlowDiagrams [cfd] – include control flow diagrams
DataFlowDiagrams [dfd] – include data flow diagrams
EventHandlers [eh] – include the “Event Handlers” section
Executables [ex] – include the “Executables” section
LogProviders [lp] – include the “Log providers” section
PrecedenceConstraints [pc] – include the “Precedence constraints” section
Variables [vr] – include the “Variables” section
SystemVariables [sysvr] – include system variables
IncludePackageSource [ps] – Include package source (*.dtsx)
None [n] – None of the available options
Default [d] – Default (ConnectionManagers, EventHandlers, Executables, LogProviders, PrecedenceConstraints and Variables)
Alias: /isd

/ssas_details Analisys Services details.

DataSources [das] – include “Data sources” section
DataSourceViews [dsv] – include “Data sources views” section
Cubes [cub] – include “Cubes” section
Dimensions [dim] – include “Dimensions” section
MiningStructures [ms] – include “Mining structures” section
Connections [con] – include “Connections” section
Tables [tb] – include “Tables” section
Perspectives [per] – include “Perspectives” section
Roles [rol] – include “Roles” section
MultidimensionalRoles [mrol] – include “Multidimensional roles” section
None [n] – None of the available options
Default [d] – Default (DataSources, DataSourceViews, Cubes, Dimensions, MiningStructures, MultidimensionalRoles, Connections, Tables, Perspectives and roles)
Alias: /asd

/project Specifies the project file path.
Alias: /pr
/includes Specifies the selection profile path.
Alias: /i
Note: If the switch is omitted, all objects are selected.
/object_types Specifies the bitwise set of object types.
Alias: /o
Note: If the switch is omitted, all object types will be processed.
/server_object_types Specifies the bitwise set of server object type.
Alias: /so
Note: If the switch is omitted, all server object types will be processed.
/treat_list_as_
exclude
Treat the selection profile/selection in a project file as an exclude list.
Alias: /te
/treat_server_
list_as_exclude
Treat the server selection profile/selection in a project file as an exclude list.
Alias: /tse
/title Specifies the documentation title template.
Alias: /tt
Note: If the switch is omitted, default tile will be ‘Database Documentation: /tt:[servername].[databasename]’.
/extended_property Specifies the main extended property name.
Alias: /ep
Note: If the switch is omitted, the ‘MS_Description’ is used.
/copyright_link Specifies the copyright link.
Alias: /cl
Format: “/cl:http://www…
Note: If the switch is omitted, ‘http://’ will be used.
/copyright_text Specifies the copyright text.
Alias: /ct
Note: If the switch is omitted, ‘© – All Rights Reserved’ will be used.
/top_text Specifies top custom text.
Alias: /ut
Note: If the switch is omitted, /ut<DIV ALIGN=CENTER><B><FONT COLOR=”Gray”>“Top Custom Text”</FONT></B> </DIV><HR SIZE=”1″>” will be used.
/bottom_text Specifies bottom custom text. ‘<HR
Alias: /bt
Note: If the switch is omitted, /bt:'<DIV ALIGN=CENTER><B><FONT COLOR=”Gray”>“Bottom Custom Text”</FONT></B> </DIV><HR SIZE=”1″> will be used.
/author Specifies the document author.
Alias: /da
Note: If the switch is omitted, an empty string will be used.
/page_size Specifies report page size.
A3
A4
Alias: /ps
Note: These arguments cannot be combined.
/page_orientation Change page orientation.
Landscape
Portrait
Alias: /po
Note: These arguments cannot be combined.
/custom_text Specifies custom text.
Alias: /cst
/custom_text_header Specifies custom text header.
Alias: /csth
/custom_text_footer Specifies custom text footer.
Alias: /cstf
/font_family Specifies custom text font family.
Arial
ArialBlack
ArialNarrow
Courier
SegoeUI
Tahoma
TimesNewRoman
Alias: /ff
Note: These arguments cannot be combined.
/font_family_header Specifies header font family.
Arial
ArialBlack
ArialNarrow
Courier
SegoeUI
Tahoma
TimesNewRoman
Alias: /ffh
Note: These arguments cannot be combined.
/font_family_footer Specifies footer font family.
Arial
ArialBlack
ArialNarrow
Courier
SegoeUI
Tahoma
TimesNewRoman
Alias: /fff
Note: These arguments cannot be combined.
/text_color Specifies custom text color.
Alias: /tc
/text_color_header Specifies custom text header color.
Alias: /tch
/text_color_footer Specifies custom text footer color.
Alias: /tcf
/image Specifies custom logo.
Alias: /img
/image_position Specifies position of the custom logo.
Header
Footer
HeaderAndFooter
Alias: /imp
Note: These arguments cannot be combined.
/text_align Specify text alignment.
Left
Right
Center
Alias: /ta
Note: These arguments cannot be combined.
/text_align_header Specifies header text alignment.
Left
Right
Center
Alias: /tah
Note: These arguments cannot be combined.
/text_align_footer Specifies footer text alignment.
Left
Right
Center
Alias: /taf
Note: These arguments cannot be combined.
/text_bold Specifies bold text.
Alias: /tb
/text_bold_header Specifies header bold text.
Alias: /tbh
/text_bold_footer Specifies footer bold text.
Alias: /tbf
/text_italic Specifies italic text.
Alias: /ti
/text_italic_header Specifies header italic text.
Alias: /tih
/text_italic_footer Specifies footer italic text.
Alias: /tif
/text_underline Specifies underline text.
Alias: /tu
/text_underline_
header
Specifies header underline text.
Alias: /tuh
/text_underline_
footer
Specifies footer underline text.
Alias: /tuf
/font_size Specifies font size.
Alias: /fs
/font_size_header Specifies header font size.
Alias: /fsh
/font_size_footer Specifies footer font size.
Alias: /fsf
/option_presets Specifies option presets.
Alias: /op
/server_objects_
all
Includes all server objects in documentation.
Alias: /sina
/server_objects_
none
Excludes server objects from documentation.
Alias: /sinn

Object type options

/datatype_options Datatype options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Columns [cl] – include the “Columns” section
None [n] – None of the available options
Default [d] – Default (Properties, Columns)
Alias: /dto

/default_options Defaults options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Columns [cl] – include the “Columns” section
None [n] – None of the available options
Default [d] – Default (Properties, Columns)
Alias: /dfo

/function_options Function options.

Permissions and Recordsets if the switch is omitted
Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Parameters [pa] – include the “Parameters” section
Recordset [rs] – include the “Recordsets” section
Permissions [pe] – include the “Permissions” section
Options [op] – include the “Options” section
None [n] – None of the available options
Default [d] – Default (Properties, Options, Parameters, Permissions, Recordsets)
Alias: /fno

/procedure_options Procedure options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Parameters [pa] – include the “Parameters” section
Permissions [pe] – include the “Permissions” section
Options [op] – include the “Options” section
None [n] – None of the available options
Default [d] – Default (Properties, Options, Parameters, Permissions)
Alias: /pro

/role_options Role options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
DbPermissions [dp] – include the “Database permissions” section
Permissions [pe] – include the “Permissions” section
Users [us] – include the “Users” section
None [n] – None of the available options
Default [d] – Default (Properties, Users, Permissions)
Alias: /roo

/rule_options Rule options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Columns [cl] – include the “Columns” section
None [n] – None of the available options
Default [d] – Default (Properties, Columns)
Alias: /ruo

/table_options Table options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Indexes [ix] – include the “Indexes” section
ExplicitIndexes [eix] – include the “Indexes” sub node
Columns [cl] – include the “Columns” section
Permissions [pe] – include the “Permissions” section
CreationOptions [cr] – include the “Creation options” section
Triggers [tr] – include the “Triggers” section
ExplicitTriggers [etr] – include the “Triggers” sub node
Statistics [st] – include the “Statistics” section
ExplicitStatistics [est] – include the “Statistics” sub node
Checks [ch] – include the “Checks” section
Identity [it] – include the “Identity” section
Relationships [rl] – include the “Relationships” section
ExplicitRelationships [erl] – include the “Relationships” sub node
Collations [ct] – include the “Collations” section
Options [op] – include the “Options” section
StatisticalDataAnalysis [sd] – include the “Statistical data analysis” section
None [n] – None of the available options
Default [d] – Default (Checks, Columns, CreationOptions, Collations, Identity, Indexes, Options, Permissions, Properties, Relationships, Statistics, Triggers)
Alias: /tbo

/trigger_options Trigger options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Options [op] – include the “Options” section
Type [tp] – include the “Type” section
None [n] – None of the available options
Default [d] – Default (Properties, Options, Type)
Alias: /tro

/user_options User options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Objects [ob] – include the “Objects” section
DbPermissions [dp] – include the “Database permissions” section
Permissions [pe] – include the “Permissions” section
Roles [ro] – include the “Roles” section
None [n] – None of the available options
Default [d] – Default (Properties, Objects, Permissions, Roles)
Alias: /uso

/view_options View options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Indexes [ix] – include the “Indexes” section
ExplicitIndexes [eix] – include the “Indexes” sub node
Columns [cl] – include the “Columns” section
Permissions [pe] – include the “Permissions” section
Options [op] – include the “Options” section
Triggers [tr] – include the “Triggers” section
ExplicitTriggers [etr] – include the “Triggers” sub node
Statistics [st] – include the “Statistics” section
ExplicitStatistics [est] – include the “Statistics” sub node
None [n] – None of the available options
Default [d] – Default (Columns, Indexes, Options, Properties, Statistics, Permissions, Triggers)
Alias: /vio

/assembly_options Assembly options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /aso

/asymmetric_key_
options
Asymmetric key options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /ako

/certificate_options Certificate options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /cko

/contract_options Contract options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /cto

/ddltrigger_options DDL trigger options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Options [op] – include the “Options” section
None [n] – None of the available options
Default [d] – Default (Properties, Options)
Alias: /ddo

/event_notify_options Event notification options.

Extended Properties [expr] – include the “Extended properties” section
None [n] – None of the available options
Default [d] – Default (Properties)
Alias: /eno

/ft_catalog_options Fulltext catalog options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /fco

/ft_stoplist_options Fulltext stoplist options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /fso

/message_type_options Message type options.

Properties [pr] – include the “Properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /mto

/pfunction_options Partition function options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
None [n] – None of the available options
Default [d] – Default (Properties)
Alias: /pfo

/pscheme_options Partition scheme options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
None [n] – None of the available options
Default [d] – Default (Properties)
Alias: /pso

/queue_options Queue options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /quo

/remote_service_
options
Remote service binding options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /rso

/route_options Route options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /rto

/schema_options Schema options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
Objects [ob] – include the “Objects” section
None [n] – None of the available options
Default [d] – Default (Properties, Objects, Permissions)
Alias: /sho

/service_options Service options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /sro

/sequence_options Sequence options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /seo

/search_property_
list_options
Search property list options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /splo

/symmetric_key_
options
Symmetric key options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /sko

/synonym_options Synonym options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /sno
Note: If the switch is omitted, combination of Properties and Permissions is used.

/xml_schema_options XML schema collection options.

Properties [pr] – include the “Properties” section
Extended Properties [expr] – include the “Extended properties” section
Permissions [pe] – include the “Permissions” section
None [n] – None of the available options
Default [d] – Default (Properties, Permissions)
Alias: /xco

Graphical dependency options

/graphical_
dependency_layout
The graphical dependency layout.

[c] – arrange objects so that the links between them form a circle
[f] – place the most used objects closer to the center of the diagram, less used ones are placed on the outside
[h] – place objects with Parents on top and Descendants at the bottom, with each generation sharing the same vertical level
[o] – arrange objects so that they are at a right angle to each other
Alias: /gdl

/graphical_
dependency_type
Graphical dependency type.

[co] – show the object and its Children
[ds] – show the object and all Descendants, including Children and Grandchildren, in the dependency graph
[pc] – show the object and its Parents and Children in the dependency graph. Descendants are not shown
[pd] – show all objects, including Parents, Children and Descendants
Alias: /gdt

/graphical_
dependency_scale
The graphical dependencies scale.
Alias: /gds
Note: If the switch is omitted, 100% scale will be used.
/max_children_depth The maximum children depth level to be displayed.
Alias: /mcl
Note: If the switch is omitted, 1 will be used.
/dependency_use_short
_name
Use short names in graphical dependencies diagrams.
Alias: /dusn
Note: If the switch is omitted, long names will be used.

Additional options

/help Prints help message with the list of all CLI switches and their descriptions.
Alias: /?
Quick tip icon

Quick tip:

The recommendation is to use the /? switch in combination with the /out:c:\help.txt switch which will redirect a preview of the /? switch to a text file. This way all the switches will be shown.

/argfile Specify an XML argument file with options.
Alias: /af
/console_with_output Specifies the width of console output.
Alias: /cw
/force Overrides existing file of the same name.
Alias: /f
/out_to Redirects console output to specified file.
Alias: /out
/test Outputs parsed command line switches without taking any actions.
Alias: /t
/verbose Prints messages that are suppressed by default.
Alias: /v
/silent Disables all output to console.
Alias: /slt
/beep Plays sound upon finished operation.
Alias: /be
/return_codes Outputs all return codes to console.
Alias: /rc
/log_level Set one of the following logging levels: Error, Warning, All or None.
Alias: /log
/help_to_html Full path to the CLI help file, along with <.html> extension.
Alias: /hth

Examples with common switches:

Quick tip icon

Quick tip:

Note: All examples assume that the current directory is the application directory. If not, the full path name to ApexSQLDoc.com must be specified.

Loading project and documenting SQL databases that are defined in the project:

ApexSQLDoc.com /pr:project.axdp

Documenting Sales database on Production server, with the graph dependency scale set to 200%:

ApexSQLDoc.com /dbes:Production.Sales /gds:200

Documenting Store and Sales databases on dell\sql2012 server using “sa” user and ”sqladmin” password connection options and overriding output file/directory if exist:

ApexSQLDoc.com /dbes:dell\sql2012.Store.Sales:sa.sqladmin /f

Documenting Sales database on Production server using connection options (user and password), output format (html), output directory (c:\temp), and output file name template ({servername}):

ApexSQLDoc.com /dbes:Production.Sales:sa.sa_psw /ot:html /od:c:\temp /on:{servername}

Quick tip icon

Quick tip:

The /od: switch will not create a specified output directory, it needs to be created manually before using it in ApexSQL Doc CLI

Documenting only tables and views from the Sales database on the Production server:

ApexSQLDoc.com /dbes:Production.Sales /o:12

Loading selection profile and documenting Sales database on Production server:

ApexSQLDoc.com /dbes:Production.Sales/i:Pselection_profile.xml

Creating a CHM file with the name: 10_06_2014.servername.file01.chm:

ApexSQLDoc.com /dbes:Production.Sales /on:{date}.{servername}.file01 /of:chm

Creating a HTML documentation in the btt.10_06_2014.john directory:

ApexSQLDoc.com /dbes:CS.btt /on:{databasename}.{date}.john /ot:html

Creating a CHM file with the name: db_documentation.10_06_2014.file01.chm in the c:\temp folder:

ApexSQLDoc.com /dbes:Production.Sales /on:{date}.{servername}.file01 /ot:chm /on:{date}.file01/od:c:\temp

Documenting Northwind database on Production server and the project path is: c:\db_doc_Projects:

ApexSQLDoc.com /dbes:Production.Northwind /pr:c:\db_doc_Projects.axdp

Documenting Northwind database on Production server displaying the nodes for object types that don’t exist:

ApexSQLDoc.com /dbes:Production.Northwind /em:nd

Documenting Northwind database on CS server displaying TSQL code highlighted:

ApexSQLDoc.com /dbes:CS.Northwind /ot:chm/pi:h

Documenting Northwind database on CI server displaying the extended properties and default server details:

ApexSQLDoc.com /dbes:CI.Northwind /oi:e /srd:d

Documenting Northwind database on CS server displaying the title name of the output file: “Northwind_db”, date when it was created and the connection timeout value set to 120 seconds, with default settings for collapsible sections, and “Owner” grouping enabled:

ApexSQLDoc.com /dbes:CS.Northwind /ot:chm /tt:“Northwind_db: {date}” /cnt:120 /cs:default /gr:o

Documenting Customer database on CI server displaying the date in the filename, copyright link, and the copyright details. The output format will be HTML:

ApexSQLDoc.com /dbes:CI.Customer /ot:html /tt:{date} /cl:www.apexsql.com /ct:ApexSQL

Documenting Sales database on a local server displaying the server object selection, extended properties, documentation author, applying the db_style.css style sheet from c:\styles:

ApexSQLDoc.com /dbes:local.Sales /so:170 /ep:MS_Description /da:maxkv /sf:C:\styles\db_style.css

Documenting SSIS package from SSIS 2014 Package store:

ApexSQLDoc.com /isps:[ALEN-PC]:SQL2014.”MSDB\Data Collector\SqlTraceUpload”

Documenting SSIS project file:

ApexSQL Doc.com /ispf:“E:\SSIS packages\Other Packages.dtproj”:AnalysisProcessingPackage.dtsx.BackUpDBTaskPackage.dtsx

Documenting SSRS item from the file system:

ApexSQLDoc.com /rsff:“E:\AdventureWorks 2012 SSRS Samples\AdventureWorks Sample Reports 2012.rptproj”

Documenting a database schema snapshot in html output format:

ApexSQLDoc.com /dbsnp:“C:\Users\Alen\Documents\ApexSQL\ApexSQLDoc\adventureworks
2008_28_06_2017_11_59_35.axsnp”
/ot:chm

Documenting a Tableau Online site in docx output format:

ApexSQLDoc.com /tos:“[dub01.online.tableau.com].[bravoteam][:pera988@yahoo.com[.ApexSQLBravo.12345]]” /ot:docx

Documenting a full SharePoint farm in docx format:

ApexSqlDoc.com /sp:connect /ot:docx

Documenting a SharePoint farm with specific objects and options in docx format:

ApexSqlDoc.com /sp:connect /spobj:gas sif upam /spopt:cd esc ips dset di loca prin pl ps /ot:docx