9.1. Use the Bulk Copy Program Utility

The Bulk Copy Program (BCP) utility is run from the command line, and a version of it is available in many editions of SQL Server. However, there have been enhancements in SQL Server 2008. Any DBA that has used BCP will tell you that it is a valuable and flexible tool. Using it, you can easily import and export large amounts of data. A simple example of the syntax follows:

bcp {dbtable | query}
{in | out | queryout | format} datafile
[-n native type] [-c character type]
[-S server name] [-U username]
[-P password] [-T trusted connection]

The vertical | symbol inside the curly braces means that you can use only one of the choices listed inside the braces. All of the switches listed in the preceding syntax ...

Get SQL Server® 2008 Administration: Instant Reference now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.