Labels

Showing posts with label SSIS. Show all posts
Showing posts with label SSIS. Show all posts

Monday, 2 May 2016

SSIS Terminologies quick review .


Data Flow Task: used to move the data from source to destination and to perform intermediate operations

Transformations: These are intermediate Operations performed between source and destination

Ex: Concatenation, Addition, Sorting, Merging etc

Sort: used to sort the data in the specified order i.e. ascending or descending. It has some flexibility to do sorting on multiple columns.
There is a feature called “remove rows with duplicates “helps us to display unique rows in sorting by eliminating duplicates.

Derived Column:


It performs operations row by row. It does different calculations, aggregations, concatinations, convertions etc for the columns in the rows.

Variable: It is the value which is changeable within the package

Variable holds memory and stores values in it.

User Defined Variables:

Holds system information. These variables store under system name space
Ex: system:: <Variable Name>
System::<variable name>
User Defined variables: created by the user only store under user name space
User::<variablename>

Package Level: within the package any where we can use the variable

Tasks Level: within the task only we can use the variable.

Data Conversions:

Data Conversions are done in 3 ways

1.       By using data conversion transformations

2.       By using type cast operations in expressions
<Type Cast Operator> (column -  Name)
(DT_I4)(PartyIncome)
(DT_DBDATE)(‘2010-10-10’)
3.       Directly doing at flat file itself

RC on Flat File Source à Show advanced editor à Input and Out Put properties à Flat File Source out Put à o/p columns à Party Income à Data Type Properties  à Data Type à four – byte signed integer (DT_I4)
Note: If we are using same column nof time in middle instead of converting multiple times directly do at flat file source itself.

Aggregate:
                 It performs aggregate operations such as Average, min, sum, count, distinct etc
FlatFileSource à Data Conversion  à Aggregate    à FlatFileDestination

Multi Cast:

It creates multiple copies of same source so that instead of doing multiple operations on the same source in multiple packages we can do in a single package by using multi cast.
It improves the performance because it reads the data only one time from the source.
Performance point of view this component is very important.

Merge:

It merges multiple input data sources. Here the restriction is source should be in sorted order so that the output also be in the sorted order.
Note: it will accepts only 2 inputs.

Conditional Split:

It splits the data based on the condition. There are 2 types of output comes from this transformation
a.       Condition matched out put
b.      Condition un-matched output or default output.

Union All:

It merges multiple input sources i.e. 2 / more
No need to take the input in the sorted order so that the output will also have Un sorted data.

Limitation: In put source structures should be same (i.e No.of Columns , Order of data type of columns)

Note: It doesn’t bother about column – names.

Merge Join: It performs merge operation along with joins. Generally it supports only Inner, Left and Full Joins.

Look Up: It looks up the required value on target and fetches relevant results (Exact Result)
Adv:

1.       To fetch relevant data
2.       While working with SCD’s
3.       To have exact match with destination and to improve query retrieval fast (it uses cache)

Fuzzy Look Up:

Used to get the result from the destination based on the similarity but not exact match

For Loop Container:

 It executes the underlying task to the specified no of times.

For Each Loop Container:

Used to load group of similar objects whose count is “unknown “

Note: For Loop having a condition so that we know the count where as for each loop doesn’t have.
Loading similar files from a folder to a table etc.

It uses enumerator that supports are
                                For Each File enumerator
                                                Item
                                                ADO
                               
Note : Enumerator values are not changeable with in a Package.

File System task:
It performs file and folder operations such as copying, moving, deleting, creating …etc

Bulk Insert Task:
It loads bulk data with max speed into tables.
We cannot perform any intermediate operations with bulk insert task

Note: It loads files only i.e before loading into the table, table should already create.

Send Mail task:
                 Used to send e-mains to corresponding recipients. It requires SMTP server.

Maintenance Clean up task: it removes file left over from a maintenance plan

Notify Operator task: it sends an e-mail ms to any SQL server Agent.

Rebuild Index task: used to reorganizes data on the index by rebuilding the indexes. It improves the performance of index scan and seeks

Reorganize Index Seek: it defragments and compacts clustered and non-clustered indexes on table and views.

Shrink Data Base Task:
It reduces the disk space consumed by data base and log files by removing empty data and log prices.

Update Statistics Task: it updates statistics of the object if there are already collected.

Character Map: It applies string operations such as lower to Upper vice versa etc.

Copy Column: It creates multiple copies of the columns

Import Columns: it imports into columns from a file
Ex: Loading images from file to table rows.

Fuzzy Grouping:
                 It groups similar rows

OLEDB Command: it executes an SQL Command for each row in a data set

Row Count: It counts no of rows in a data set

Term Extraction: It extracts terms from a data to column

Term Look Up:
                It counts the frequencies that terms in a reference table appears in a data set.

Check Point:

Check point provides better restorability of package
Check point configuration helps us to resume from the last task in the package i.e if multiple tasks are there in a package  if there is any failure in any task it stores the fail task point in the check point file , once we restart the package  then check point helps to start from last point specified in check point file . once package is succeed then it deletes the check point file.

Error out Put Options:

In case of error or truncated values coming from source we can use either of the below options

Ignore Failure: in case of errors or truncations it ignores failure

Redirect Row: In case of error (or) truncation it redirects the row to the other destination

Fail Component: In case of error (or) truncation it simply fails the component

Monday, 8 February 2016

SSIS Performance tuning

Performance problems will raise due to bottlenecks .

Situation to find bottle neck

1. To create a package with optimization .

2. There is a package which is running such a long time .

This bottle neck can be at any  many levels .

1. Package Level

2. Source Level

3.Destination Level

4.Transformation Level

