Microsoft provided many Command line utilities for SQL Server 2012. In this article I am going to explain the functionality and use of these command line utilities based on the feature it is dealing with.
Command line utilities are available for the following SQL Server features. Command line tools and utilities are very useful for automation.
Out of the box, you will get certain command line utilities.
- SQL Server Database Engine
Bcp, dta, , osql, profiler, sqlcmd, sqldiag, sqllogship, sqllocaldb, sqlmaint
Sqlps, sqlserver, ssms, tablediff, dcexec, sqliosim, sqldumper, SqlWtsn
- SQL Server Agent
- SQL Server Integration Services
Dtexec, dtutil, dtsinstall, DTSWizard, ISDeploymentWizard, SSISUpgrade.exe
- SQL Server Analysis Services
- SQL Server Service broker
- SQL Server Reporting Services
Rs, rsconfig, rskeymgmt
Microsoft provided specific command line utilities that will work with the database engine. Most of them were available even on the older versions of SQL Server and you may be familiar with those. These utilities are as follow:
Microsoft provided specific command line utilities that will work with the integration service engine. Most of them were available even on older versions of SQL Server and you may be familiar with those. These utilities are as follows:
SQL Server Agent
- SQLAgent : SQL Server agent can be started from the command prompt by using –c switch.
- ASInstanceRename: Utility for renaming the Analysis service instance.
- Microsoft.AnalysisServices.Deployment: The Microsoft.AnalysisServices.Deployment utility helps you start the Microsoft SQL Server Analysis Services deployment engine from the command prompt.
- rs: This is the tool used to run scripts against SSRS.
- rsconfig: This tool is used for configuring SSRS.
- rskeymgmt: This tool is used for managing keys on SSRS.
- ssbdiagnose: Utility to run diagnostic on SQL server service broker.
Other Command Line Options
There are other command line utilities available for all the flavors of SQL Server 2012. You can download some from the Codeplex website or you can develop on your own using scripting language like PowerShell, batch file, etc.
Note: if you want to know all of the arguments that are accepted in a command line utility, execute that utility either by passing /? Or -? as a parameter. If you need more details of any utilities or want to see an example, you can always search in books online or the MSDN website. Most of them are documented.
As mentioned in the beginning of this article I have explained the functionality and use of these command line utilities based on the feature it is dealing with.
See all articles by MAK