Link to home
Start Free TrialLog in
Avatar of cat4larry
cat4larry

asked on

BIDS/SSIS Package completes successfully but not executing anything

I have a particular bids/ssis package that I have built and then rebuilt from scratch, the first time I built it was on a 2005 box using VS 2005 against a SQL Server 2005 instance and I just rebuilt it using VS Studio 2010 against the same 2005 DB but the job itself runs on a 2012 DB instance.  Hope that second part makes sense.  Basically the code for the BIDS is on the 2012 DB box along with the job but the DB connection in the BIDS points to the 2005 instance.

Anyway, in both situations the ONLY way to get it to work is to open the package and run it in debug mode.  otherwise, when run as a job, it says it completes successfully but nothing happens.  The data never gets inserted into the DB, the file is never moved, etc.  Another interesting thing is that in debug it takes about 2-3 minutes to execute but when the job runs it finishes in about 5-10 seconds.

Anyone have any idea what could be going on and/or how I can fix this.
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cat4larry
cat4larry

ASKER

Hmmm, I believe the logging of the execution of the package is somewhere in the job set up, correct?  I will log it and see what I get back.  As far as the security context, the only place I can see that coming into play is when it grabs the file.  But I have the security set up to all "Everyone" full control over the folder so that doesn't make sense to me.

Anyway, I'll start logging the execution and see if that helps narrow down the issue.
As far as the security context, the only place I can see that coming into play is when it grabs the file.
Nope.  When you are running it as a SQL Server Agent job, it is running with the startup account used by that service and not your account.
So should I run it under a Proxy Account?
You can.  Or you can simply make sure the account used by SQL Server Agent has access to the appropriate resources as well as ensure you are not using any mapped drives as you are using a service and no one is logged on.
I'm not using a mapped drive per say but I am using a remote location.  I'm accessing that location using it's fully qualified path.  And I'm allowing everyone into the folder.  However, perhaps Everyone only means everyone in that computer's domain?

I'm going to move the file local and see what happens.

BTW, I logged the execution and was getting the following error:

"The application-specific permission settings do not grant Local Activation permission for the COM Server application"

However, I fixed this but still the package didn't run correctly.  I am however not getting any execution errors as far as I can tell.
Nope, still not working.  No more execution errors but still not working.  This is actually starting to drive me insane!!!  I have another package which does virtually the same thing (loop over folder, insert data from file, move file, etc) and it is running perfectly.
Have you even looked to see what account is being used by the SQL Server Agent?  I strongly suspect it is the default Local system account.  If that is the case then it is as simple as changing it to a local user that has a access to all the appropriate local resources or if you are using a remote location use a domain account with the correct permissions.  Trust me, it does not get more difficult than that.
Yes, I've done all that and given appropriate access.  However, I will try setting it to use a different user.  But I still think I am doing this correctly at this point.  I'm not getting any execution errors, I've moved the file folder local, I've set the permissions correctly for the execution error I was getting and the job itself is completely successfully.

Thanks for all your help so far!
ok, new bit of info.  I decided to store the package in the SSIS Catalog instead (just based on how easy it easy to enable verbose logging if you do).  Anyway, when I browse to the package in SSMS Object Explorer and Execute with Verbose logging it completes successfully, inserts data, moves file, etc.  when I run the job with verbose, I get a line at the end that says:

Foreach Loop Container:Warning: The For Each File enumerator is empty. The For Each File enumerator did not find any files that matched the file pattern, or the specified directory was empty.

Interesting?!?!?