all groups > sql server dts > july 2007 >
You're in the

sql server dts

group:

Batch File in DTS


Batch File in DTS thanksforhelp
7/30/2007 3:12:02 PM
sql server dts:
Hi,

I have a batch file, copies a xls file for one dir to another and delete
source file. This works in DTS package, but when I schedule the package, it
fails.

Re: Batch File in DTS thanksforhelp
7/31/2007 12:02:05 PM
Hi Russell,

Thanks for your time.

Yes, it is SQL server 2000.

I am doing by remote desktop connection to the server. And it is same login
that is sa in the sql server and use for sql server agent login. I even made
the folder a shared folder to open for all to access.

The batch file is also in the same folder.

Let me know if I have to check on anything else.

thanks in advance.

[quoted text, click to view]
Re: Batch File in DTS Russell Fields
7/31/2007 2:23:36 PM
Hello,

I assume that you are running SQL Server 2000.

If you tested this on your desktop, then the DTS package was running with
your security credentials.

But, when you schedule the job the SQL Agent you will be running in the
server context with the credentials of either the server account (if the job
is run as a system administrator) or else of the SQL Agent proxy account.
If the necessary account does not have rights to the folders, then the job
will fail.

SQL Server 2005 supports many proxy accounts which can be granted the
appropriate rights. (Even your personal Windows login can be turned into a
SQL Agent proxy. (But I don't recomment that.))

RLF

[quoted text, click to view]

Re: Batch File in DTS Russell Fields
8/2/2007 3:44:56 PM
thanksforhelp,

Are you saying that you are remoting the server and logging in as the
Windows account that is also the service account for SQL Server? If that is
the case, then your security context is the same, so there should be no
context problem.

Are you getting any error in the SQL Agent job history? What is it saying?

I understand that when you say "it is the same login that is sa" you mean
that the logis is a member of the sysadmin role.

RLF
[quoted text, click to view]

AddThis Social Bookmark Button