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_enginesInclude 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_filesInclude specific package files from the file system
Alias: /pfs
Format: /package_files:“packagepath”:[password]
/sql_server_packagesInclude 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].

/exclude_databasesTreat 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_sitesInclude 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_sitesInclude Tableau Online sites into the processing
Alias: /tos
Format: /tableau_online_sites:server
.site[:user[.password]]
/database_snapshotInclude database snapshot into the processing
Alias: /dbsnp
Format: /database_snapshot:“shapshotpath”
/sharepoint_farmInclude 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_timeoutSpecifies the chm compilation timeout in minutes
Alias: /cti
Note: the default value is 600 seconds (10 minutes)
/output_directorySpecifies the output directory
Alias: /od
Note: if the switch is omitted, the current directory is used
/output_nameSpecifies 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_typeSpecifies 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

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

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

(TypeConstant is a bitwise value of the object type)
/server_includeInclude 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_excludeExclude 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)
/commentsDocument user comments.
Alias: /dc
Note: If the switch is omitted, an empty string will be used.
/stylesheetSpecifies the style sheet file path.
Alias: /sf
Note: If the switch is omitted, default path will be ‘/sf:Templates\style.css’.
/date_formatSpecifies date format.
Alias: /df
Note: If the switch is omitted “/df:mm/ss/yyyy” format will be used.
/collapsible_sectionsMake documentation sections collapsible.

DEFAULT – Default
NONE – None
Alias: /cs

/optional_itemsOptional 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_
intensitive_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

/groupingsAdditional 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_itemsEmpty 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_detailsDatabase 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_detailsServer details.

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

/ssis_detailsIntegration 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_detailsAnalisys 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

/projectSpecifies the project file path.
Alias: /pr
/includesSpecifies the selection profile path.
Alias: /i
Note: If the switch is omitted, all objects are selected.
/object_typesSpecifies the bitwise set of object types.
Alias: /o
Note: If the switch is omitted, all object types will be processed.
/server_object_typesSpecifies 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
/titleSpecifies the documentation title template.
Alias: /tt
Note: If the switch is omitted, default tile will be ‘Database Documentation: /tt:[servername].[databasename]’.
/extended_propertySpecifies the main extended property name.
Alias: /ep
Note: If the switch is omitted, the ‘MS_Description’ is used.
/copyright_linkSpecifies the copyright link.
Alias: /cl
Format: “/cl:http://www…
Note: If the switch is omitted, ‘http://’ will be used.
/copyright_textSpecifies the copyright text.
Alias: /ct
Note: If the switch is omitted, ‘© – All Rights Reserved’ will be used.
/top_textSpecifies 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_textSpecifies 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.
/authorSpecifies the document author.
Alias: /da
Note: If the switch is omitted, an empty string will be used.
/page_sizeSpecifies report page size.
A3
A4
Alias: /ps
Note: These arguments cannot be combined.
/page_orientationChange page orientation.
Landscape
Portrait
Alias: /po
Note: These arguments cannot be combined.
/custom_textSpecifies custom text.
Alias: /cst
/custom_text_headerSpecifies custom text header.
Alias: /csth
/custom_text_footerSpecifies custom text footer.
Alias: /cstf
/font_familySpecifies custom text font family.
Arial
ArialBlack
ArialNarrow
Courier
SegoeUI
Tahoma
TimesNewRoman
Alias: /ff
Note: These arguments cannot be combined.
/font_family_headerSpecifies header font family.
Arial
ArialBlack
ArialNarrow
Courier
SegoeUI
Tahoma
TimesNewRoman
Alias: /ffh
Note: These arguments cannot be combined.
/font_family_footerSpecifies footer font family.
Arial
ArialBlack
ArialNarrow
Courier
SegoeUI
Tahoma
TimesNewRoman
Alias: /fff
Note: These arguments cannot be combined.
/text_colorSpecifies custom text color.
Alias: /tc
/text_color_headerSpecifies custom text header color.
Alias: /tch
/text_color_footerSpecifies custom text footer color.
Alias: /tcf
/imageSpecifies custom logo.
Alias: /img
/image_positionSpecifies position of the custom logo.
Header
Footer
HeaderAndFooter
Alias: /imp
Note: These arguments cannot be combined.
/text_alignSpecify text alignment.
Left
Right
Center
Alias: /ta
Note: These arguments cannot be combined.
/text_align_headerSpecifies header text alignment.
Left
Right
Center
Alias: /tah
Note: These arguments cannot be combined.
/text_align_footerSpecifies footer text alignment.
Left
Right
Center
Alias: /taf
Note: These arguments cannot be combined.
/text_boldSpecifies bold text.
Alias: /tb
/text_bold_headerSpecifies header bold text.
Alias: /tbh
/text_bold_footerSpecifies footer bold text.
Alias: /tbf
/text_italicSpecifies italic text.
Alias: /ti
/text_italic_headerSpecifies header italic text.
Alias: /tih
/text_italic_footerSpecifies footer italic text.
Alias: /tif
/text_underlineSpecifies underline text.
Alias: /tu
/text_underline_
header
Specifies header underline text.
Alias: /tuh
/text_underline_
footer
Specifies footer underline text.
Alias: /tuf
/font_sizeSpecifies font size.
Alias: /fs
/font_size_headerSpecifies header font size.
Alias: /fsh
/font_size_footerSpecifies footer font size.
Alias: /fsf
/option_presetsSpecifies 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_optionsDatatype 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_optionsDefaults 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_optionsFunction 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_optionsProcedure 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_optionsRole 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_optionsRule 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_optionsTable 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_optionsTrigger 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_optionsUser 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_optionsView 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_optionsAssembly 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_optionsCertificate 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_optionsContract 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_optionsDDL 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_optionsEvent 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_optionsFulltext 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_optionsFulltext 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_optionsMessage 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_optionsPartition 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_optionsPartition 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_optionsQueue 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_optionsRoute 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_optionsSchema 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_optionsService 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_optionsSequence 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_optionsSynonym 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_optionsXML 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_depthThe 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

/helpPrints 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.

/argfileSpecify an XML argument file with options.
Alias: /af
/console_with_outputSpecifies the width of console output.
Alias: /cw
/forceOverrides existing file of the same name.
Alias: /f
/out_toRedirects console output to specified file.
Alias: /out
/testOutputs parsed command line switches without taking any actions.
Alias: /t
/verbosePrints messages that are suppressed by default.
Alias: /v
/silentDisables all output to console.
Alias: /slt
/beepPlays sound upon finished operation.
Alias: /be
/return_codesOutputs all return codes to console.
Alias: /rc
/log_levelSet one of the following logging levels: Error, Warning, All or None.
Alias: /log
/help_to_htmlFull 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 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