Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7555459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:36:51+00:00 2026-05-30T11:36:51+00:00

I have a SQL Server Job running on server X. Now I have to

  • 0

I have a SQL Server Job running on server X.
Now I have to delete the existing AS(Analysis Services) backup files on server Y and create a fresh backup again. I wrote the required code in a batch file and saved it on hard drive of server X. I am executing this batch file using an execute process task in SSIS.

This SSIS package which is on server X will be run through a SQL Server Job at a particular time in every week.

This batch file executes successfully if I run the package manually, but it’s failing if I run through a scheduled job! I tried this many times but in vain.

Error message says that “Access Denied” for deleting the files on server Y.

Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:36:53+00:00Added an answer on May 30, 2026 at 11:36 am

    When you manually execute the batch file, your credentials are presented to server Y, they are accepted and the OS deletes the file as requested.

    When the SQL Agent run the same file, the SQL Agent service account’s credentials are presented to server Y. Either they are being rejected by the server-it’s not authorized to even look at the box or it can read and list the files on \ServerY\SomeShare but ultimately it is not able to delete a file.

    Resolution

    Option 1) On Server Y, add the account that corresponds to Server X’s SQL Agent Service Account with sufficient privileges to see the folder where the AS backup is and delete the backup.

    Option 2) Create a credential and a proxy on Server X that has the above permissions on Server Y and then execute the SSIS package as that user, assuming of course the credential has all the other permissions Server X’s Agent account does.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a job management application running (Access) with the database in SQL Server
I have a job on SQL Server 2005 running a ssis package. The package
I have a java JAR file that is triggered by a SQL server job.
At my current job we have a CMS system that is .NET/SQL Server based.
We have SQL Server 2005 running on Win2003/64, and we push it hard. We
I have SQL Server Express and Visual Studio Web Developer Express running on my
I have the MS-SQL server and some jobs running every day on it. I
I'm trying to create an automated job for the SQL Server Agent to run.
I have a web application that needs to fire off a long-running SQL Server
Afternoon. I have several SQL Agent jobs running on an MS 2K8 BI server,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.