dbTalk Databases Forums  

Saving a file on remote server

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


Discuss Saving a file on remote server in the microsoft.public.sqlserver.dts forum.



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

Default Saving a file on remote server - 09-24-2004 , 02:15 PM






Hi All,

I have a DTS package that queries a table and generates an Excel file. The
excel file is saved on a remote file server. When I execute the package it
runs fine and saves the file in the correct location. However when I
schedule the package it fails. The error log states that Jet cannot open the
file because it is already open (it doesn't exit yet) or doesn't have
permission. So I am under the impression that it is a permission issue.

My question(s):
What security context does the 'scheduled' package run in? (Server Agent,
SQL account,...?)
Can a package run in a different security context from the Service Agent (or
default context), like the package owner?
What is the proper/best method to save a file on another server?

I do not administer the server so I cannot experiment with different account
options.

Thank you,

Craig

Reply With Quote
  #2  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: Saving a file on remote server - 09-24-2004 , 02:25 PM






More than likely the scheduled task is running under the same account as your
SQLAgent service. Check the permissions of that account. If it's LocalSystem
- assign it to a domain account with the appropriate permissions.

-Pete

"csanborn" <csanborn (AT) discussions (DOT) microsoft.com> wrote:

Quote:
Hi All,

I have a DTS package that queries a table and generates an Excel file. The
excel file is saved on a remote file server. When I execute the package it
runs fine and saves the file in the correct location. However when I
schedule the package it fails. The error log states that Jet cannot open the
file because it is already open (it doesn't exit yet) or doesn't have
permission. So I am under the impression that it is a permission issue.

My question(s):
What security context does the 'scheduled' package run in? (Server Agent,
SQL account,...?)
Can a package run in a different security context from the Service Agent (or
default context), like the package owner?
What is the proper/best method to save a file on another server?

I do not administer the server so I cannot experiment with different account
options.

Thank you,

Craig


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

Default Re: Saving a file on remote server - 09-24-2004 , 02:41 PM



Thanks Peter,

From the error log it does look like the user is System.

Do you know (or anybody) if packeages can run in thier own security context?
Maybe in SQL2005?

Craig

"Peter A. Schott" wrote:

Quote:
More than likely the scheduled task is running under the same account as your
SQLAgent service. Check the permissions of that account. If it's LocalSystem
- assign it to a domain account with the appropriate permissions.

-Pete

"csanborn" <csanborn (AT) discussions (DOT) microsoft.com> wrote:

Hi All,

I have a DTS package that queries a table and generates an Excel file. The
excel file is saved on a remote file server. When I execute the package it
runs fine and saves the file in the correct location. However when I
schedule the package it fails. The error log states that Jet cannot open the
file because it is already open (it doesn't exit yet) or doesn't have
permission. So I am under the impression that it is a permission issue.

My question(s):
What security context does the 'scheduled' package run in? (Server Agent,
SQL account,...?)
Can a package run in a different security context from the Service Agent (or
default context), like the package owner?
What is the proper/best method to save a file on another server?

I do not administer the server so I cannot experiment with different account
options.

Thank you,

Craig



Reply With Quote
  #4  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: Saving a file on remote server - 09-24-2004 , 04:42 PM



As a Windows scheduled task using DTSRUN in a batch or command-line, you could
run as a specific user. I'd really consider setting up the SQL Agent service
to run under some account with limited network access for items such as this.

-Pete

"csanborn" <csanborn (AT) discussions (DOT) microsoft.com> wrote:

Quote:
Thanks Peter,

From the error log it does look like the user is System.

Do you know (or anybody) if packeages can run in thier own security context?
Maybe in SQL2005?

Craig

"Peter A. Schott" wrote:

More than likely the scheduled task is running under the same account as your
SQLAgent service. Check the permissions of that account. If it's LocalSystem
- assign it to a domain account with the appropriate permissions.

-Pete

"csanborn" <csanborn (AT) discussions (DOT) microsoft.com> wrote:

Hi All,

I have a DTS package that queries a table and generates an Excel file. The
excel file is saved on a remote file server. When I execute the package it
runs fine and saves the file in the correct location. However when I
schedule the package it fails. The error log states that Jet cannot open the
file because it is already open (it doesn't exit yet) or doesn't have
permission. So I am under the impression that it is a permission issue.

My question(s):
What security context does the 'scheduled' package run in? (Server Agent,
SQL account,...?)
Can a package run in a different security context from the Service Agent (or
default context), like the package owner?
What is the proper/best method to save a file on another server?

I do not administer the server so I cannot experiment with different account
options.

Thank you,

Craig




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.