dbTalk Databases Forums  

DTS way to tell if DTS job is being run in batch or manually via Designer?

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


Discuss DTS way to tell if DTS job is being run in batch or manually via Designer? in the microsoft.public.sqlserver.dts forum.



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

Default DTS way to tell if DTS job is being run in batch or manually via Designer? - 03-25-2005 , 08:40 AM






without having a manually controlled external value set to test, is there a
global property or something that can be tested to let the scripts control
flow, even just whether or not to issue MsgBox statements?

doug



Reply With Quote
  #2  
Old   
Simon Worth
 
Posts: n/a

Default Re: DTS way to tell if DTS job is being run in batch or manuallyvia Designer? - 03-28-2005 , 11:09 AM






So, you want to be able to tell if the dts package is being run
interactively or by a scheduled job?
So if it is interactively you can issue a message box, but if by a job,
you don't want to issue the message box because there is no user
intervention to get rid of the box?
Is that correct?

I don't know of a way off the top of my head, but you could use a global
variable to do the check.
Set the variable to one value if run by a job, or keep it set the to the
default value if interactively run.
But that conflicts somewhat with your requirement of "without having a
manually controlled external value set to test", although, it wouldn't
be external.

Simon Worth

doug wrote:
Quote:
without having a manually controlled external value set to test, is there a
global property or something that can be tested to let the scripts control
flow, even just whether or not to issue MsgBox statements?

doug



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

Default Re: DTS way to tell if DTS job is being run in batch or manually via Designer? - 03-28-2005 , 05:30 PM



I'm already setting global variables. The msg box is just a CYA display OF
the global variables being set via INI file to anyone subsequently who runs
it interactively to make sure they know what values were set the last time.

doug


"Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote

Quote:
So, you want to be able to tell if the dts package is being run
interactively or by a scheduled job?
So if it is interactively you can issue a message box, but if by a job,
you don't want to issue the message box because there is no user
intervention to get rid of the box?
Is that correct?

I don't know of a way off the top of my head, but you could use a global
variable to do the check.
Set the variable to one value if run by a job, or keep it set the to the
default value if interactively run.
But that conflicts somewhat with your requirement of "without having a
manually controlled external value set to test", although, it wouldn't
be external.

Simon Worth

doug wrote:
without having a manually controlled external value set to test, is
there a
global property or something that can be tested to let the scripts
control
flow, even just whether or not to issue MsgBox statements?

doug





Reply With Quote
  #4  
Old   
Simon Worth
 
Posts: n/a

Default Re: DTS way to tell if DTS job is being run in batch or manuallyvia Designer? - 03-29-2005 , 09:24 AM



right, so what I meant was, set a global variable if run by a job, and
do a check in your code to see what the variable is set to.
IF gvVariable = "Interactive"
MSGBOX "some values"
END IF


Simon Worth

doug wrote:
Quote:
I'm already setting global variables. The msg box is just a CYA display OF
the global variables being set via INI file to anyone subsequently who runs
it interactively to make sure they know what values were set the last time.

doug


"Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote in message
news:ONTlIC7MFHA.568 (AT) TK2MSFTNGP09 (DOT) phx.gbl...

So, you want to be able to tell if the dts package is being run
interactively or by a scheduled job?
So if it is interactively you can issue a message box, but if by a job,
you don't want to issue the message box because there is no user
intervention to get rid of the box?
Is that correct?

I don't know of a way off the top of my head, but you could use a global
variable to do the check.
Set the variable to one value if run by a job, or keep it set the to the
default value if interactively run.
But that conflicts somewhat with your requirement of "without having a
manually controlled external value set to test", although, it wouldn't
be external.

Simon Worth

doug wrote:

without having a manually controlled external value set to test, is

there a

global property or something that can be tested to let the scripts

control

flow, even just whether or not to issue MsgBox statements?

doug






Reply With Quote
  #5  
Old   
doug
 
Posts: n/a

Default Re: DTS way to tell if DTS job is being run in batch or manually via Designer? - 04-07-2005 , 06:29 PM



That doesn't help me much. I'm looking for a system variable that knows.
Like in VB you can check the unattended execution status variable
App.unattendedapp.


"Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote

Quote:
right, so what I meant was, set a global variable if run by a job, and
do a check in your code to see what the variable is set to.
IF gvVariable = "Interactive"
MSGBOX "some values"
END IF


Simon Worth

doug wrote:
I'm already setting global variables. The msg box is just a CYA display
OF
the global variables being set via INI file to anyone subsequently who
runs
it interactively to make sure they know what values were set the last
time.

doug


"Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote in message
news:ONTlIC7MFHA.568 (AT) TK2MSFTNGP09 (DOT) phx.gbl...

So, you want to be able to tell if the dts package is being run
interactively or by a scheduled job?
So if it is interactively you can issue a message box, but if by a job,
you don't want to issue the message box because there is no user
intervention to get rid of the box?
Is that correct?

I don't know of a way off the top of my head, but you could use a global
variable to do the check.
Set the variable to one value if run by a job, or keep it set the to the
default value if interactively run.
But that conflicts somewhat with your requirement of "without having a
manually controlled external value set to test", although, it wouldn't
be external.

Simon Worth

doug wrote:

without having a manually controlled external value set to test, is

there a

global property or something that can be tested to let the scripts

control

flow, even just whether or not to issue MsgBox statements?

doug








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

Default Re: DTS way to tell if DTS job is being run in batch or manually via Designer? - 04-08-2005 , 12:31 AM



Then you are out of luck. DTS just knows that it was told to run. It
has no idea how.

Allan

"doug" <dsmrtn (AT) pacbell (DOT) net> wrote


Quote:
That doesn't help me much. I'm looking for a system variable that knows.
Like in VB you can check the unattended execution status variable
App.unattendedapp.


"Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote in message
news:ubkEBsGNFHA.1176 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
right, so what I meant was, set a global variable if run by a job, and
do a check in your code to see what the variable is set to.
IF gvVariable = "Interactive"
MSGBOX "some values"
END IF


Simon Worth

doug wrote:
I'm already setting global variables. The msg box is just a CYA display
OF
the global variables being set via INI file to anyone subsequently who
runs
it interactively to make sure they know what values were set the last
time.

doug


"Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote in message
news:ONTlIC7MFHA.568 (AT) TK2MSFTNGP09 (DOT) phx.gbl...

So, you want to be able to tell if the dts package is being run
interactively or by a scheduled job?
So if it is interactively you can issue a message box, but if by a job,
you don't want to issue the message box because there is no user
intervention to get rid of the box?
Is that correct?

I don't know of a way off the top of my head, but you could use a global
variable to do the check.
Set the variable to one value if run by a job, or keep it set the to the
default value if interactively run.
But that conflicts somewhat with your requirement of "without having a
manually controlled external value set to test", although, it wouldn't
be external.

Simon Worth

doug wrote:

without having a manually controlled external value set to test, is

there a

global property or something that can be tested to let the scripts

control

flow, even just whether or not to issue MsgBox statements?

doug







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.