dbTalk Databases Forums  

can't find directory when package scheduled as job

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


Discuss can't find directory when package scheduled as job in the microsoft.public.sqlserver.dts forum.



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

Default can't find directory when package scheduled as job - 04-24-2006 , 09:50 AM






I have a DTS package (sql 2000 sp4) that executes correctly when I run it
from the DTS designer but fails when it is scheduled as a SQL Server Agent
job. My sql agent and sql server services both run under my Windows
account.

The failing step is an execute process task that calls a .bat file on a
network drive. The batch file does as follows

p:
cd \email\hold\decrypt\

java ..... [parameter string]

This step calls a java program that decrypts a file.

The error I get is "c:\program files\common files\system\msmapi\1033>p: The
system cannot find the drive specified."

I would think that this would work just fine as the sql agent job runs under
my windows account and the packages executes correctly when run via the DTS
Designer.

Can someone shed some light on this for me.

Many thanks!

Walter
waltmallon (AT) yahoo (DOT) com




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

Default Re: can't find directory when package scheduled as job - 04-24-2006 , 10:03 AM






The service account might be your account but that does not necessarily mean
the package will run as you.

Have a look here

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


--


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com


"Walter Mallon" <waltmallon (AT) yahoo (DOT) com> wrote

Quote:
I have a DTS package (sql 2000 sp4) that executes correctly when I run it
from the DTS designer but fails when it is scheduled as a SQL Server Agent
job. My sql agent and sql server services both run under my Windows
account.

The failing step is an execute process task that calls a .bat file on a
network drive. The batch file does as follows

p:
cd \email\hold\decrypt\

java ..... [parameter string]

This step calls a java program that decrypts a file.

The error I get is "c:\program files\common files\system\msmapi\1033>p:
The system cannot find the drive specified."

I would think that this would work just fine as the sql agent job runs
under my windows account and the packages executes correctly when run via
the DTS Designer.

Can someone shed some light on this for me.

Many thanks!

Walter
waltmallon (AT) yahoo (DOT) com






Reply With Quote
  #3  
Old   
Walter Mallon
 
Posts: n/a

Default Re: can't find directory when package scheduled as job - 04-24-2006 , 10:28 AM



Thanks. I think the issue is that according to the knowlege base article
the sql server agent can't see mapped drived letters (which makes sense as
they are stored in my profile). I will have to use the net use command in
the batch file to map the drive. That may work.

Thanks again.

Walter


"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
The service account might be your account but that does not necessarily
mean the package will run as you.

Have a look here

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


--


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com


"Walter Mallon" <waltmallon (AT) yahoo (DOT) com> wrote in message
news:et%23bm46ZGHA.4292 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
I have a DTS package (sql 2000 sp4) that executes correctly when I run it
from the DTS designer but fails when it is scheduled as a SQL Server Agent
job. My sql agent and sql server services both run under my Windows
account.

The failing step is an execute process task that calls a .bat file on a
network drive. The batch file does as follows

p:
cd \email\hold\decrypt\

java ..... [parameter string]

This step calls a java program that decrypts a file.

The error I get is "c:\program files\common files\system\msmapi\1033>p:
The system cannot find the drive specified."

I would think that this would work just fine as the sql agent job runs
under my windows account and the packages executes correctly when run via
the DTS Designer.

Can someone shed some light on this for me.

Many thanks!

Walter
waltmallon (AT) yahoo (DOT) com








Reply With Quote
  #4  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: can't find directory when package scheduled as job - 04-24-2006 , 02:02 PM



It can be flaky though as you are still using a mapped drive
and they are profile dependent, are not always that reliable
with service accounts. Try using a UNC path instead:
\\ServerName\ShareName\WhateverPath

-Sue

On Mon, 24 Apr 2006 11:28:18 -0400, "Walter Mallon"
<waltmallon (AT) yahoo (DOT) com> wrote:

Quote:
Thanks. I think the issue is that according to the knowlege base article
the sql server agent can't see mapped drived letters (which makes sense as
they are stored in my profile). I will have to use the net use command in
the batch file to map the drive. That may work.

Thanks again.

Walter


"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:eHzEP$6ZGHA.4060 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
The service account might be your account but that does not necessarily
mean the package will run as you.

Have a look here

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


--


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com


"Walter Mallon" <waltmallon (AT) yahoo (DOT) com> wrote in message
news:et%23bm46ZGHA.4292 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
I have a DTS package (sql 2000 sp4) that executes correctly when I run it
from the DTS designer but fails when it is scheduled as a SQL Server Agent
job. My sql agent and sql server services both run under my Windows
account.

The failing step is an execute process task that calls a .bat file on a
network drive. The batch file does as follows

p:
cd \email\hold\decrypt\

java ..... [parameter string]

This step calls a java program that decrypts a file.

The error I get is "c:\program files\common files\system\msmapi\1033>p:
The system cannot find the drive specified."

I would think that this would work just fine as the sql agent job runs
under my windows account and the packages executes correctly when run via
the DTS Designer.

Can someone shed some light on this for me.

Many thanks!

Walter
waltmallon (AT) yahoo (DOT) com








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.