dbTalk Databases Forums  

Share data between tasks.

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Share data between tasks. in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AlejoR
 
Posts: n/a

Default Share data between tasks. - 08-08-2003 , 07:11 AM






Hello all,
I need to share the value of a variable between tasks inside of a DTS
package.
I mean, I have three systems (A.B.C.) represent in 3 tasks.
From A system (SQL SERVER) I read a date value, then I need to select some
rows from C (ORACLE) system having that date, and finally I must insert that
rows in B system (SQL SERVER DW)
The question is how to send the date value from A system to C system.
Thanks



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Share data between tasks. - 08-08-2003 , 07:22 AM






Using SQL Server 2000

ExecuteSQL task against the SQL Server (A)
SELECT <col> FROM tbl

Assign the value to a Global Variable using the parameters button

DataPump task between Oracle (B) and SQL Server (C)

The SourceSQLStatement against Oracle should be

SELECT <Col List> FROM tbl WHERE <col> = ?

Assign the GV to the ? using the parameters button




--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

Reply With Quote
  #3  
Old   
AlejoR
 
Posts: n/a

Default Re: Share data between tasks. - 08-08-2003 , 10:15 AM



Are you suere that to assign a GV to a SQLTask (ORACLE) is the same ? used
for SQLSERVER.
Because I try to do the assignment and SQL SERVER gives me a error.
Something like this,
"HResult of 0x80040e51(-2147217839) returned. Unexpected Error."

What do you think???


"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> escribió en el mensaje
news:%230qP6eaXDHA.212 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Quote:
Using SQL Server 2000

ExecuteSQL task against the SQL Server (A)
SELECT <col> FROM tbl

Assign the value to a Global Variable using the parameters button

DataPump task between Oracle (B) and SQL Server (C)

The SourceSQLStatement against Oracle should be

SELECT <Col List> FROM tbl WHERE <col> = ?

Assign the GV to the ? using the parameters button




--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org




Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Share data between tasks. - 08-08-2003 , 01:35 PM



Not every driver supports Parameters like this. It isn't that it was first assigned to by SQL Server then reused by Oracle/Informix/DB2.

Easiest way then is

Assign the value to the GV in an ExecuteSQL Statement as before. Then add an AX Script task that makes up the SourceSQLStatement of the Datapump task like this

Global Variables and SQL statements in DTS
http://www.sqldts.com/default.aspx?6,102,205,7,1


--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.