Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS and delting/renaming a file

Status
Not open for further replies.

bfaul

IS-IT--Management
Oct 4, 2000
2
CA
If anyone can help me with this it would be appreciated.

I'm running a DTS job which has a stored procedure in it, that tries to do either a xp_cmdshell 'move' or 'erase' command in it. The problem is that I can get this code to work from a stored procedure from within the query analyzer, but not when this runs as a DTS job either scheduled or manually run. I can copy the file using 'xp_cmdshell copy'.

Any help would be appreciated.

B.
 
The most likely problem is that the login used to run the DTS job doesn't have sufficient permissions to delete the file. The login used when you run the SP has sufficient permissions as evidenced by the success of the run.

DTS jobs run with specific logins depending on several factors. Read this FAQ (faq183-280) for some guidelines.

You might also want to read this Microsoft article.

INF: How to Run a DTS Package as a Scheduled Job
Terry
_____________________________________
Man's mind stretched to a new idea never goes back to its original dimensions. - Oliver Wendell Holmes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top