Home > Archive > MS SQL Server DTS > September 2005 > Permission Denied on CopyFile









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Permission Denied on CopyFile
BG

2005-09-28, 11:24 am

I am trying to use an ActiveX script in DTS to copy a file from one
drive to another. Both drives are on the same server as my instance of
SQL2000.

No matter how I run the script (Enterprise Manager, or job) from either
my workstation or logged on to the server, I get the same error:

Error Description: Permission denied

The account that executes the job is in the administrators group on the
server and has full rights to both drives.

The copy command is using full paths and not share names for both the
source and destination files.

What am I missing?

Sue Hoegemeier

2005-09-28, 1:23 pm

You can get that error with copying Excel files if the file
is open. Make sure the file is closed, not in use.

-Sue

On 28 Sep 2005 08:02:45 -0700, "BG" <griffinre@upmc.edu>
wrote:

>I am trying to use an ActiveX script in DTS to copy a file from one
>drive to another. Both drives are on the same server as my instance of
>SQL2000.
>
>No matter how I run the script (Enterprise Manager, or job) from either
>my workstation or logged on to the server, I get the same error:
>
>Error Description: Permission denied
>
>The account that executes the job is in the administrators group on the
>server and has full rights to both drives.
>
>The copy command is using full paths and not share names for both the
>source and destination files.
>
>What am I missing?


BG

2005-09-28, 1:23 pm

The file I'm trying to copy is definitely not in use.

Sue Hoegemeier

2005-09-28, 8:24 pm

Okay...I just noticed that you said the account that owns
the job is in the administrators group on the server. What
matters more is if the job owner is a sysadmin. If the
account that owns the job is not a member of sysadmins, then
the job runs under the security context of the proxy
account. If the owner account is a sysadmin, then the job
runs under the security context of the Agent service
account.
It's not the permissions of the login that owns a job but
rather the permissions of the Agent service if owned by a
sysadmin or the permissions of the proxy account if the job
owner isn't a sysadmin.
You can find more information on permissions and job owners
in the following:
INF: How to Run a DTS Package as a Scheduled Job
http://support.microsoft.com/?id=269074

-Sue

On 28 Sep 2005 10:46:02 -0700, "BG" <griffinre@upmc.edu>
wrote:

>The file I'm trying to copy is definitely not in use.


BG

2005-09-29, 7:24 am

Messages from the job show that it runs under account "sysadmin2" which
has been granted system admin rights on the server. It is also the
same account used to start SQL SERVER. I've read the article you
provided a few times but it still doesn't give me any additional clues.

Sue Hoegemeier

2005-09-29, 7:24 am

If the job is owned by sysadmin2 and sysadmin2 is a member
of the sysadmins group, then the job is executing under the
security context of the SQL Agent service account so that's
the account that is having problems with the permissions.

-Sue

On 29 Sep 2005 04:10:52 -0700, "BG" <griffinre@upmc.edu>
wrote:

>Messages from the job show that it runs under account "sysadmin2" which
>has been granted system admin rights on the server. It is also the
>same account used to start SQL SERVER. I've read the article you
>provided a few times but it still doesn't give me any additional clues.


Darren Green

2005-09-30, 3:23 am

BG wrote:
> I am trying to use an ActiveX script in DTS to copy a file from one
> drive to another. Both drives are on the same server as my instance of
> SQL2000.
>
> No matter how I run the script (Enterprise Manager, or job) from either
> my workstation or logged on to the server, I get the same error:
>
> Error Description: Permission denied
>
> The account that executes the job is in the administrators group on the
> server and has full rights to both drives.
>
> The copy command is using full paths and not share names for both the
> source and destination files.
>
> What am I missing?
>


Just to check, is this file used by a DTS connection prior to the copy?
By used, and mean read or written through a DataPump for example? If so
then right-click the last task (or black line for a DataPump task) and
select Workflow - Properties - Options - Close Connection on completion.

The DTS connections can hang onto files, preventing you using them when
you want.

--
Darren Green
http://www.sqldts.com
http://www.sqlis.com
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com