Showing posts with label SSIS Interview Questions and Answers. Show all posts
Showing posts with label SSIS Interview Questions and Answers. Show all posts

Tuesday, January 19, 2016

SSIS Performance Tips


SSIS Package Design Time Considerations


#1, Extract data in parallel; SSIS provides the way to pull data in parallel using Sequence containers in control flow. You can design a package in such a way that it can pull data from non-dependent tables or files in parallel, which will help to reduce overall ETL execution time.


#2, Extract required data; pull only the required set of data from any table or file. You need to avoid the tendency to pull everything available on the source for now that you will use in future; it eats up network bandwidth, consumes system resources (I/O and CPU), requires extra storage, and it degrades the overall performance of ETL system.


If your ETL system is really dynamic in nature and your requirements frequently change, it would be better to consider other design approaches, like Meta Data driven ETL, etc. rather than design to pull everything in at one time.


#3, Avoid the use of Asynchronous transformation components; SSIS is a rich tool with a set of transformation components to achieve complex tasks during ETL execution but at the same time it costs you a lot if these components are not being used properly.


Two categories of transformation components are available in SSIS; Synchronous and Asynchronous.


Synchronous transformations are those components which process each row and push down to the next component/destination, it uses allocated buffer memory and doesn’t require additional memory as it is direct relation between input/output data row which fits completely into allocated memory. Components like Lookup, Derived Columns, and Data Conversion etc. fall into this category.


Asynchronous transformations are those components which first store data into buffer memory then process operations like Sort and Aggregate. Additional buffer memory is required to complete the task and until the buffer memory is available it holds up the entire data in memory and blocks the transaction, also known as blocking transformation. To complete the task SSIS engine (data flow pipeline engine) will allocate extra buffer memory, which is again an overhead to the ETL system. Components like Sort, Aggregate, Merge, Join, etc. fall into this category.


Overall, you should avoid Asynchronous transformations but still, if you get into a situation where you don’t have any other choice then you must aware of how to deal with the available property values of these components.


#4, Optimum use of event in event handlers; to track package execution progress or take any other appropriate action on a specific event, SSIS provides a set of events. Events are very useful but excess use of events will cost extra overhead on ETL execution.


Here, you need to validate all traits before enabling an event in the SSIS package.


#5, Need to be aware of the destination table schema when working on a huge volume of data. You need to think twice when you need to pull a huge volume of data from the source and push it into a data warehouse or data mart. You may see performance issues when trying to push huge data into the destination with a combination of insert, update and delete (DML) operations, as there could be a chance that the destination table will have clustered or non-clustered indexes, which may cause a lot of data shuffling in memory due to DML operations.


If ETL is having performance issues due to a huge amount of DML operations on a table that has an index, you need to make appropriate changes in the ETL design, like dropping existing clustered indexes in the pre-execution phase and re-create all indexes in the post-execute phase. You may find other better alternatves to resolve the issue based on your situation.


Configure Components Properties

#6, Control parallel execution of a task by configuring the MaxConcurrentExecutables and EngineThreads property. SSIS package and data flow tasks have a property to control parallel execution of a task; MaxConcurrentExecutables is the package level property and has a default value of -1, which means the maximum number of tasks that can be executed is equal to the total number of processors on the machine plus two;



Package


EngineThreads is a data flow task level property and has a default value of 10, which specifies the total number of threads that can be created for executing the data flow task.



Data Flow Task


You can change default values of these properties as per ETL needs and resources availability.


#7, Configure Data access mode option in OLEDB Destination. In the SSIS data flow task we can find the OLEDB destination, which provides a couple of options to push data into the destination table, under the Data access mode; first, the “Table or view“ option, which inserts one row at a time; second, the “Table or view fast load” option, which internally uses the bulk insert statement to send data into the destination table, which always provides better performance compared to other options. Once you choose the “fast load” option it gives you more control to manage the destination table behavior during a data push operation, like Keep identity, Keep nulls, Table lock and Check constraints.



OLE DB Destination Editor


It’s highly recommended that you use the fast load option to push data into the destination table to improve ETL performance.


#8, Configure Rows per Batch and Maximum Insert Commit Size in OLEDB destination. These two settings are important to control the performance of tempdb and transaction log because with the given default values of these properties it will push data into the destination table under one batch and one transaction. It will require excessive use of tembdb and transaction log, which turns into an ETL performance issue because of excessive consumption of memory and disk storage.



OLE DB Destination Editor


To improve ETL performance you can put a positive integer value in both of the properties based on anticipated data volume, which will help to divide a whole bunch of data into multiple batches, and data in a batch can again commit into thedestination table depending on the specified value. It will avoid excessive use of tempdb and transaction log, which will help to improve the ETL performance.


