Tutorial Gateway

  • C
  • C#
  • Python
  • SQL
  • Java
  • JS
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs
  • MySQL

Export Data from SQL Server To Flat File Using Import And Export Wizard

We have SQL Import and Export Wizard in SQL, which can help to import or export data from various sources to different destinations using Wizard. In this example, we are going to export DimGeography table data present in the Adventure Works DW 2014 SQL database to Geography text file present in the local hard drive using SQL Import And Export Data Wizard.

Export Data from SQL Server To Flat File Using Import And Export

To Export Data from SQL Server To Flat File Using Import And Export Wizard, Double click on SQL ServerImport and Export Wizard tool (you can find in start -> All Programs -> Microsoft SQL Server 2014 -> SQL Import and Export Data Wizard). It will open the SQL Server Import and Export Data Wizard. The first page is a welcome page

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 1

If you don’t want to see this page again, then Please tick the checkbox, “Do not show this starting page again.” For now, click Next

Choose a Data Source Page: This page is used to configure the source information. Our source is the SQL database, so we are selecting the SQL Server Native Client as our source, and I am using my localhost instance as a server name.

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 2

Select the source database from the list. Let us select the Adventure Works 2014 here.

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 3

Authentication: Here, we are using windows authentication. But in real-time, your organization or company will provide the authentication credentials to access the database. In that case, you have to change the radio button to SQL authentication and provide the user name and password.

Choose a Destination: This page is used to configure the destination information. Our target is to save the data into text file so we are selecting Flat File Destination as our Destination

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 4

Then we have to choose the text file from our local drive

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 5

From the above, you can observe we are creating the Geography text file. Next, Please select the Format we are going to use

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 6

If you want the text file to include column name in the first row, then tick the checkbox “Column name in the first data row”. If not, uncheck it.

Click Next button

Specify Table Copy or Query: Here we have two options

  1. Copy data from one or more tables or views: Use this option to select from existing tables or view (All the columns data)
  2. Write a query to specify file data to transfer options: This is the option regularly use because there will be unnecessary columns in every table. So it is better to avoid them or selecting data with the condition.
Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 7

For the time being, we are selecting every row. So we chose the first option. Click Next button

This page is used to select the source table from the SQL database you want to use as a source. Here we are choosing the DimGeography table. Click on the preview button to check the incoming data flow

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 8

Specify the Row delimiter and Column delimiter you wish to. Click on the Edit mappings button to change the types and sizes.

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 9

Save and Run Package: This page gives us the option to save the package in either SQL server or File system. For the time being, I am selecting file system

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 10

Save SSIS Package: Provide the address to save the SSIS package

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 11
  • Name: Change the package name as you wish
  • Description: Write your description
  • File Name: Select the file name by clicking on the Browse button and navigate to the appropriate location.

Click Next

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 12

Click finish button to complete the SSIS Wizard

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 13

From the above, you can observe the status: Success and Message.

Let’s navigate to the file system address we provide and check for the file name Geography. Double click on a text document to check the result

Export Data from Sql Server To Flat File Using SSIS Import And Export Data Wizard 14

