Headder AdSence

Showing posts with label Interview Questions. Show all posts
Showing posts with label Interview Questions. Show all posts

What is Control Flow?



    Control Flow is the default work space or SSIS Designer part when we create a package in SSIS (.dtsx), which will control the flow of Containers, and Tasks, optionally we can control the flow by using Precedence constraint for these Containers / Tasks.

For Complete Information Go Here

What are the components in SSIS?



2. Data Flow
3. Parameters
4. Event Handlers
5. Package Explorer 

What is SSIS?




     SSIS is know as SQL Server Integration Services which is a Microsoft Tool, which will use for Extract, Transform and Load the data from the various sources.

What is Primary Key in SQL Server?


                                                                     PRIMARY KEY                                                                                         

1. It's a CONSTRAINT, a collection of columns uniquely identifies each row in a table

2. Only one PRIMARY KEY constraint allows on Table.

3. PRIMARY KEY column will not allow NULL Values & duplicate values















What is the difference between DELETE and TRUNCATE statements?


                                                           TRUNCATE vs DELETE
















TRUNCATE
DELETE
Truncate is used to delete the all records in table
Delete is used to delete the row level and table level data
We can’t rollback the data
We can rollback data if we maintain the transaction
It’s auto committed
It’s explicit committed
It’s a DDL (Data Definition Language) Command
It’s a DML (Data Manipulation Language) Command
It’s faster than the delete
It’s very slow when we compare with TRUNCATE



Synchronous and Asynchronous Transformations In SSIS

     
          I am going to explain in simple manner about Synchronous and Asynchronous Transformations in SSIS, as we know in SSIS everything based on transformations only, so these divided into few types.

Synchronous and

Asynchronous

         Mostly we should prefer for Synchronous only when we are not able to meet our requirements using Synchronous then only we should go for Asynchronous Transformation.

Synchronous (non-blocking): 
                            Processing the row by row transformation into next task, in detail, one record will not wait /depend on buffer for other record, example Data Conversion Transformation, DCT will not wait / depend on other record to transform to the next task simply it will convert the record and send to the next task, so Output is Synchronous with Input.



Asynchronous(Fully Blocking):

                                  Processing rows will depend on other / next record based on those next record it will take the decision and transform to the next task, Example, Sort Transformation, in this transformation holds the all records on buffer then it will make the decision based on the data then only records will pass to the next task.





More about these Transformation please go through below link(s).



Please give your valuable comments below :)


Can you define Equijoin?



The condition for matching the rows based on the equality of two values, one from each of the tables being joined. So that's what makes it an equijoin: the ON condition is equality. This includes inner joins and all three types of outer joins.



Capture

Please ask your Questions in comment box..

Finding Last Seven Days Data

How to find last seven days data and if any of days data is null then gives null.

This explanation about Oracle SQL Query:

Generally most of the people confuse here is how to handle NULL values.

so, here I am going to show you how we can do this.

I am taking Sales Date  and replacing NVL with SYSDATE means it treats like this is the Max or today date greater than or equal to SYSDATE-7 means seven days back date (ex 2017-11-4 - 7 days: 2017-10-29)

Query:

SELECT * FROM Tbl_Daily_Sales WHERE NVL(Sale_Date,SYSDATE) >= (SYSDATE-7);

Please find below Output:



Please give your valuable  comments & questions

How to Delete Duplicate Rows In Below Scenario

I have a sample data where the ID is unique, but there are multiple duplicate rows(excluding ID). The other columns are Name, Age, DOB, Transaction Date, Payment, Amount. I have purposely duplicated few rows, and kept ID unique.


--Deleting Duplicate 

;WITH Cte AS (SELECT ID,Name, Age, DOB, Transaction_Date, Payment, Amount, ROW_NUMBER() OVER(PARTITION BY Name, Age, DOB, Transaction_Date, Payment, Amount ORDER BY ID) Seq FROM #Temp) DELETE FROM Cte WHERE Seq<>1












Please Give Your Comments and Ask Some Questions:

Difference between DTS and SSIS


DTS:

1.  DTS stands for Data Transformation Services
2.  DTS is a set of objects using an ETS tool to extract, transform, and load information to or        from a database
3.  DTS was originally part of the Microsoft SQL Server 2000
4.  Uses Activex Script
5.  No Deployment wizard is available
6.  Limited Set of Transformation available
7.  Does not support BI Functionality
8.  Single Task at a time
9.  It is Unmanaged script
10. DTS can develop through Enterprise manager
11. We can deploy only at local server
12. Designer contains Single Pane
13. No Event Hander
14. No Solution Explorer
15. Connection and other values are static, not controlled at runtime.

SSIS:

1. SSIS stands for Sql Server Integration Services
2. SSIS is an ETL tool provided by Microsoft to extra data from different sources.
3. SSIS is a component of the Microsoft SQL Server 2005
4. Uses Scripting Language
5. Deployment wizard is available
6. Huge of Transformations available
7. Completely supports end to end process of BI
8. Multi Tasks run parallely
9. It is managed by CLR
10. SSIS can develop through Business Intelligence Development Studio (BIDS, nothing but         new version of VS IDE)
11. It can be deployed using multiple server using BIDS
12. SSIS designer contains 4 design panes:
 a) Control Flow
 b) Data Flow
 c) Event Handlers &
 d) Package Explorer.
13. Event Handler Available
14. Solution Explorer is available, with packages, connections and Data Source Views (DSV)
15. It can be controlled dynamically using configuration