There are both benefits and challenges in any database migration process. The major challenges are source data complexity, data corruption, infrastructure compatibility and security. Therefore, the data migration strategy must be efficient, reversible, fail-safe, auditable and secure.
Here we take a practical example of how a database migration from MySQL to MS SQL is performed using SSIS (SQL Server Integration Services).
SSIS is the abbreviation stands for SQL Server Integration Services. It is a primary element of the Microsoft SQL Server and it’s usually used for abroad range of data migration tasks. Generally, SSIS comprises a data warehousing tool which we use for data extraction, transformation, and loading.
Data extraction comprises the process of recovery of data from various sources.
Data transformation is about reconstructing data from one format (source system) to another format (destination format).
Data loading is the process of loading of data from a source file. It comprises the process of copying data from the source file and pastes the same in the data storage.
The first version of Microsoft SQL Server was released in 2005. SSIS consists of data transformation packages that included various wizards. Especially, the import/export SSIS wizards allows quick data transfer from source to the destination without any format transformation.
As a developer, when you are asked to maintain the SSIS package, you need to utilize a visual development tool (SQL Server Business Intelligence Development Studio (BIDS) based on Microsoft Visual Studio. It has a simple drag and drop user interface to edit the package. It also has a scripting environment which allows writing code. The various elements of the SSIS package define the workflow of the same. When you execute the package, it displays real-time color coding for easy code monitoring.
The connection in SSIS denotes logical representation required to connect to an external data source. The tasks can refer to the connections by their names.
Various events occur during a package execution. Event handlers are declared to capture these events and define actions that need to be taken to respond to these events further.
You can assign values to the properties with parameters within the package.
Precedence constraints link the tasks in a workflow. It ensures that a special task must be implemented before a certain task.
The atomic work units which perform any action are called Tasks. There are various ranges of tasks as per their functions.
The built-in transformations of SSIS are:
Aggregation |
Export & Import Column |
|
Audit |
For loop Container |
Row Count |
Cache Transform |
Foreach Loop Container |
Row Sampling |
Copy/Map |
(Fuzzy) Lookup |
Script Component |
Data Conversion |
Fuzzy Grouping |
|
Data Mining Model Training |
OLE DB Command |
|
Data Mining Query |
Partition Processing |
Term Lookup |
Derived Column |
Percentage Sampling |
|
Dimension Processing |
Row Sampling Transformation |
Below are the steps for the data migration process from MySQL to MSSQL through SSIS:
Step 1:
Step 2:
Step 4:
Step 5:
Step 5:
Step 6:
Step 7:
Step 8:
Step 9:
Step 10:
Step 11:
Step 12:
Step to run SSIS package:
SQL Server Integration Service (SSIS) is a component of the Microsoft SQL Server database software that can be used to conduct a wide range of data integration tasks. SSIS is a fast & flexible data warehousing tool which is used for data extraction, loading, and transformation. It makes data moving easy from one database to another database. SSIS also can extract data from a wide variety of sources like SQL Server databases, Excel files, Oracle, and DB2 databases.
Besides, SSIS comprises graphical tools & wizards for performing workflow functions like sending email messages, FTP operations, data sources, and destinations.