#9, Use of SQL Server Destination in a data flow task. When you want to push data into a local SQL Server database, it is highly recommended to use SQL Server Destination, as it provides many benefits to overcome other option’s limitations, which helps you to improve ETL performance. For example, it uses the bulk insert feature that is built into SQL Server but it gives you the option to apply transformation before loading data into the destination table. Apart from that, it gives you the option to enable/disable the trigger to be fired when loading data, which also helps to reduce ETL overhead.



SQL Server Destination Data Flow Component


#10, Avoid implicit typecast. When data comes from a flat file, the flat file connection manager treats all columns as a string (DS_STR) data type, including numeric columns. As you know, SSIS uses buffer memory to store the whole set of data and applies the required transformation before pushing data into the destination table. Now, when all columns are string data types, it will require more space in the buffer, which will reduce ETL performance.


To improve ETL performance you should convert all the numeric columns into the appropriate data type and avoid implicit conversion, which will help the SSIS engine to accommodate more rows in a single buffer.

Sunday, November 29, 2015

Cache Transform



The Cache transform is a brand new feature in SQL 2008, allowing you to cache the data used in the Lookup transform.  The Lookup transform can then utilize this cached data to perform the lookup operation.  Working with cached data will most likely be more efficient than querying the database.  In addition the Cache Connection Manager (another new feature) can persist the cache to a local file, allowing the cache to be shared between multiple SSIS packages and steps within a package.  A perfect example of where this will be useful is in the extract, transform and load (ETL) packages that we create to update a data warehouse.  We typically build dimension tables in the data warehouse that use a surrogate key as a primary key (in lieu of the source key in the business application).  As we are processing our fact tables we need to lookup the dimension surrogate keys based on the key in our source system and store the surrogate key in our fact tables.

Wednesday, October 14, 2015

Difference between File System and FTP Task?


The FTP task is for conducting file operations on an FTP server - downloading, uploading, etc...  The File System Task is for conducting operations on a "local" filesystem.  (I say "local" because you can manipulate files via UNC shares as well.)

Question: How to implement the security in SSIS package?


SSIS security features fall into five functional categories: encryption, for securing packages or parts of packages; sensitive-data protection, for identifying and protecting passwords and other sensitive data; SQL Server roles, for controlling access to packages stored in SQL Server; digital code signing, for ensuring that a package hasn't changed; and integration of SQL Server Agent subsystems, for securely storing and executing packages.

Encryption

SSIS lets you use either a password or the user key to encrypt an entire package or just parts of the package. Like your login password, an encryption password can be any password you create. In contrast, SSIS automatically generates user keys for all the users on a machine and makes the keys part of their profiles. The user key is an opaque number that that few users know about and fewer actually see.

Sensitive Data Protection

SSIS lets you designate which of a component's properties are sensitive so that you can differentiate between normal package data and sensitive data. Generally when a property is marked sensitive, that property is a password. But the sensitive attribute can protect any information that the custom component writer deems too sensitive to be stored in clear text. To mark a property as sensitive, the component writes a Sensitive= True XML attribute to the property element when saving the component. SSIS detects that attribute on properties and can give special treatment to a component's sensitive-property values depending on the package-protection setting for the package.

Roles

SSIS adds three new roles that affect the way you run packages in SQL Server Agent and access packages stored in SQL Server. The db_dtsoperator role is the most limited new role. Users in this role can only enumerate (i.e., determine which packages are available) and view existing packages; operators can't create or modify SSIS packages. The db_dtsltduser role lets users create and modify their own packages and enumerate existing packages. And the db_dtsadmin role lets users create, modify, enumerate, and view all packages. Systems administrators are automatically in the db_dtsadmin role.
You must be in one of these three roles to access SSIS packages. If you aren't, and you attempt to enumerate a package by opening the Packages node for the SSIS Server object explorer in SQL Server Management Studio, you'll get the error message
SQL Server Agent Integration

SQL Server 2000 has one SQL Server Agent proxy account. Once enabled, any SQL Server Agent user can set up and execute job steps for the CmdExec subsystem. In addition, DTS doesn't provide good support for unattended execution scenarios. To execute DTS packages with passwords, you have to encrypt the entire command line and paste it into the parameters for CmdExec to pass to DTSRun.exe. To eliminate such problematic practices, Microsoft introduced multiple SQL Server Agent subsystems, which are dedicated environments for executing particular technologies such as ActiveX Scripts, Analysis commands or queries, and SSIS packages. By default, only the sysadmin has rights to create jobs. To grant other users the rights to create jobs, the sysadmin creates proxy accounts, which are essentially wrapped credentials that have SQL Server Agent subsystem associations. Proxy accounts let sysadmins grant job-creation permissions to other users while finely controlling the kinds of jobs those users can create.

