Skip to content

Latest commit

 

History

History
73 lines (64 loc) · 7.17 KB

File metadata and controls

73 lines (64 loc) · 7.17 KB
title SQL Command-Line Utilities (Database Engine)
description Command prompt utilities enable you to script SQL Server operations. This article lists many command-line utilities that ship with SQL Server.
author rwestMSFT
ms.author randolphwest
ms.reviewer maghan
ms.date 12/16/2025
ms.service sql
ms.subservice tools-other
ms.topic concept-article
ms.collection
data-tools
helpviewer_keywords
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
monikerRange >=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.

Utility Description Installed in
bcp Used to copy data between an instance of [!INCLUDE ssNoVersion] and a data file in a user-specified format. <drive>:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn
dta Used to analyze a workload and recommend physical design structures to optimize server performance for that workload. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
dtexec Used 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. <drive>:\Program Files\Microsoft SQL Server\<nnn>\DTS\Binn
dtutil Used to manage SQL Server Integration Services (SSIS) packages. <drive>:\Program Files\Microsoft SQL Server\<nnn>\DTS\Binn
Deploy Model Solutions with the Deployment Used to deploy [!INCLUDE ssASnoversion] projects to instances of [!INCLUDE ssASnoversion]. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn\VShell\Common7\IDE
osql Allows you to enter [!INCLUDE tsql] statements, system procedures, and script files at the command prompt. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
Profiler Used to start [!INCLUDE ssSqlProfiler] from a command prompt. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
RS.exe (SSRS) Used to run scripts designed for managing [!INCLUDE ssRSnoversion] report servers. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
rsconfig (SSRS) Used to configure a report server connection. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
rskeymgmt (SSRS) Used to manage encryption keys on a report server. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
sqlagent application Used to start [!INCLUDE ssNoVersion] Agent from a command prompt. <drive>:\Program Files\Microsoft SQL Server\<instance_name>\MSSQL\Binn
sqlcmd Allows you to enter [!INCLUDE tsql] statements, system procedures, and script files at the command prompt. <drive>:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn
SQLdiag Used to collect diagnostic information for Customer Service and Support. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
sqllogship Used 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. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
SqlLocalDB An execution mode of [!INCLUDE ssNoVersion] targeted to program developers. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
sqlmaint Used to execute database maintenance plans created in previous versions of [!INCLUDE ssNoVersion]. <drive>:\Program Files\Microsoft SQL Server\<nnn>\MSSQL\Binn
sqlps Used to run PowerShell commands and scripts. Loads and registers the [!INCLUDE ssNoVersion] PowerShell provider and cmdlets. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn
sqlservr Used 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
ssms Used to start [!INCLUDE ssManStudioFull] from a command prompt. <drive>:\Program Files\Microsoft SQL Server\<nnn>\Tools\Binn\VSShell\Common7\IDE
tablediff Used to compare the data in two tables for nonconvergence, which is useful when troubleshooting a replication topology. <drive>:\Program Files\Microsoft SQL Server\<nnn>\COM

Command-line utilities syntax conventions

Convention Used for
UPPERCASE Statements and terms used at the operating system level.
monospace Sample commands and program code.
italic User-supplied parameters.
bold Commands, parameters, and other syntax that must be typed exactly as shown.

Related content