Filed Under: SSIS

  • What is SSIS
  • Install SQL Server Data Tools
  • Learn SSIS in 28 Days
  • Create a SSIS Project
  • Create SSIS Package
  • SSIS Connection Manager
  • OLE DB Connection Manager
  • SSIS ADO Connection Manager
  • ADO.NET Connection Manager
  • SSIS Cache Connection Manager
  • SSIS Excel Connection Manager
  • SSIS File Connection Manager
  • SSIS FTP Connection Manager
  • SSIS SMO Connection Manager
  • Source Assistance in SSIS
  • Flat File Source in SSIS
  • OLE DB Source in SSIS
  • Excel Source in SSIS
  • ADO.NET Source in SSIS
  • SSIS FLAT FILE Destination
  • SSIS OLE DB Destination
  • SSIS ADO.NET Destination
  • SSIS Transformations
  • SSIS Audit Transformation
  • SSIS Aggregate Transformation
  • SSIS Aggregate Advanced Mode
  • SSIS Cache Transformation
  • SSIS Character Map
  • SSIS Conditional Split
  • SSIS Copy Column
  • SSIS Data Conversion
  • SSIS Derived Column
  • SSIS Export Column
  • SSIS Fuzzy Grouping
  • SSIS Fuzzy Lookup
  • SSIS Import Column
  • SSIS Lookup Introduction
  • Lookup – OLE DB Connection
  • SSIS Lookup in Full Cache Mode
  • SSIS Lookup – Case Sensitivity
  • SSIS Merge Transformation
  • SSIS Merge Join Transformation
  • SSIS Merge Join – Left Outer Join
  • SSIS Merge – Right Outer Join
  • SSIS Merge Join – Full Outer Join
  • SSIS Multicast Transformation
  • SSIS OLEDB Command
  • OLEDB Command – Delete Data
  • OLEDB Command-Update Data
  • SSIS Percentage Sampling
  • SSIS Pivot Transformation 2008
  • SSIS Pivot Transformation
  • SSIS Row Count Transformation
  • SSIS Row Sampling
  • Script Component as Source
  • Script Component as Destination
  • SSIS Script as Transformation
  • SSIS Sort Transformation
  • SSIS SCD Type 0
  • SSIS SCD Type 1
  • SSIS SCD Type 2
  • SSIS Term Lookup
  • SSIS Term Extraction Intro
  • Term Extraction – Extract Nouns
  • SSIS Extract Noun Phrases
  • Extract Nouns & Noun Phrases
  • Term Extraction – Exclusion Tab
  • SSIS Unpivot Transformation
  • SSIS Union All Transformation
  • SSIS For Loop Container
  • SSIS ForEach File Enumerator
  • SSIS ForEach SMO Enumerator
  • SSIS ForEach Variable
  • SSIS Foreach NodeList
  • Foreach ADO.NET Schema Rowset Enumerator
  • SSIS Bulk Insert Task
  • SSIS Data Profiling Task
  • Execute T-SQL Statement Task
  • SSIS Execute SQL Task Intro
  • SSIS Execute SQL Task Example
  • Execute SQL Task- Single Rowset
  • Execute SQL Task – Full Row Set
  • SSIS Execute Package Task
  • Execute Packages in SQL Server
  • Execute Packages in File System
  • SSIS Execute Package Project Reference
  • SSIS File System Task
  • SSIS File System Task- Copy Files
  • File System Task-Copy Directory
  • File System Task – Delete Files
  • File System Task – Delete Folder
  • File System Task -Move Directory
  • SSIS File System Task -Move File
  • File System – Move Multiple files
  • File System Task – Rename File
  • File System Task – Set Attributes
  • SSIS FTP TASK
  • SSIS Create Local Directory
  • SSIS Create Remote Directory
  • SSIS FTP Task Send Files
  • SSIS FTP – Send Multiple Files
  • SSIS FTP Task Delete Local Files
  • FTP TASK Delete Local Directory
  • FTP Task Delete Remote files
  • SSIS Delete Remote Directory
  • SSIS FTP Task Receive Files
  • SSIS FTP Receive Multiple Files
  • SSIS Script Task
  • Transfer SQL Server Objects Task
  • Transfer SQL Table Structures
  • Transfer SQL Tables with Data
  • Transfer SQL Stored Procedures
  • Transfer User Defined Functions
  • Transfer SQL Views in SSIS
  • SSIS Web Service Task
  • SSIS XML Task-Validate XML File
  • Transform XML File using XSLT
  • XML Task-XML files Differences
  • Create SSIS Catalog
  • Package Deployment using BIDS
  • Deploy Package Using SQL
  • Deploy using SQL Server Wizard
  • SSIS Breakpoints
  • SSIS Checkpoints
  • SSIS Error Handling
  • SSIS Event Handlers
  • SSIS Transactions
  • SSIS Logging
  • SSIS Parameters
  • SSIS Package Configuration
  • Configure using SQL Server
  • Config using Registry Entry
  • Conf with Environment Variable
  • SSIS XML Configuration File
  • XML Configuration File Part 2
  • SSIS Package Protection Level
  • SSIS Incremental Load
  • Incremental Load Example 2
  • SSIS Remove Double Quotes

Copyright © 2021ยท All Rights Reserved by Suresh.
About | Contact | Privacy Policy