SSIS Package Execution Error

Posted on 2014-01-12
Last Modified: 2016-02-10
I have a SSIS package that copies a file from one server to another.  The source server is on a workgroup, and the target server is on a domain (if it matters).    The package executes normally in debug mode, but after I deploy the package to sql server, it fails when trying to access the file on the source server.  I assume this is due to a different execution context when running on the server.

I have a mapped drive to the source server, which I am using as the source for the copy function.  The directory where the file exists has read/write for everybody.  I don't understand why access to this file is being blocked.

Since the user that runs the process (SQL Agent) doesn't exist on workgroup source server, I can't add it to security.

Sql Server 2012 R2.
Question by:No1Coder
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
LVL 18

Expert Comment

by:Matthew Kelly
ID: 39774912
What is the error that gets added to the SQL Agent history for the error? Also just to check, have you verified you can access the server drives when you are logged into the SQL server? I am assuming based on your question you are running debug on your machine and then deploying it to a different machine (the sql server)?

For example, if your script is using lettered drives instead of full path the letter drive may not exist. Follow on questions would be, is the SQL Agent running as a custom user or as NETWORK SERVICE?

Author Comment

ID: 39774942
I am using a lettered drive.  When debugging, I am running on the same server (where SQL Server runs).  

I changed the script to use \\ServerName\ShareName\path\file instead of lettered drive.

This works in debug mode, but fails in production mode.  Gets error "User Name or Password is incorrect".  The share in question has Everybody - full control.

I am not sure it this rund under sql server agen, or Integration Services.  For integration services, the user is NT Service\MsDtsServer110.
LVL 18

Expert Comment

by:Matthew Kelly
ID: 39775012
If the SSIS package is running as a job in a scheduled Agent job step it runs as the agent user. Local accounts won't be able to access cross domain resources and it appears your account has access (i.e. why it works in debug).

So try changing the Agent to run as your account and test to see if the deployed package works (or what error it gives then). If that works, create a new domain account and use it as the agent service account. At that point there are other security items you will want to do (such as set the account in domain policy for service logon only), but at this point try your account for testing.

Integration services also has the ability to use "Proxy Accounts" if you needed to only do it for this single job, but usually just running every job as a particular service account is fine for most servers.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 39775073
I used SQL Configuration tool to change both SQL Server agent and SQL Server integration Services to use my domain account.  The agent restarted.  When I run it, gets same error "User name or password error".

Another job that doesn't access the other server runs fine using my credentials.

How do you setup proxy accounts?
LVL 18

Expert Comment

by:Matthew Kelly
ID: 39775131
Although, the proxy just allows you to set different credentials for just a job step; so changing it to your credentials should do the same thing basically. Note they also needed to make sure the user existed on the workgroup server with the same name/password combination, but that doesn't explain why it works in debug for you...

You may also want to look in the Windows event logs to see if there is any additional information.

Accepted Solution

No1Coder earned 0 total points
ID: 39777555
I got this to work by creating a local account of the source (non-domain) server with credentials that match the domain credentials that the agent is running on.

Author Closing Comment

ID: 39790470

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question