Wednesday, February 15, 2012

DTS that runs an .exe with UI requests

I am running an executable from a DTS paskage which opens a file with it's
associated program and saves it as another format. It works fine if I run i
t
manually but if I let the scheduled job try to run it, it hands and times
out. I believe this is because the program is trying to write to the displa
y
on the server and it can't even thought the code does not specify to display
the app. Is there a work-around for this? Should I specify in the code of
the exe a Windows login to run the program in? If so, how?
Much appreciated!
MattHi,
My experience is: the UI requirement is not the hurdle unlesss you let it
wait for a human to input something. Suggest to check file path setting, try
using UNC file path. Normally, when SQL Agent runs the program, it uses
another Windows account, so may not see the same drive mapping as those when
you run it manually.
James
"Matt Sonic" wrote:

> I am running an executable from a DTS paskage which opens a file with it's
> associated program and saves it as another format. It works fine if I run
it
> manually but if I let the scheduled job try to run it, it hands and times
> out. I believe this is because the program is trying to write to the disp
lay
> on the server and it can't even thought the code does not specify to displ
ay
> the app. Is there a work-around for this? Should I specify in the code o
f
> the exe a Windows login to run the program in? If so, how?
> Much appreciated!
> Matt|||Thanks James,
I use this string \\<IP Address>\<Folder>\<Folder>\<File Name.ext>
It works if I run the DTS Package but not the scheduled Job? The job runs
under my login and I can open the file from Windows Explorer.
"James Ma" wrote:
> Hi,
> My experience is: the UI requirement is not the hurdle unlesss you let it
> wait for a human to input something. Suggest to check file path setting, t
ry
> using UNC file path. Normally, when SQL Agent runs the program, it uses
> another Windows account, so may not see the same drive mapping as those wh
en
> you run it manually.
> James
> "Matt Sonic" wrote:
>|||What do you mean by "The job runs under my login"? I guess you just start th
e
job under your login, but that doesn't mean the SQL Agent will use your logi
n
to run the job. Can go to see SQLSERAGENT service's logon tab, that is the
login actually being used. Make sure that login can see and access to those
files and folders.
James
"Matt Sonic" wrote:
> Thanks James,
> I use this string \\<IP Address>\<Folder>\<Folder>\<File Name.ext>
> It works if I run the DTS Package but not the scheduled Job? The job runs
> under my login and I can open the file from Windows Explorer.
> "James Ma" wrote:
>|||The Owner of the job is MyDomain.MyUserName
Do you mean the Service Startup Account? 'SQLSERAGENT service's logon tab'
SQL Server Agent > Properties > General Tab...
"James Ma" wrote:
> What do you mean by "The job runs under my login"? I guess you just start
the
> job under your login, but that doesn't mean the SQL Agent will use your lo
gin
> to run the job. Can go to see SQLSERAGENT service's logon tab, that is the
> login actually being used. Make sure that login can see and access to thos
e
> files and folders.
> James
> "Matt Sonic" wrote:
>|||It doesn't use the owner's account. Yes, it uses SQLSERVERAGNET's service
startup account. I am using SQL Server 2000 here.
James
"Matt Sonic" wrote:
> The Owner of the job is MyDomain.MyUserName
> Do you mean the Service Startup Account? 'SQLSERAGENT service's logon tab
'
> SQL Server Agent > Properties > General Tab...
> "James Ma" wrote:
>|||BTW, you can try using RUNAS.exe tool to launch your application to simulate
your login.
"Matt Sonic" wrote:
> The Owner of the job is MyDomain.MyUserName
> Do you mean the Service Startup Account? 'SQLSERAGENT service's logon tab
'
> SQL Server Agent > Properties > General Tab...
> "James Ma" wrote:
>|||Still stuck. I can't use RUNAS.exe because it prompts for a password which
I
can't have because I want this to run on the server with no interaction from
users. I've got it to this point. The exe file runs but it does not open
the software it is codded to. This line fails.
Set objSEApp = CreateObject("SolidEdge.Application")
I use these two lines so it doesn't ping the UI
objSEApp.Visible = False
objSEApp.DisplayAlerts = False
The Service startup account is set to a specific account. Would there have
to be a Windows login created on the server for that account? I don't know
if servers have login acounts!
Thanks for the help!
"James Ma" wrote:
> BTW, you can try using RUNAS.exe tool to launch your application to simula
te
> your login.
> "Matt Sonic" wrote:
>

No comments:

Post a Comment