Digital Signing

Digital signing is a new feature in SSIS that lets you sign a package with a code-signing certificate. With this certificate, you can detect whether a package has changed in some way. Whether the change was malicious or inadvertent, digital signing lets you ensure that the package you run today is the same package you deployed yesterday.

Saturday, October 10, 2015

What are the four (4) migration tools available to Integration Services package designers that aid in migrating SQL Server 2000 DTS packages?


The four migration tools are: DTS 2000 Runtime Engine, DTS 2000 Package Task, DTS 2000 Upgrade Advisor, and the DTS Package Migration Wizard.



keywords: SSIS interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions. 

“Data driven query” task from DTS be implemented using the SSIS transform objects?

One way to implement this functionality is to use a lookup component to determine if certain data exists (the select query of DDQ), then to redirect rowsets based on failure (data does not exist) or success (data does exist) of the lookup component to the appropriate data operation (insert/update/etc.).




keywords

SSIS interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions.

Remove duplicate record in SSIS?



In SSIS the SORT transformation can be used for removing duplicates rows from data.


Keywords: ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions. 

What is ‘ragged right’ format in flat files?


Flat files with spaces at the end of the specifications are typically difficult to process in some
ETL platforms. The Ragged Right option in SSIS provides a way to handle these easily without having to run the file through a Script Task to put a character into a consistent spot, or having the origination system reformat their extract files.

















Keyword: ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions. 

What is a UDL and what advantages does it have?


Universal Data Link defines a data source. Advantages are portability, so that moving
packages from environments is easier since data source information is stored in the UDL on
each machine. For UDLs should you use Windows or SQL Server authentication? Since the
UDL is an unencrypted text file you should use Windows Authentication otherwise the stored
password is not secure.





Keywords:  ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions.

Multicast in SSIS


A dataflow transformation that multiply the single dataset into multiple output as per the requirement.



Keywords : ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions. 

What to insert a new column in the dataset data flow?


By using derived column you can insert new column in dataset.





Keywords : ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions.

Configure ssis package properties at runtime?


By using configuration feature you can doing it run time. For this there are multiple methods.



Keyword : ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions. 

Data viewer in SSIS and its uses?


Data viewers are grids that can be added to any data line within the Data Flow.  Bu using the data viewer you can debug the package at run time by viewing the data.



keywords : ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions. 

During an SSIS package execution, how are SQL database errors handled? Give an example of a handled and unhandled error event in a well designed package.


Error events are handled through the Event handler. Each task and container may have a dedicated ON-ERROR event defined for it.  When an error occurs, the event handler is immediately invoked for the event defined at the failing task level.  ON-ERROR events defined within a data flow (red line to a defined task) may be configured to not fail the load and execute any defined tasks prior to going to the next row.  If no error-handling event is defined within a data flow or the error occurs in the processes flow, control is transferred to the next highest level of the package (ie. The container level).  If an ON-ERROR event is defined there, that code is executed, then control is raised up the chain until the package ON-EVENT is reached.  Once control leaves a data flow for an ON-ERROR event, the package will not return to the data flow.






Keyword :  SSIS Interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions. 

How to add logging in SSIS?


The short version of the logging process is:

  1. Enable Logging (right-click Control Flow or SSIS > Logging).
  2. Select provider(s) and click Add from the package level.
  3. Check the Container that you want to log.
  4. Check the provider(s) that you wish to use for that container.
  5. Click the Details tab to enable events that you would like to log.
  6. Click the Advanced button to enable/disable information to be included in the log.





Keywords : ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions. 

What are the languages available for coding in Script Task?



Script task supports both the Microsoft Visual Basic and Microsoft Visual C# programming languages.



ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions.

Script component is a SSIS

Script component is a SSIS transformation component whose task is to run custom script code. Many times it happens that for some situation we do not have a built in transformation component; however, we can do so by writing some code snippet for the needed transformation.

 

 

ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions.

Script Task in SSIS


The Script task is a multi-purpose tool that you can use in a package to fill almost any requirement that is not met by the tasks included with Integration Services.


Keyword :ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions.

What are the properties which can be modified to maintain buffer size?


DefaultBufferMaxRows – a DFT (Data Flow Task) property that specifies a maximum number of rows that can be held in an individual buffer. By default the value is set to 10,000, though this figure will be reduced if (based on row size estimates) the memory consumption would be greater than the DefaultBufferSize

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions.

Explain the Lookup Transformation?


The main functionality of the lookup join is to make a Join with other source with current source and fetch the result in a desired format

 

 

 

 

keywords: ssis interview questions,SSIS Interview Questions and Answers , SSIS interview Questions PDF Download , SSIS Interview Questions for Experienced.
2012 ssis interview questions.