title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | monikerRange |
---|---|---|---|---|---|---|---|---|
Import & export data from SQL Server & Azure SQL Database |
You can use Transact-SQL, command-line tools, and wizards to import and export data in SQL Server and Azure SQL Database in a variety of data formats. |
rwestMSFT |
randolphwest |
10/27/2017 |
sql |
data-movement |
conceptual |
>=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current |
[!INCLUDESQL Server Azure SQL Database Synapse Analytics PDW] You can use a variety of methods to import data to, and export data from, SQL Server and Azure SQL Database. These methods include Transact-SQL statements, command-line tools, and wizards.
You can also import and export data in a variety of data formats. These formats include flat files, Excel, major relational databases, and various cloud services.
You can import data with the BULK INSERT
or the OPENROWSET(BULK...)
commands. Typically you run these commands in SQL Server Management Studio (SSMS). For more info, see Import Bulk Data by Using BULK INSERT or OPENROWSET(BULK...).
You can import and export data with the BCP command-line utility. For more info, see Import and Export Bulk Data by Using the bcp Utility.
If you don't need all the configuration options available in the Import and Export Wizard and other tools, you can import a text file into SQL Server by using the Import Flat File Wizard in SQL Server Management Studio (SSMS). For more info, see the following articles:
You can import data to, or export data from, a variety of sources and destinations with the SQL Server Import and Export Wizard. To use the wizard, you must have SQL Server Integration Services (SSIS) or SQL Server Data Tools (SSDT) installed. For more info, see Import and Export Data with the SQL Server Import and Export Wizard.
If you want to design a custom data import, you can use one of the following features or services:
- SQL Server Integration Services. For more info, see SQL Server Integration Services.
- Azure Data Factory. For more info, see Introduction to Azure Data Factory.
You can import data from, and export data to, flat files or a variety of other file formats, relational databases, and cloud services. To learn more about these options for specific tools, see the following topics
- For the SQL Server Import and Export Wizard, see Connect to Data Sources with the SQL Server Import and Export Wizard.
- For SQL Server Integration Services, see Integration Services (SSIS) Connections.
- For Azure Data Factory, see Azure Data Factory Connectors.
There are special considerations and examples available for some commonly-used data formats. To learn more about these data formats, see the following topics:
- For Excel, see Import from Excel.
- For JSON, see Import JSON Documents.
- For XML, see Import and Export XML Documents.
- For Azure Blob Storage, see Import and Export from Azure Blob Storage.
If you're not sure where to begin with your import or export task, consider the SQL Server Import and Export Wizard. For a quick introduction, see Get started with this simple example of the Import and Export Wizard.