| title | Sqlagent Application | ||||||
|---|---|---|---|---|---|---|---|
| description | The sqlagent application starts SQL Server Agent from the command prompt. Use it when diagnosing SQL Server Agent or when directed by your support provider. | ||||||
| author | rwestMSFT | ||||||
| ms.author | randolphwest | ||||||
| ms.date | 07/10/2025 | ||||||
| ms.service | sql | ||||||
| ms.subservice | tools-other | ||||||
| ms.topic | conceptual | ||||||
| ms.collection |
|
||||||
| helpviewer_keywords |
|
[!INCLUDE sqlserver]
The sqlagent application starts [!INCLUDE ssNoVersion] Agent from the command prompt. Usually, [!INCLUDE ssNoVersion] Agent should be run from [!INCLUDE ssManStudioFull] or by using SQL-SMO methods in an application. Only run sqlagent from the command prompt when you're diagnosing [!INCLUDE ssNoVersion] Agent, or when you're directed to it by your primary support provider.
sqlagent
-c [ -v ] [ -i instance_name ]Indicates that [!INCLUDE ssNoVersion] Agent is running from the command prompt and is independent of the Microsoft Windows Services Control Manager. When -c is used, [!INCLUDE ssNoVersion] Agent can't be controlled from either the Services application in Administrative Tools or [!INCLUDE ssNoVersion] Configuration Manager. This argument is mandatory.
Indicates that [!INCLUDE ssNoVersion] Agent runs in verbose mode and writes diagnostic information to the command-prompt window. The diagnostic information is the same as the information written to the [!INCLUDE ssNoVersion] Agent error log.
Indicates that [!INCLUDE ssNoVersion] Agent connects to the named [!INCLUDE ssNoVersion] instance specified by instance_name.
After it displays a copyright message, sqlagent displays output in the command prompt window only when the -v switch is specified. To stop sqlagent, press Ctrl+C at the command prompt. Don't close the command-prompt window before stopping sqlagent.