![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 ? |
#3
| |||
| |||
|
|
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 ? |
#4
| |||
| |||
|
|
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 ? |
#5
| |||
| |||
|
|
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 ? |
#6
| |||
| |||
|
|
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 ? |
![]() |
| Thread Tools | |
| Display Modes | |
| |