s vapv
asked on
SSIS 2012 package not working from SQL Server Agent job
Hi,
We have created an SSIS package which reads csv files from shared path and processes it to dump data into SQL Server 2012. The package was initially developed in 2008 and upgraded to 2012 using SQL Server Data Tools, as our requirement required the packages to run from SQL Server 2012.
We scheduled the package as a sql server agent job and try to execute the job using proxy account. The proxy account has access to shared folder from where the csv files are read and has been given permission in the DB as well. we encountered the below error -
Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 1:56:18 AM Error: 2014-11-13 01:56:20.52 Code: 0xC0202020 Source: Data Flow Task Flat File Source [27] Description: The buffer type is not valid. Make sure the Pipeline layout and all components pass validation. End Error Error: 2014-11-13 01:56:20.52 Code: 0xC004701A Source: Data Flow Task SSIS.Pipeline Description: Flat File Source failed the pre-execute phase and returned error code 0xC0202020. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 1:56:18 AM Finished: 1:56:20 AM Elapsed: 2.23 seconds. The package execution failed. The step failed.,00:00:02,0,0,,,,0
When we tried to run the another package that was developed using SSDT also, it failed to execute. On setting the
package to run in 32 bit mode in the execution options tab of the job step, it works. We need to execute this in 64 bit mode only.
If anybody has encountered this issue, kindly let us know how to resolve this. Any help is highly appreciated.
Thanks,
svapv
We have created an SSIS package which reads csv files from shared path and processes it to dump data into SQL Server 2012. The package was initially developed in 2008 and upgraded to 2012 using SQL Server Data Tools, as our requirement required the packages to run from SQL Server 2012.
We scheduled the package as a sql server agent job and try to execute the job using proxy account. The proxy account has access to shared folder from where the csv files are read and has been given permission in the DB as well. we encountered the below error -
Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 1:56:18 AM Error: 2014-11-13 01:56:20.52 Code: 0xC0202020 Source: Data Flow Task Flat File Source [27] Description: The buffer type is not valid. Make sure the Pipeline layout and all components pass validation. End Error Error: 2014-11-13 01:56:20.52 Code: 0xC004701A Source: Data Flow Task SSIS.Pipeline Description: Flat File Source failed the pre-execute phase and returned error code 0xC0202020. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 1:56:18 AM Finished: 1:56:20 AM Elapsed: 2.23 seconds. The package execution failed. The step failed.,00:00:02,0,0,,,,0
When we tried to run the another package that was developed using SSDT also, it failed to execute. On setting the
package to run in 32 bit mode in the execution options tab of the job step, it works. We need to execute this in 64 bit mode only.
If anybody has encountered this issue, kindly let us know how to resolve this. Any help is highly appreciated.
Thanks,
svapv
ASKER
Thanks very much for your response.
We tried out what you mentioned, bu it didn't work. Actually the problem seems to be with the script component, the InputBuffer Row returns NULL in 64 bit execution, If we execute in 32-bit, it is working.
Is there any solution to fix the script component issue that are migrated from 2008 to 2012?
We tried out what you mentioned, bu it didn't work. Actually the problem seems to be with the script component, the InputBuffer Row returns NULL in 64 bit execution, If we execute in 32-bit, it is working.
Is there any solution to fix the script component issue that are migrated from 2008 to 2012?
Could you post more info about the job? For example, a screengrab of the SSIS control and data flows would help with context! Your error very clearly states that it is a Flat File source generating the problem, not a script task, which you didn't mention before.
Are you building the package on a 32-bit machine and then trying to run it on a 64-bit machine, by any chance (you might get the wrong library code included).
One other question: is it actually absolutely necessary to run it in 64-bit mode? Some things just don't, like the Excel I/O ! It may be a lot easier for you just to accept this one as a 32-bit package.
hth
Mike
Are you building the package on a 32-bit machine and then trying to run it on a 64-bit machine, by any chance (you might get the wrong library code included).
One other question: is it actually absolutely necessary to run it in 64-bit mode? Some things just don't, like the Excel I/O ! It may be a lot easier for you just to accept this one as a 32-bit package.
hth
Mike
keep 32 bit execution and move on
Excel error 64-bit version of SSIS
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/289e29ad-26dc-4f90-bad4-ffb86c76e5f9/excel-error-64bit-version-of-ssis
The Excel Connection Manager is not supported in the 64-bit version of SSIS
https://merlecarr.wordpress.com/2011/02/12/the-excel-connection-manager-is-not-supported-in-the-64-bit-version-of-ssis/
How to solve SSIS error code 0xC020801C/0xC004700C/0xC0 047017
http://www.codeproject.com/Articles/534651/HowplustoplussolveplusSSISpluserrorpluscodeplus-xC
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/289e29ad-26dc-4f90-bad4-ffb86c76e5f9/excel-error-64bit-version-of-ssis
The Excel Connection Manager is not supported in the 64-bit version of SSIS
https://merlecarr.wordpress.com/2011/02/12/the-excel-connection-manager-is-not-supported-in-the-64-bit-version-of-ssis/
How to solve SSIS error code 0xC020801C/0xC004700C/0xC0
http://www.codeproject.com/Articles/534651/HowplustoplussolveplusSSISpluserrorpluscodeplus-xC
Eugene7: s vapv is not using Excel for import, but a flat file connector (see text of error message and his original statements). However, if he is having problems with a script task then he may be using some included code that is 32-bit-only ... hence my suggestion that he consider remaining as a 32-bit operation if possible.
hth, s vapv,
Mike
hth, s vapv,
Mike
yes, it is correct
32 bit is still SSIS friend
32 bit is still SSIS friend
"yes, it is correct
32 bit is still SSIS friend"
Looks like you were in a hurry there. Could you explain please?
thx, Mike
32 bit is still SSIS friend"
Looks like you were in a hurry there. Could you explain please?
thx, Mike
please, see the posted above links, even some for excel - but they are self explanatory, unless you are asking for some specifics that would need this SISS be reviewed in a SSDT, check what sql server edition was used to develop this SSIS (64 -32 bit), what office tool, what sql service, pack, was it upgraded, etc. Even maybe redesign starting by generation a New SSIS via Export\import..
as you know, EE has limits to see the requestor screen and read mind.
If it is what you are asking.
Thx
as you know, EE has limits to see the requestor screen and read mind.
If it is what you are asking.
Thx
ASKER
Thanks for all your suggestions.
Yes, it was developed in 32-bit and we are trying to migrate it to 64-bit. As mentioned, the script component is the one creating the problem. We are using flat file connector and not excel, but the flat file source is csv. I understand that there could be a problem with any of the underlying components that is used in the script, maybe any of it is using 32- bit still. The script component is called for errored out rows in the flat file.
The script component has the below code
/* Microsoft SQL Server Integration Services Script Component
* Write scripts using Microsoft Visual C# 2008.
* ScriptMain is the entry point class of the script.*/
using System;
using System.Text;
[Microsoft.SqlServer.Dts.P ipeline.SS ISScriptCo mponentEnt ryPointAtt ribute]
public class ScriptMain : UserComponent
{
#region Constant Varibles
StringBuilder sbExceptionMail= new StringBuilder();
string strErrorDescription = string.Empty;
string strFileName = string.Empty;
#endregion
public override void PreExecute()
{
base.PreExecute();
/*
Add your code here for preprocessing or remove if not needed
*/
}
public override void PostExecute()
{
base.PostExecute();
/*
Add your code here for postprocessing or remove if not needed
You can set read/write variables here, for example:
Variables.MyIntVar = 100
*/
Variables.vExceptionLogErr orMail = sbExceptionMail.ToString() ;
//MessageBox.Show(sbExcept ionMail.To String());
}
public override void Input0_ProcessInputRow(Inp ut0Buffer Row)
{
Row.ErrorDescription = ComponentMetaData.GetError Descriptio n(Row.Erro rCode);
strFileName=Row.FileType.T oString()+ DateTime.N ow.ToStrin g("MMddyyy y");
strErrorDescription = "The File " + strFileName + "Contains Following Error";
sbExceptionMail.Append("<t r><td style='border: 1px solid black'>" + Row.FileType.ToString() + "</td><td style='border: 1px solid black'>" + DateTime.Now.ToString() + "</td><td style='border: 1px solid black'>"+strErrorDescripti on+"\n"+ Row.ErrorDescription.ToStr ing() + "</td></tr>");
}
}
Will try out your suggestions and keep you posted on the updates.
Thanks once again for your response.
Yes, it was developed in 32-bit and we are trying to migrate it to 64-bit. As mentioned, the script component is the one creating the problem. We are using flat file connector and not excel, but the flat file source is csv. I understand that there could be a problem with any of the underlying components that is used in the script, maybe any of it is using 32- bit still. The script component is called for errored out rows in the flat file.
The script component has the below code
/* Microsoft SQL Server Integration Services Script Component
* Write scripts using Microsoft Visual C# 2008.
* ScriptMain is the entry point class of the script.*/
using System;
using System.Text;
[Microsoft.SqlServer.Dts.P
public class ScriptMain : UserComponent
{
#region Constant Varibles
StringBuilder sbExceptionMail= new StringBuilder();
string strErrorDescription = string.Empty;
string strFileName = string.Empty;
#endregion
public override void PreExecute()
{
base.PreExecute();
/*
Add your code here for preprocessing or remove if not needed
*/
}
public override void PostExecute()
{
base.PostExecute();
/*
Add your code here for postprocessing or remove if not needed
You can set read/write variables here, for example:
Variables.MyIntVar = 100
*/
Variables.vExceptionLogErr
//MessageBox.Show(sbExcept
}
public override void Input0_ProcessInputRow(Inp
{
Row.ErrorDescription = ComponentMetaData.GetError
strFileName=Row.FileType.T
strErrorDescription = "The File " + strFileName + "Contains Following Error";
sbExceptionMail.Append("<t
}
}
Will try out your suggestions and keep you posted on the updates.
Thanks once again for your response.
btw, is your development machine 64-bit or 32-bit?
Mike
Mike
ASKER
It's a 64-bit.
Thanks,
Svapv
Thanks,
Svapv
This may seem weird, but destroy the script task, complete the package without it, save it and close. Re-open and add the script task again - with a different name, and add the code again. Make the error message slightly different. Compile, save, and run the package. Then deploy and see if you still have the same problem. If so, consider seriously staying with 32bit for now.
hth
Mike
hth
Mike
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
worked after changing the machine
hth
Mike