SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Fetch the Incremental data using SSIS Variable
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kond.mohan
Posting Yak Master

India
185 Posts

Posted - 09/12/2012 :  03:11:38  Show Profile  Reply with Quote

Dear all
we are Fetching the data from oracle(source) to sql server(destination)
we want to Fetch the data from using ssis Varible To assign the Table Columns .
how to Fetch the Incremental data using ssis varible.
how to assign table column to ssis variable



visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 09/12/2012 :  11:33:01  Show Profile  Reply with Quote
ssis variable to assign column?

sorry that doesnt make much sense to me
can you explain your full scenario?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

kond.mohan
Posting Yak Master

India
185 Posts

Posted - 09/17/2012 :  06:40:58  Show Profile  Reply with Quote
Hi vishak,

thanks for your reply.

My source database is ORACLE and having Huge amount of data more than 30 crore.my destination database is MSSQL SERVER.On daily basis i need to load the data from source to destination.
My question is i want fetch the incremental data based any kind of processing on Daily basis becoz every day i am taking full load(using SSIS PACKAGE ONLY SOURCE AND DESTINATION loading the data from source to destionaion) my process(Throug sql agent job) is taking more than 6 hrs.

we need to load the data on based on Datetime column incremental records is there any way explain me

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 09/17/2012 :  11:27:18  Show Profile  Reply with Quote
yep there's

use a variable as source query for your oracle

For the variable set the evaluate as expression property as true and set expression as static query part + condition based on current execution date

ie suppose each day you want to get previous days data

you can use query string like

"SELECT col1,col2,... FROM YourTable WHERE datefield >= '" + (DT_WSTR, 30) DATEADD( "d",-1,(DT_DBDATE) @[System::StartTime]) + "'"

inside the expression for the variable in its properties window

then use SQLcommand from variable option for Oracle source and map it to this variable to build query dynamically for getting incremental data from previous day

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

kond.mohan
Posting Yak Master

India
185 Posts

Posted - 11/01/2012 :  02:09:35  Show Profile  Reply with Quote
Dear visha

provide the way how to do this step
For the variable set the evaluate as expression property as true and set expression as static query part + condition based on current execution date
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 11/01/2012 :  09:48:42  Show Profile  Reply with Quote
quote:
Originally posted by kond.mohan

Dear visha

provide the way how to do this step
For the variable set the evaluate as expression property as true and set expression as static query part + condition based on current execution date



select the variable and click the properties icon from the top and you'll be provided with properties window on right

inside that you can set your expression

ie like


"SELECT col1,col2,... FROM YourTable WHERE datefield >= '" + (DT_WSTR, 30) DATEADD( "d",-1,(DT_DBDATE) @[System::StartTime]) + "'"


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000