SQL Server Agent: SSIS

I have an SSIS package in SQL Server 2005. When I deployed the package to the SQL Server and execute the package manually in Integration Services. The package executes without a problem. However, when I schedule a new jon under SQL Server Agent and start the job i get the following error

 Source: Import Nmcbq ConvertToMDY [2454]     Description: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.CreateUserComponent()  End Error  

Why is the package erroring out when executing the Job but not when i run the package??
abussieAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
srnarConnect With a Mentor Commented:
Can you create a simple SSIS package without any scripting tasks, deploy it on Integration services, run it manually and from Agent?

Than you can eliminate possible deployment problem or concentrate on the scripting task.
0
 
srnarCommented:
"execute the package manually in Integration Services". Does it mean you are running package from Management Studio connected to an Integration service?
0
 
abussieAuthor Commented:
Yes, thats wut i mean by running package manually. SQL SERVER 2005 Management Studio connected to Integration Services and Execute package
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
abussieAuthor Commented:
Yes, i did the previous tasks without any problems. So does the problem reside in the scripting? If so, why does it run without any problems locally and in integrations then craps out in SQL Server Agent
0
 
abussieAuthor Commented:
You were right the error was in the scripting code i updated the custom script and it ran without any problems. Its still wierd that the error was never caught until I scheduled a job via SQL Server Agent you would of thought that the bug would of got caught in Business Intelligence Studio or Integration Services.
0
 
abussieAuthor Commented:
I had to set the property Pre-compile to TRUE on the Custom Script Component for it to run with the SQL Server Agent. Problem solved my package runs under SQL Server Agent now after i set the pre-compile on the custom script component to TRUE
0
 
srnarCommented:
Yes, it is good option. On 64 bit a must. Than you can see compilation error right by red icon in control flow.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.