Solved

SQL Server Agent: SSIS

Posted on 2008-06-23
7
1,177 Views
Last Modified: 2010-04-21
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??
0
Comment
Question by:abussie
  • 4
  • 3
7 Comments
 
LVL 8

Expert Comment

by:srnar
ID: 21849564
"execute the package manually in Integration Services". Does it mean you are running package from Management Studio connected to an Integration service?
0
 

Author Comment

by:abussie
ID: 21850151
Yes, thats wut i mean by running package manually. SQL SERVER 2005 Management Studio connected to Integration Services and Execute package
0
 
LVL 8

Accepted Solution

by:
srnar earned 110 total points
ID: 21855857
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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:abussie
ID: 21858126
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
 

Author Closing Comment

by:abussie
ID: 31469847
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
 

Author Comment

by:abussie
ID: 21864738
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
 
LVL 8

Expert Comment

by:srnar
ID: 21864775
Yes, it is good option. On 64 bit a must. Than you can see compilation error right by red icon in control flow.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delete from table 6 48
How to use TOP 1 in a T-SQL sub-query? 14 48
SQL query to summarize items per month 5 71
Help with stripping out character in SQL LEFT/RIGHT/REPLACE 2 48
There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…

830 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