Administering SQL Server

Choosing a Tool to Import or Export Data

Data can be imported to and exported from instances of Microsoft® SQL Server™ using several SQL Server tools and Transact-SQL statements. You can also write your own programs to import and export data using the programming models and application programming interfaces (APIs) available with SQL Server.

You can copy data to and from instances of SQL Server by:

The method chosen to import or export data depends on user requirements, for example:

This table describes the capabilities of various import and export options in SQL Server.


Required functionality

DTS wizards


Replication


bcp

BULK INSERT
SELECT INTO/ INSERT
Import text data YES YES YES YES 1
Export text data YES YES
Import from ODBC data sources YES YES
Export to ODBC data sources YES YES
Import from OLE DB data sources YES YES YES (1)
Export to OLE DB data sources YES YES YES
Graphical user interface (GUI) YES YES
Command prompt/batch scripts YES YES YES
Transact-SQL scripts YES YES YES
Automatic scheduling YES YES YES 2 YES 2
Ad hoc import/export YES YES YES YES
Recurring import/export YES YES YES
Maximum performance YES YES
Data transformation YES
Programmatic interface YES YES YES

1 Using a distributed query that retrieves data from an external source by using an OLE DB provider.
2 By explicitly creating a job scheduled using SQL Server Agent.

See Also

bcp Utility