DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Jim Guest

    Deleting files on a remote server w/sql agent ????


    SQL 7.0

    Hello,
    I'm trying to delete files on a remote server thru a job step on one of my
    DB Maintenance plans. I can copy files remotely, no problem, but if I want
    to delete those same remote files it fails every time. I've tried the DEL
    command and a batch file approach. Nothing works.

    On a positive note, I can run the batch file from the command prompt outside
    of SQL and it works fine.

    Is this a security issue... I would appreciate any help.

    thanks,
    Jim

  2. #2
    Scott Guest

    Re: Deleting files on a remote server w/sql agent ????


    Jim,
    Try checking to see if you run the batch file with the same user that
    the SQL agent service is running under (check in Control Panel (Administrative
    Tools) Services. If it is loggin in as local system account, then you are
    most likely running into a permissions issue (the remote Folder probably
    allows the "Everybody" group to add files, but restricts the delete permissions
    (you may also need to check the NTFS permission if they are being used).
    To correct this, you must create, or use an existing, account with permissions
    to do the delete. Then set the Service to run under that account name.
    This problem is also typically seen when trying to set up SQL Mail. Hope
    that helps...

    Scott

    "Jim" <jfarrell@hackley.hbocvan.com> wrote:
    >
    >SQL 7.0
    >
    >Hello,
    >I'm trying to delete files on a remote server thru a job step on one of

    my
    >DB Maintenance plans. I can copy files remotely, no problem, but if I want
    >to delete those same remote files it fails every time. I've tried the DEL
    >command and a batch file approach. Nothing works.
    >
    >On a positive note, I can run the batch file from the command prompt outside
    >of SQL and it works fine.
    >
    >Is this a security issue... I would appreciate any help.
    >
    >thanks,
    >Jim



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links