Archive for February, 2015

Using OLE DB Data Source in SSIS

A data source in SSIS package is something which helps us to connect to the source of data like RDBMS, CSV File, Excel File, etc. and pull the data out.

A data source is used when we’re using Data Flow task. I’m sure you know about the Data Flow task, which is widely used, almost in every package. 🙂

There are various data sources such as ADO.NET, OLE DB, Flat File, Excel File, Raw File, etc. We choose a data source based on our requirement, from where we’re going to pull the data out.

Today, we’ll be talking about OLE DB Source, which can connect to almost all kinds of existing data sources, whether it’s SQL Server or Oracle or SAP NetWeaver or Access, etc. OLE DB uses the Connection Managers behind the scene in order to connect to a data source. It’s not Data Source but a Connection Manager decides what kind of driver you’re going to use and what database or data source you’re connecting to.

Read more…

Tags: ,

How to Export Data into Different Spreadsheet in Same Excel File in SSIS

We’re going to discuss how to export data into different spreadsheet in the same Excel file over here. We’re going to use SQL Server Integration Services 2012 and AdventureWorks2012 database. However, if you’re using earlier version like SSIS 2008 R2, It’ll be working perfectly fine. So, no worries!

I assume that you know how to create a package, what is Data Source, Data Destinations, etc. in SSIS.

Create a package and drag and drop a Data Flow task on Control Flow tab.


Read more…

How to Implement One-to-One Relationship in SQL Server

Today, we’re going to discuss how to implement One-to-One relationship between two tables in SQL Server. So, what does it mean? That’s pretty simple. We can simply go to Database Diagram option and drag Primary Key from master table and drop that on Foreign Key on child table…and that’s it. What’s the big deal???

Yes. It will definitely implement Foreign Key constraint but the cardinality will be One-to-Many by default. Here we get the problem. I wish to implement One-to-One cardinality rather One-to-Many. I tried a lot with available options but in vain. The SQL Server doesn’t provide any option where you can simply go and change the cardinality between tables.

Let’s discuss how to achieve this in SQL Server.

I’ve got two tables, named 1.) Customer, and 2.) CustomerContact as you can see in below image.


Relationship Read more…

Open Workshop on ASP.NET MVC 4 and Entity Framework 6

Hi guys! Thank you to all who registered for the MVC 4 and EF6 training starting from 7th March, 2015. All seats got booked for this batch now. Still, the registration requests pouring in…

Don’t Worry! DhananjaySpeaks Consulting is announcing next open workshop on MVC4 and EF6 again. Here goes the details:

Technology: ASP.NET MVC 4 and Entity Framework 6
Date & Time: 4-5 April and 11-12 April (Sat – Sun)
Time: 8:00 AM – 4:30 PM
Venue: Indiranagar, Bengaluru

Hurry! Limited seats. First-come first-served basis…Wish to register, e-mail me at

How to Make a Text Box as Read-Only or Disabled in MVC4

It’s pretty common requirement for a developer to make a text box as Read-Only or completely Disable it in an application, whether it’s ASP.NET web page or MVC view or any other technology. It’s a kind of user interface’s requirement.

For example, user must not be able to update/delete a Customer ID or Product ID when we’re populating details into Edit view or Details view on a web page. So, how to implement this in MVC4?

Lets say we are having a simple CustomerModel class as shown in below image.


Read more…

Data Sources, Data Transformations and Data Destinations in SSIS 2012

I’ve always come across with pretty common questions while dealing with SSIS training sessions – What are Data Sources, Data Transformations and Data Destinations in SSIS package? Why do we use them? Where do we use them? Do we use them all the time? blah…blah…

So, let’s discuss a little bit about them.

I’m sure every package developer comes across requirements where we need to import/export data from one data source to another data source. And, the very basic control/tool that SSIS provides with us is Data Flow task. I assume we are aware of why we use Data Flow task. Yet, let me briefly explain it.

The Data Flow task is a tool which is used to define activities involved into import/export data from one source to another. We need to make connection with the data source, pull the data out, work on the data like cleaning or validating it and then push into data destination. Here comes the need for Data Sources, Data Transformations and Data Destinations.

The Data Sources such as ADO NET, OLE DB, Flat File, Raw File, Excel Source, etc. help us to connect to the data source, from where we are going to pull the data out. These Data Sources use connection managers internally to define the type of data provider being used, server name, database name and login credentials, etc. in order to connect to a data source.

Read more…