I have a DTS package that writes to a text file on a UNC share (\\servername\folder\folder sort of thing). It works fine when I run it.
When I schedule it as a job, it fails. I can only assume this is a permissions issue. What are my options? So far I can only see:
1 • Run the sql agent with a domain account that has permissions to that specific folder. The problem is that either the agent then has to have broad administrative rights or has to be maintained by someone to add and remove access to various folders around the company which may move at times, adding an additional step to anything. Plus, if the password changes all jobs depending on that domain account blow up. In order for someone to enter the password, they have to know it, and if they leave the company policy says to change passwords, so this option is not looking super attractive.
2 • Write the file to a local folder and use some other process to copy it. I don't like this for many reasons, including adding one more point of failure to an already undesirable text export process.
3 • Some way to make the darn thing work easily. I thought about scheduling an SP which calls the DTS package. But I think someone here has tried that unsuccessfully. For that matter, does anyone have a good article on permission inheritance and such in SQL Server? If I knew more it might help.
4 • Your method that has none of the drawbacks and allows me to write directly to the share (can I give permission on that folder to the source machine's local system account, for example).
Just wondering if anyone has any ideas or the elusive method number 4...
[COLOR=black #e0e0e0]For SQL and technical ideas, visit my blog, Squared Thoughts.
[sub]The best part about anything that has cheese is the cheese.[/sub][/color]
When I schedule it as a job, it fails. I can only assume this is a permissions issue. What are my options? So far I can only see:
1 • Run the sql agent with a domain account that has permissions to that specific folder. The problem is that either the agent then has to have broad administrative rights or has to be maintained by someone to add and remove access to various folders around the company which may move at times, adding an additional step to anything. Plus, if the password changes all jobs depending on that domain account blow up. In order for someone to enter the password, they have to know it, and if they leave the company policy says to change passwords, so this option is not looking super attractive.
2 • Write the file to a local folder and use some other process to copy it. I don't like this for many reasons, including adding one more point of failure to an already undesirable text export process.
3 • Some way to make the darn thing work easily. I thought about scheduling an SP which calls the DTS package. But I think someone here has tried that unsuccessfully. For that matter, does anyone have a good article on permission inheritance and such in SQL Server? If I knew more it might help.
4 • Your method that has none of the drawbacks and allows me to write directly to the share (can I give permission on that folder to the source machine's local system account, for example).
Just wondering if anyone has any ideas or the elusive method number 4...
[COLOR=black #e0e0e0]For SQL and technical ideas, visit my blog, Squared Thoughts.
[sub]The best part about anything that has cheese is the cheese.[/sub][/color]