Chapter 5. SQL Server Command-Line Utilities

by Chris Gallelli


  • BCP

  • Data Transformation Services Utilities


  • makepipe and readpipe

  • ODBCcmpt

  • odbcping

  • rebuildm

  • regrebld

  • Replication Utilities

  • SQLDiag

  • SQLMaint

  • SQLServr

  • VSwitch

This chapter explores the various command-line utilities that ship with SQL Server. These utilities provide administrators with a set of tools for such tasks as automating routine maintenance procedures and verifying client connectivity to SQL Server. In this chapter, you will explore these command-line utilities. For each utility, this chapter provides the command syntax along with the most commonly used options. For the full syntax and options available for the utility, see SQL Server Books Online.


Four of the utilities discussed in this chapter (makepipe, readpipe, regrebld, and odbcping) are no longer installed as part of the SQL Server 2000 setup but are shipped with the installation disc. They can be run from the x:\x86\Binn directory on the SQL Server 2000 installation disc, or they can be copied from the disc to your computer for execution. The remaining command-line utilities covered in this chapter are installed in several different locations. Refer to the last section in the detailed description of each utility to find the specific location.


A batch file, typically a text file with the .bat extension, can be a real timesaver when executing the command-line utilities. You can create the batch file in the same directory as your executable file and specify the appropriate parameters. A PAUSE command at the end of the batch file will allow you to view the results in the command prompt window before the window disappears.

    Part III: SQL Server Administration
    Part IV: Transact-SQL
    Part V: SQL Server Internals and Performance Tuning
    Part VI: Additional SQL Server Features