-
Start the SQL Server Import and Export Wizard.
-
In SQL Server Management Studio, connect to the Database Engine server type, expand Databases, right-click a database, point to Tasks, and then click Import Data or Export data.
-
On the corresponding wizard pages, select a data source and a data destination.
-
Set the options for the type of destination that you selected.
If the destination is a SQL Server database you can specify the following:
-
Indicate whether to create a new database and set the database properties. The following properties cannot be configured and the wizard uses the specified default values:
Property
Value
Collation
Latin1_General_CS_AS_KS_WS
Recovery model
Full
Use full-text indexing
True
-
Select whether to copy data from tables or views, or to copy query results.
If you want to query the source data and copy the results, you can construct a Transact-SQL query. You can enter the Transact-SQL query manually or use a query saved to a file. The wizard includes a browse feature for locating the file, and the wizard automatically opens the file and pastes its content into the wizard page when you select the file.
If the source is an ADO.NET provider you can also use the option to copy query results, providing the DBCommand string as the query.
If the source data is a view, the SQL Server Import and Export Wizard automatically converts the view to a table in the destination.
-
Indicate whether the destination table is dropped and then re-created, and whether to enable identity inserts.
-
Indicate whether to delete rows or append rows in an existing destination table. If the table does not exist, the SQL Server Import and Export Wizard automatically creates it.
If the destination is a Flat File destination you can specify the following:
-
Specify the row delimiter in the destination file.
-
Specify the column delimiter in the destination file.
-
-
(Optional) Select one table and change the mappings between source and destination columns, or change the metadata of destination columns:
-
Map source columns to different destination columns.
-
Change the data type in the destination column.
-
Set the length of columns with character data types.
-
Set the precision and scale of columns with numeric data types.
-
Specify whether the column can contain null values.
-
-
(Optional) Select multiple tables, and update the metadata and options to apply to those tables:
-
Select an existing destination schema or provide a new schema to which to assign tables.
-
Specify whether to enable identity inserts in destination tables.
-
Specify whether to drop and re-create destination tables.
-
Specify whether to truncate existing destination tables.
-
-
Save and run a package.
- 5 Users Found This Useful