Using the Command-Line Tools
The graphical administration tools provide just about everything you need to work with SQL Server. Still, there are times when you might want to work from the command line, especially if you want to automate installation, administration, or maintenance with scripts. The primary command-line tool is SQLCMD.EXE, which replaces OSQL.EXE and ISQL.EXE. Another command-line tool you’ll use is BCP.EXE.
BCP is the bulk copy program. You can use BCP to import and export data or copy data between instances of SQL Server 2008. The major advantage of BCP is its speed. It is much faster than standard database import/export procedures. Unfortunately, its command-line syntax makes it much harder to use.
The syntax for BCP is shown ...