![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |