.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Error while executing a package through SQL Server Agent

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
Hi All,   I have a ssis package. It has 3 tasks, first task updates a record in Oracle database to set an Indicator to “Y”, second task process SSAS Cube and the third again updates the same record and sets the indicator to “N”. This package has 2 data sources, one is Oracle and the other is Analysis Services. I gave the credentials for the Oracle and use NT Authority for Analysis services.   When I am executing from BIDS package is executing successfully. But when I am calling the job to execute this package its throwing me the error. Below is the error.     Message Executed as user: User\Username. ...ion 9.00.4035.00 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  10:57:46 AM  Error: 2010-08-27 10:57:46.79     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2010-08-27 10:57:47.16     Code: 0xC0202009     Source: Ord_test Connection manager &q

View Complete Post

More Related Resource Links

sql server agent - job schedule 22022 error


Hi ! I have scheduled a job in sql server 2008 to send birthday e-mails. I run the script and it looks wroking but in agent schedule it doesn't. I am getting the below error; what is the problem?

TITLE: Microsoft.SqlServer.Smo
Start failed for Job 'Sending_transferdb_birthdate_e-mails'. 
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Start+Job&Link

Error starting SQL Server Agent - Could not load the DLL xpstar90.dll. Reason: 126

AD Service account password was changed.  Now the SQL Server Agent (MSSQLSERVER) will not start even after updating the password.  Have no access into the databases.  Log files say "Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.)."  Service Account has Full rights on system.  Any help in solving the problem would be great.

SSIS Package working on SQL Client Machine but when trying to run on SQL Server machine giving error

