dbTalk Databases Forums  

DTS Global Variable not saved.

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


Discuss DTS Global Variable not saved. in the microsoft.public.sqlserver.dts forum.



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

Default DTS Global Variable not saved. - 01-03-2006 , 11:31 PM






Hi All,

In DTS project, I have used Global Variable called Last_Export_Date which
store DateTime of Last Export date. I am updating this global variable in the
Last Task of my Package.

So My Insert Statement which i am calling in DataPump Task is like

SELECT * FROM DBO.T209 WHERE C3 > ? AND C200000003 = 'Software/Financial'

Where Parameter stand for Last_Export_Date global variable value.

When I schedule package and run scheduler using SQL job , It always takes
old value of Last_Export_Date.

Here if i open package and execute that last task manually ,
Last_Export_Date gets update properly.

Can you please tell me whats the problem ?
--
Regards
Bharat Jariwala


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

Default Re: DTS Global Variable not saved. - 01-04-2006 , 12:22 AM






Hello Bharat,

So the problem is only when executing the package as a job?

It does sound as though the setting of the GV is not happening as if it was
then there would be no issue. What I think might be happening is that the
package is not as successful as reported.

Can you set the package to fail on first error?

Can you execute the package in designer as the account that would run the
package and to find out who that is look at this article

http://support.microsoft.com/?kbid=269074

When you open the package up in designer remember that you will see the design
time value and not the runtime value.


Allan

Quote:
Hi All,

In DTS project, I have used Global Variable called Last_Export_Date
which store DateTime of Last Export date. I am updating this global
variable in the Last Task of my Package.

So My Insert Statement which i am calling in DataPump Task is like

SELECT * FROM DBO.T209 WHERE C3 > ? AND C200000003 =
'Software/Financial'

Where Parameter stand for Last_Export_Date global variable value.

When I schedule package and run scheduler using SQL job , It always
takes old value of Last_Export_Date.

Here if i open package and execute that last task manually ,
Last_Export_Date gets update properly.

Can you please tell me whats the problem ?




Reply With Quote
  #3  
Old   
bharat jariwala
 
Posts: n/a

Default Re: DTS Global Variable not saved. - 01-04-2006 , 01:18 AM



same problem occured when i run package ,right clicking and selecting
executing package from package list.
--
Regards
Bharat Jariwala



"Allan Mitchell" wrote:

Quote:
Hello Bharat,

So the problem is only when executing the package as a job?

It does sound as though the setting of the GV is not happening as if it was
then there would be no issue. What I think might be happening is that the
package is not as successful as reported.

Can you set the package to fail on first error?

Can you execute the package in designer as the account that would run the
package and to find out who that is look at this article

http://support.microsoft.com/?kbid=269074

When you open the package up in designer remember that you will see the design
time value and not the runtime value.


Allan

Hi All,

In DTS project, I have used Global Variable called Last_Export_Date
which store DateTime of Last Export date. I am updating this global
variable in the Last Task of my Package.

So My Insert Statement which i am calling in DataPump Task is like

SELECT * FROM DBO.T209 WHERE C3 > ? AND C200000003 =
'Software/Financial'

Where Parameter stand for Last_Export_Date global variable value.

When I schedule package and run scheduler using SQL job , It always
takes old value of Last_Export_Date.

Here if i open package and execute that last task manually ,
Last_Export_Date gets update properly.

Can you please tell me whats the problem ?





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

Default Re: DTS Global Variable not saved. - 01-04-2006 , 02:40 PM



Hello Bharat,

I am a little confused then.

At your wkstn you open the package and execute all is fine
At your wkstn you right click on package on the server and select Execute
and all is wrong.


These two methods are identical AFAIK so there should be no discrepancy

Allan


Quote:
same problem occured when i run package ,right clicking and selecting
executing package from package list.

"Allan Mitchell" wrote:

Hello Bharat,

So the problem is only when executing the package as a job?

It does sound as though the setting of the GV is not happening as if
it was then there would be no issue. What I think might be happening
is that the package is not as successful as reported.

Can you set the package to fail on first error?

Can you execute the package in designer as the account that would run
the package and to find out who that is look at this article

http://support.microsoft.com/?kbid=269074

When you open the package up in designer remember that you will see
the design time value and not the runtime value.

Allan

Hi All,

In DTS project, I have used Global Variable called Last_Export_Date
which store DateTime of Last Export date. I am updating this global
variable in the Last Task of my Package.

So My Insert Statement which i am calling in DataPump Task is like

SELECT * FROM DBO.T209 WHERE C3 > ? AND C200000003 =
'Software/Financial'

Where Parameter stand for Last_Export_Date global variable value.

When I schedule package and run scheduler using SQL job , It always
takes old value of Last_Export_Date.

Here if i open package and execute that last task manually ,
Last_Export_Date gets update properly.

Can you please tell me whats the problem ?




Reply With Quote
  #5  
Old   
bharat jariwala
 
Posts: n/a

Default Re: DTS Global Variable not saved. - 01-05-2006 , 01:16 AM



I got the solution.

Problem is that Global variable that i am using only retains its value
within that execution.

so you can not take value of this variable that run last time.

you have to store it somewhere.

What i am doing now is create local file and store this value there so that
i can retrieve it next time my package executed.
--
Regards
Bharat Jariwala



"Allan Mitchell" wrote:

Quote:
Hello Bharat,

I am a little confused then.

At your wkstn you open the package and execute all is fine
At your wkstn you right click on package on the server and select Execute
and all is wrong.


These two methods are identical AFAIK so there should be no discrepancy

Allan


same problem occured when i run package ,right clicking and selecting
executing package from package list.

"Allan Mitchell" wrote:

Hello Bharat,

So the problem is only when executing the package as a job?

It does sound as though the setting of the GV is not happening as if
it was then there would be no issue. What I think might be happening
is that the package is not as successful as reported.

Can you set the package to fail on first error?

Can you execute the package in designer as the account that would run
the package and to find out who that is look at this article

http://support.microsoft.com/?kbid=269074

When you open the package up in designer remember that you will see
the design time value and not the runtime value.

Allan

Hi All,

In DTS project, I have used Global Variable called Last_Export_Date
which store DateTime of Last Export date. I am updating this global
variable in the Last Task of my Package.

So My Insert Statement which i am calling in DataPump Task is like

SELECT * FROM DBO.T209 WHERE C3 > ? AND C200000003 =
'Software/Financial'

Where Parameter stand for Last_Export_Date global variable value.

When I schedule package and run scheduler using SQL job , It always
takes old value of Last_Export_Date.

Here if i open package and execute that last task manually ,
Last_Export_Date gets update properly.

Can you please tell me whats the problem ?





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

Default Re: DTS Global Variable not saved. - 01-05-2006 , 03:31 PM



Hello Bharat,

Which is what I mentioned 2 posts ago.

Allan

Quote:
I got the solution.

Problem is that Global variable that i am using only retains its value
within that execution.

so you can not take value of this variable that run last time.

you have to store it somewhere.

What i am doing now is create local file and store this value there so
that i can retrieve it next time my package executed.

"Allan Mitchell" wrote:

Hello Bharat,

I am a little confused then.

At your wkstn you open the package and execute all is fine
At your wkstn you right click on package on the server and select
Execute
and all is wrong.
These two methods are identical AFAIK so there should be no
discrepancy

Allan

same problem occured when i run package ,right clicking and
selecting executing package from package list.

"Allan Mitchell" wrote:

Hello Bharat,

So the problem is only when executing the package as a job?

It does sound as though the setting of the GV is not happening as
if it was then there would be no issue. What I think might be
happening is that the package is not as successful as reported.

Can you set the package to fail on first error?

Can you execute the package in designer as the account that would
run the package and to find out who that is look at this article

http://support.microsoft.com/?kbid=269074

When you open the package up in designer remember that you will see
the design time value and not the runtime value.

Allan

Hi All,

In DTS project, I have used Global Variable called
Last_Export_Date which store DateTime of Last Export date. I am
updating this global variable in the Last Task of my Package.

So My Insert Statement which i am calling in DataPump Task is like

SELECT * FROM DBO.T209 WHERE C3 > ? AND C200000003 =
'Software/Financial'

Where Parameter stand for Last_Export_Date global variable value.

When I schedule package and run scheduler using SQL job , It
always takes old value of Last_Export_Date.

Here if i open package and execute that last task manually ,
Last_Export_Date gets update properly.

Can you please tell me whats the problem ?




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.