5.Data Flow Task Level

6.System Level

We can identify bottlenecks by using progress tab information or by using log providers.

Package Level Tuning 

1. Implement check points to have better restart ability of components in the package .

2. Disable Event Handler: EH decrease package performance so unnecessary event handlers should be removed or disabled .

3. Maximum Concurrent Executable : Increasing the nof executable will increase the parallelism of package and concurrantly execute in less time .

4. Maximum Error Count : Default '1' means it fails for single error in the package . If you increase the error count it doesn't fails the package until it reaches the count.

Data Flow Task Level Tuning Tips

1. Delay Validation (T/F) : True means the validation of component is delayed until the execution of  other component finished.

2. Default buffer max rows and size : Increase or decrease according to the volume of data loading i.e for more volume increase rows and buffer size . For less volume decrease rows and buffer size .

3. Engine Threads : Default it takes 10 if we increase more threads it runs more parallel and uses more processes to finish the data flow operations .

Note :  Thread is a part of process to do some task . More threads less data and less threads with more data decreases performance .

4. Run in Optimized Mode : If it is true then data flow avoids unnecessary transformations , conversions etc operations during package execution .

Source Level Tuning

In case of Flat File

1. Try to take the flat file local to the system .

2. Use the property "FastParse=True" so that the column uses faster , local neutral processing routines and avoids unnecessary conversions .

We can find fast parse option by right clicking on advanced editor --> Input and Output properties --> O/P columns --> Fast Parse

If the source is table or view

1. Create index on source table so that it retrieves the data faster.

2. Instead of taking a table , take a SQL Query or SQL Command as data access mode to get the required columns and rows of data .

3. At connection manager level click on ALL and change the packet size : 32767 instead of 0 . If packet size is zero means 4 KB of data will be transferred at a time . If packet size 32767 means 32 KB of data to be transferred at a time .

Destination Level Tuning Tips 

1. In case of flat file try to take the file local to the system .

2. In case of relational db table or view use data access method as SQL Command to load required data.

3. Use data access mode as fast load to load the data much faster .

4. If the table contains constraints , indexes and triggers then loading will be slow so we need to disable or drop them once the loading finished recreate or enable them.

To implement this there are many ways









Another way is event handling

on pre execute of data flow disable / drop functionality.
on post execute of data flow enable / recreate .

Transformation Level Tuning Tips

We need to identify either the transformation is synchronous or asynchronous .

Asynchronous transformation always takes time to run than synchronous.

Synchronous Transformation 

Here rows are processed as it is getting from the source .ex: derived column , data conversion etc.

Synchronous transformation occupies less memory and process less rows.

Asynchronous Transformation

In Asynchronous transformation until the retrieved rows system collects it doesn't perform any operation. It retrieves more memory and less rows. These transformations either blocks partially or fully so these transformations also called as partial blocking or fully blocking transformations ex sort,merge,aggregate etc.

if there are no bottle necks in the above all levels then we are having bottle necks at system level.


I hope the article was useful! and I need to let you know that this won’t stop here .keep in touch and feel free to ask any doubts related to this topic .

Sunday, 10 January 2016

SSIS : Name some of new feautures from DTS to SSIS ?

The below are the few points in SSIS over DTS

* SSIS Check Points.

* SSIS Logging.

* SSIS Package Configuration.

* SSIS Breakpoints.

* SSIS Batch Processing.

* Dynamic flat file connections.

* Merge Join

Saturday, 2 January 2016

Difference between SSIS 2005 and 2008

The below are the key differences between SSIS 2005 and 2008 .

1. Script Task :

In SSIS 2005 users can write the script in VB only.

In SSIS 2008 users can write the script in C# and VB.

2. DataProfilingTask :

In SSIS 2005 Data Profiling Task is not available.

In SSIS 2008 Data Profiling Task is introduced.

3. Cache Transformation :

In SSIS 2005 Cache Transformation is not available.

In SSIS 2008 Cache Transformation is introduced.

4. Look Up Transformation :

In SSIS 2005 Error Output lookup has only

               Fail Component , Ignore Failure & Redirect Row .

In SSIS 2008 "No Match Output " is introduced along with the existing features.

5. Cache Mode :

In SSIS 2005 Cache Mode is not available .

In SSIS 2008 Cache Mode is introduced with 3 types of cache

                Full Cache Mode , Partial Cache Mode & No Cache Mode .

6. OLEDB Provider for Analysis Services :

In SSIS 2005 OLEDB Provider for Analysis Services is not available .

In SSIS 2008 OLEDB Provider for Analysis Services is introduced.

7. Excel Enhancements :

In SSIS 2005 you have to build a new connection based on the office 12.0 OLEDB Client .

In SSIS 2008 Importing excel work sheets is native to SQL 2008.

8. Data Flow Task :

In SSIS 2008 enhanced data flow engine tuned for parallelism.


Friday, 1 January 2016

What’s new in SSIS 2012 for developers

The below are the new enhancements for developers in SSIS 2012

Undo and Redo Changes is SSIS PACKAGE.

* SSIS tool box enhancements.

* SSIS design surface enhancements.

* SSIS solution explorer enhancements.

*  Group tasks and Transformations.

*  Decimal Data type variable.

Expression Character Limit.

*  SSIS toolbox and Variable buttons are added to package design surface.

* Zoom IN and Zoom Out.

*  Parameters are added  in design panel where control flow and dataflow , parameters ,event                  handlers ,Package explorer.

     *   PIVOT transformation , Row Count GUI Transformation  GUI Improvements.

     *  ODBC Source and ODBC Destination.

     * DQS - Data Quality Service is introduced used to enable more easily and accurately improve              the quality of data.