Hi We are trying to run SSIS package on sql server machine but sometimes it is giving error for data flow task containing Script Component. Error is - [SSIS.Pipeline] Error: component "SCR DimensionRelation" (1) failed the post-execute phase and returned error code 0x80004002. This error is not coming continuously. And also not for specific DFT. It comes for different DFTs as we rerun the package. Can anybody help me on this? We are using SQL server 2008. We are not getting any error on client machine :(:(

SSIS package fails under SQL Server Agent job


Hi All

I have designed a SSIS package to encrypt a file using Cipher (EFS) it works fine from BIDS & Package Execution Utility.

But SQL Server Agent job is failing to do this. I am getting the error as

" In executing C:\Windows\System32\Cipher.exe /e /a C:\Test.txt at "",The Process Exit code was 1 while the expected was 0." 


Please help me.




Sql Server Agent stops executing jobs


Hello everyone.  I'm having a problem with the sql server agent occasionally not executing its scheduled jobs, and unless the sql server agent is restarted they will not execute according to their schedule.  I've read many posts on people having problems with running a package manually and then not being able to run it in a job, although that is not my problem since these are jobs that have all run successfully historically, and only until the agent is restarted do they start working again.  It is the strangest thing.....we have many different jobs on this server and all of them will just mysteriously stop being executed.  Two other things of note, the agent and server processes both run on AD accounts, and we receive this error:


SQL Server Scheduled Job 'X' - Status: Failed - Invoked on: 2007-10-27 02:00:00 - Message: The job failed.  Unable to determine if the owner (AD\adacct) of job 'X' has server access (reason: Unable to connect to server - check SQL Server and SQL Server Agent errorlogs).


Any help would be greatly appreciated.

Error while executing SSIS package from a Stored Procedure


I am getting an error while executing a SSIS Package from SQL Server Stored Procedure.  But when I run it in BIDS, it executes successfully. Any help on this ???

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occured.  Error Code: 0x80040ED. An OLE DB record is available. Source "Microsoft OLE DB Provider for Oracle" Hresult 0x80040eD Description: "ORA-01017: invalid username/password; logon denied"

SSIS package on standalone server invoked by SQL Server Agent raises DTS_E_PRODUCTLEVELTOLOW


I have developed an SSIS 2005 package but the client was reluctant to install SSIS on their SQL Server and instead installed it (SSIS) on an IIS server which doesn't have SQL Server on it all. Microsoft documentation surprisingly indicated this would work. http://technet.microsoft.com/en-gb/library/cc966389.aspx states "SSIS packages can also be run on systems where SQL Server is not installed. However, the .NET Framework and the SSIS runtime must be installed in order to execute the packages on systems that do not have SQL Server 2005 installed."

The package can be run from within BIDS and by invoking from the SSIS server fine and runs to completion. It fails when invoked by the SQL Server Agent on the actual SQL Server (i.e. NOT the SSIS server) (which IS Enterprise version) and raises a DTS_E_PRODUCTLEVELTOLOW error. This is the third "step" out of three and is a fairly basic data flow task where the results of a SQL Server proceedure are output to a text file.

I have logging on which doesn't tell me anything more than I already knew
OnError,<ServerName>,<SQLServerAgentUser>,<PackageName>,{C88F42DE-E3A8-40CB-A140-F10E270C5F1F},{1D2B421E-E067-4458-A908-23C7F081EF28},9/30/2010 4:52:21 PM,9/30/2010 4:52:21 PM,-1073450754,0x,

SQL Agent - Running SSIS Package - Windows Server 2008/Windows 7 - Messenger Services


We have tried to run a SQL job for SSIS Package. But it failed during the execution with the error "[364] The Messenger service has not been started - NetSend notifications will not be sent". But in the job, no notifications have been configured and in windows server 2008/Windows-7 there is no messenger service at all.

When we search for the the messenger service in windows 7/windows server 2008, we found that service is not in both the OS and it was replaced by msg.exe. 

Any help or workaround would be appreciated.

Thanks in advance.

PS: The normal SQL jobs other than SSIS are working fine without any error.

Vijay Pandurangan

SQL Server Agent Job And Database Mail - Error formatting query, probably invalid paramters


We have a stored procedure that we are trying to call with a SQL Server Agent Job. The stored procedure calls Database Mail. This is SQL 2008. The execute task is simply:


USE [Production]




When the job runs, it is erroring out immediately, with the error:

Execute as user: NT AUTHORITY\NETWORK SERVICE. Error formatting query, probably invalid paramters [SQLSTATE 42000] (Error 22050). The step failed.

When we go into SQL Server Manager and just execute the SQL query, it works though. Something within the SQL Server Agent job,  and Database Mail is causing problems. Any ideas? Thanks.



SSIS package which reads excel files fails on SQL Server Agent



I have a SSIS package which reads an excel file and loads data into a table using script component(C#) as a source. The package runs without any errors when I manually run it on my machine and on the server. But the package fails when run as a SQL Server Agent job.

I tried all the possible fixes I found on the web but still can't get it to work.

Could you shed some light on it?



Error Executing Package for Analysis Cube in GP 10 (More than one code)



i installed GP 10 in SQL 2008 and windows 2008, and then installed the analysis cubes.

when try to execute the package DynamicsGP__to__Package_Master i got the error:

Error: the column "INTERID" can not be processed because more than one code page (1252 and 1256) are specified for it.

Error: the column "CMPNYNAM" can not be processed because more than one code page (1252 and 1256) are specified for it.

after searching, i found answers by Mr. Mohammad R. Daoud about removing any linked server, so i take a copy of the data and installed in another test server but it gave me the same error. i checked the test server for any linked server but there isn't any.

what should i do? i need to to make it work in the test server, and also in the real linked server.


Parameter error writing to excell 2007 file using SQL 2008 Server Agent JOB, works in BIDS.


I am getting the following error message when I try to run a script that writes to an excel file calling my Package with a SQL 2008 JOB.

Executed as user: xxxx\xxxxxxx. Microsoft (R) SQL Server Execute Package Utility  Version 10.0.1600.22 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Option "12.0;HDR=YES;" is not valid.  The command line parameters are invalid.  The step failed.

This same package runs correctly if I execute it in dev mode in BIDS.  I had to set 64bitmode to false in Dev mode to get it to work.  I set executable options in the job step to 'run in 32 bit mode'  The error message indicates to me it is trying to run in 32 bit mode which should be correct but it doesn't like the extended parameters. .   

Here is my connection string from the data sources tab on the job

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\xxxx.xlsx;Extended Properties="EXCEL 12.0;HDR=YES";

This was filled in ny the connection object for me.  I have read the article closely at http://toddmcdermid.blogspot.com/2009/10/quick-reference-ssis-in-32-and-64-bits.html and still can't figure out what I need to change. 

SQL Server Agent error




I have a job scheduled in SQL Agent Server to run every hr. It worked fine but now it's suddenly failed. I tried running the job from the first Step, it starts running but Stops because of an Error



'An exception occurred while executing a Transact-SQL statement or batch'.

Additional Information

   String or binary data would be truncated.

   The Statement has been terminated. (Microsoft SQL Server, Error: 8152)


When I look at the details, for 'String or binary data would be truncated', in Additional Data

Error Number: 8152
Severity: 16
State: 13
Procedure: sp_get_composite_job_info
Line Number: 131

and Program Location is:

at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(String sqlCommand)


and in details for the message 'An exception occurred while executing a Transact-SQL statement or batch'

Program Location is:

at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithRes

Executing SPs through SQL server agent



I am executing a Sp through SQL server Agent and it is running for ages.

However this same SP was inside a SSIS package and executed using Execute SQL task, and it had finished in quick time.

I am not sure , if there should be any difference because of this ....but would like to get your comments on this ...if this could cause any difference in execution time and performance?

'Package.xsd' Error when creating a Slipstreamed, Prepared Instance of SQL Server 2008 R2



I am trying to create a Prepared Instance of SQL Server 2008 R2 using an install that is Slipstreamed to include SP1. I followed Option 1 as described here http://msdn.microsoft.com/en-us/library/dd638062.aspx and then was creating the Stand-Alone Prepared Instance as described here http://msdn.microsoft.com/en-us/library/ee210664.aspx. The System Configuration Checker passed with no errors, and then I hit this error:

SQL Server Setup has encountered the following error:

The element 'Package' in namespace 'http://www.microsoft.com/sql/slp/Package.xsd' has invalid child element 'Rules' in namespace 'http://www.microsoft.com/sql/slp/Package.xsd'. List of possible elements expected: 'Properties, Datastore, Extensions, MsiPatches, RuleGroups, Sequences' in namespace 'http://www.microsoft.com/sql/slp/Package.xsd' as well as any element in namespace '##other'.

Error code 0x84B10001.

Any ideas as to the problem and solution?






how to prevent an error event from propagating out to the agent job calling the package


I'm using an event handler to handle errors when certain control flow tasks fail.  If I can recover from the error, I set System::Propagate = false.  This appears to have the desired effect in that excution continues to the next task and the error was ignored.  The only problem is that when I launch my package through an SQL Server Agent Job, it reports that the job failed eventhough it really succeeded.  Is there anyway to prevent the error from progagating to the agent job? 

I've alternatively tried using failure precedence constraints and got the same results.

If the errors are handled, I want the job to finish execution with a success status.

Error Running SSIS Package as SQL Agent Job loading a file from network drive, works fine in bids an

Having problems reading an excel file from a networked drive while running a package as a SQL Agent job step as a type "SQL Server Integration Services Package". I have agent running as an AD account, and I can use the execute package utility logged in as this account and it works. When I log into the server as this account, I can see the network drive, read/write/create to folders on the drive but when I try to run the agent job it cant find the file. I tried using the unc path in the config file rather than a mapped drive, still no luck. If I use a local drive (c) in the config file, the job works fine so it has to do with the network drive. Running windows server 2003 standard R2, SQL Server 2005 standard sp3. Any ideas out there?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend