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

Wednesday, 30 November 2016

Connecting to ORACLE database from SSIS

Issue: I have to connect to ORACLE database from my SSIS tool.

Solution: Download and install

32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio 

Using the following link:http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html

Then install the driver and it ask for data base details before the final step.So provide the DB Name(Just a name),Host name,Port,Service name

After competing installation restart your machine.

Then open your SSIS and select OLEDB Source and create a new connection.

From the Provider select Oracle Provider for OLEDB.



Then it will ask for the server or file name, give the name of your DB that you provided during installing the client.(Entry in your tnsnames.ora) Then give username and password and test the connection.


You can see connection successful and you can connect to the database and select the tables. 

Monday, 24 October 2016

SSIS Error "DT_GUID" cannot be used with binary operator "!=" while doing incremental load.

Issue:

While doing incremental load in SSIS we have a condition to chehck whether source and target column values are same or not

So in Conditional Split transformation we did a comparison like
[Source_colum != Target_Column]

But when we used a column with data type uniqueidentifier we encountered an issue as shown below.


Cause: 

The column that we used for comparison have data type DT_GUID and that cannot be used for binary operation.

Solution:

Cast the datatype to character and we can use that for comparison.

SSIS format for casting to string  (DT_STR,50,1252)[Colum_Name]

(DT_STR,30,1252) casts 30 bytes, or 30 single characters, to the DT_STR data type using the 1252 code page.


So code used for comparison (DT_STR,30,1252)Source_column != (DT_STR,30,1252)Target_column