Skip to content

Latest commit

 

History

History
73 lines (64 loc) · 7.6 KB

command-prompt-utility-reference-database-engine.md

File metadata and controls

73 lines (64 loc) · 7.6 KB
titledescriptionauthorms.authorms.reviewerms.datems.servicems.subservicems.topicms.collectionhelpviewer_keywordsmonikerRange
SQL Command-Line Utilities (Database Engine)
Command prompt utilities enable you to script SQL Server operations. This article lists many command-line utilities that ship with SQL Server.
rwestMSFT
randolphwest
maghan
04/07/2025
sql
tools-other
conceptual
data-tools
command prompt utilities [SQL Server]
command prompt utilities [SQL Server], about command prompt utilities
command prompt [SQL Server]
utilities [SQL Server], command prompt
command prompt [SQL Server], utilities
command-line utilities [SQL Server]
command-line utilities [SQL Server], about command-line utilities
command-line [SQL Server]
utilities [SQL Server], command-line
command-line [SQL Server], utilities
>=aps-pdw-2016 || =azuresqldb-current || =azure-sqldw-latest || >=sql-server-2016 || >=sql-server-linux-2017

SQL command-line utilities (Database Engine)

[!INCLUDE SQL Server Azure SQL Database Synapse Analytics PDW]

Command-line utilities enable you to script [!INCLUDE ssdenoversion-md] operations. The following table contains a list of several command-line utilities that ship with [!INCLUDE ssNoVersion].

For information on the main SQL graphical and command-line tools, see SQL tools overview.

UtilityDescriptionInstalled in
bcpUsed to copy data between an instance of [!INCLUDE msCoName] [!INCLUDE ssNoVersion] and a data file in a user-specified format.<drive:>\Program Files\[!INCLUDE msCoName] [!INCLUDE ssNoVersion]\Client SDK\ODBC\110\Tools\Binn
dtaUsed to analyze a workload and recommend physical design structures to optimize server performance for that workload.[!INCLUDE ssinstallpath-md]Tools\Binn
dtexecUsed to configure and execute an [!INCLUDE ssISnoversion] package. A user interface version of this command-line utility is called DTExecUI, which brings up the Execute Package Utility.[!INCLUDE ssinstallpath-md]DTS\Binn
dtutilUsed to manage SQL Server Integration Services (SSIS) packages.[!INCLUDE ssinstallpath-md]DTS\Binn
Deploy Model Solutions with the DeploymentUsed to deploy [!INCLUDE ssASnoversion] projects to instances of [!INCLUDE ssASnoversion].[!INCLUDE ssinstallpath-md]Tools\Binn\VShell\Common7\IDE
osqlAllows you to enter [!INCLUDE tsql] statements, system procedures, and script files at the command prompt.[!INCLUDE ssinstallpath-md]Tools\Binn
ProfilerUsed to start [!INCLUDE ssSqlProfiler] from a command prompt.[!INCLUDE ssinstallpath-md]Tools\Binn
RS.exe (SSRS)Used to run scripts designed for managing [!INCLUDE ssRSnoversion] report servers.[!INCLUDE ssinstallpath-md]Tools\Binn
rsconfig (SSRS)Used to configure a report server connection.[!INCLUDE ssinstallpath-md]Tools\Binn
rskeymgmt (SSRS)Used to manage encryption keys on a report server.[!INCLUDE ssinstallpath-md]Tools\Binn
sqlagent90 applicationUsed to start [!INCLUDE ssNoVersion] Agent from a command prompt.<drive>:\Program Files\Microsoft SQL Server\<instance_name>\MSSQL\Binn
sqlcmdAllows you to enter [!INCLUDE tsql] statements, system procedures, and script files at the command prompt.<drive:>\Program Files\[!INCLUDE msCoName] [!INCLUDE ssNoVersion]\Client SDK\ODBC\110\Tools\Binn
SQLdiagUsed to collect diagnostic information for [!INCLUDE msCoName] Customer Service and Support.[!INCLUDE ssinstallpath-md]Tools\Binn
sqllogshipUsed by applications to perform backup, copy, and restore operations and associated clean-up tasks for a log shipping configuration without running the backup, copy, and restore jobs.[!INCLUDE ssinstallpath-md]Tools\Binn
SqlLocalDBAn execution mode of [!INCLUDE ssNoVersion] targeted to program developers.[!INCLUDE ssinstallpath-md]Tools\Binn
sqlmaintUsed to execute database maintenance plans created in previous versions of [!INCLUDE ssNoVersion].[!INCLUDE ssinstallpath-md]\MSSQL\Binn
sqlpsUsed to run PowerShell commands and scripts. Loads and registers the [!INCLUDE ssNoVersion] PowerShell provider and cmdlets.[!INCLUDE ssinstallpath-md]Tools\Binn
sqlservrUsed to start and stop an instance of [!INCLUDE ssDE] from the command prompt for troubleshooting.<drive>:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Binn
ssmsUsed to start [!INCLUDE ssManStudioFull] from a command prompt.[!INCLUDE ssinstallpath-md]Tools\Binn\VSShell\Common7\IDE
tablediffUsed to compare the data in two tables for nonconvergence, which is useful when troubleshooting a replication topology.[!INCLUDE ssinstallpath-md]COM

Command-line utilities syntax conventions

ConventionUsed for
UPPERCASEStatements and terms used at the operating system level.
monospaceSample commands and program code.
italicUser-supplied parameters.
boldCommands, parameters, and other syntax that must be typed exactly as shown.

Related content

close