Solved

SQL Server Agent: SSIS

Posted on 2008-06-23
7
1,168 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
Comment Utility
"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
Comment Utility
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
Comment Utility
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:abussie
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
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 this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now