SQL Server 2012 Command Line Utilities
Database EngineMicrosoft 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:
bcp: The bcp utility is used for importing and exporting to and from SQL Server to flat files and vice versa. This utility is been around since SQLServer 6.5. dta: The dta utility is the command line version of Database Engine Tuning Advisor. osql: The osql utility allows us to run T-SQL queries, scripts from command prompt. This will be deprecated in future versions. This is available for backwards compatibility only. Use SQLCMD instead. Profiler: This launches SQL Server Profiler. There are many optional parameters allowed, very helpful scheduling, etc. sqlcmd: The sqlcmd utility allows us to run T-SQL queries, scripts from command prompt. This utility replaced the old isql.exe and the recent osql.exe SQLdiag: SQL Diagnostic utility can be used to collect logs and data files from SQL Server. It can also be used to monitor SQL servers and troubleshoot specific problems. Rename Instance