Thursday 8 December 2011

Microsoft SQL server Integration services (SSIS)

The Import and Export Wizard
Integration services are to use to migrate data from source to destination.  Basically there are 3 parts in data migrations.
1. Source from where the data came from
2. The transform is the processing of data or formation the data according to destination needs
3. The destination where the data is stored.
The purpose is the transfer, transform and store the bulk copy of the data.
Before SQL Server 2005, there is tolls used to migrate data from source to destinations and it is called Data Transformations Services (DTS).   
The DTS is so popular that even SQL server 2005 you can modify or make changes in DTS packages.
Today I will explain a simple analogy of data migration by Import and Export Wizard.
Import and export wizard is so easy to handle, but can used to migrate large volume of data from source to destinations.
Though SSIS is almost infinitely customizable, Microsoft has produced a simple wizard to handle some of the most common ETL tasks: importing data to or exporting data from a SQL Server database. The Import and Export Wizard protects you from the complexity of SSIS while allowing you to move data between any of these data sources:
1.       SQL Server databases
2.       Flat files
3.       Microsoft Access databases
4.       Microsoft Excel worksheets
5.       Other OLE DB providers
You can launch the Import and Export wizard from the Tasks entry on the shortcut menu of any database in the Object Explorer window of SQL Server Management Studio.
To import some data using the Import and Export Wizard, follow these steps:
1.       Launch SQL Server Management Studio and log in to your test server.
2.       Open a new query window.
3.       Select the master database from the Available Databases combo box on the toolbar.
4.       Enter this text into the query window:
5.       CREATE DATABASE
6.       Click the Execute toolbar button to create a new database.
7.       Expand the Databases node in Object Explorer
8.       Right-click on the database and select Tasks > Import Data.
9.       Read the first page of the Import and Export Wizard and click Next.
10.   Select SQL Native Client for the data source and provide login information for your test server.
11.   Select the AdventureWorks database as the source of the data to import.
12.   Click Next.
13.   Because you're importing data, the next page of the wizard will default to connection information for the database. Click Next.
14.   Select Copy Data From One or More Tables or Views and click Next. Note that if you only want to import part of a table you can use a query as the data source instead.
15.   Select the HumanResources.Department, HumanResources.Employee, HumanResources.EmployeeAddress, HumanResources.EmployeeDepartmentHistory, and HumanResources.EmployeePayHistory tables. As you select tables, the wizard will automatically assign names for the target tables.
16.   Click the Edit button in the Mapping column for the HumanResources.Department table.
  1. The Column Mappings dialog box lets you change the name, data type, and other properties of the destination table columns. You can also set other options here, such as whether to overwrite or append data when importing data to an existing table. Click Cancel when you're done inspecting the options.
  2. Click Next.
  3. Check Execute Immediately and click Next.
  4. Click Finish to perform the import. SQL Server will display progress as it performs the import.
  5. Click Close to dismiss the report.
  6. Expand the Tables node of the database to verify that the import succeeded.
Next time I am using BIDS to make the package for SSIS solutions.
To be continued…
Posted by : MR. JOYDEEP DAS





No comments:

Post a Comment