Wednesday, March 21, 2012

Package fails when ran as a scheduled job

I have a large number of SSIS packages, which I have developed over the last few months.

Having written and tested them locally, running in VS05 etc - I have moved them to a server, stored in the MSDB database.

I am having real troubles with packages that move tables from one database to another.

I am working on a migration project, so I have several packages that move tables from the source database, into my staging database.

One package which will not run at all, basically just moves 15 tables from database A on my server to database B.

The package is essentially a few SQL tasks to create tables, then a data flow.

The data flow contains the table movements as an OLE DB source to an OLE DB destination. No intermediate processing.

In an attempt to get some meaningful logs of the reasons for failre I ran the package from the commandline with the output piped to a text file. That text file contained the following error:

Error: 2006-11-20 11:48:47.78
Code: 0xC0202009
Source: Data Flow Task Source - tblParking [1641]
Description: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Protocol error in TDS stream".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Communication link failure".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Shared Memory Provider: No process is on the other end of the pipe.
".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Communication link failure".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Shared Memory Provider: No process is on the other end of the pipe.
".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Communication link failure".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Shared Memory Provider: No process is on the other end of the pipe.
".
End Error
Error: 2006-11-20 11:48:47.78
Code: 0xC0047038
Source: Data Flow Task DTS.Pipeline
Description: The PrimeOutput method on component "Source - tblParking" (1641) returned error code 0xC0202009. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
End Error
Error: 2006-11-20 11:48:47.84
Code: 0xC0047021
Source: Data Flow Task DTS.Pipeline
Description: Thread "SourceThread1" has exited with error code 0xC0047038.
End Error

I've googled for most of the error messages there, and tried applying some of the things I found.

I've set the commit size on the OLE DB destination to 10k rows.

I've set the number of engine threads to 2.

The SQL Agent service is started by a domain user that has sufficient server and database roles to do what it needs - other packages run fine.

I'm really stumped here now - this package will run perfectly in visual studio, but fails when ran
as a scheduled task, and I'd really appreciate any advice or pointers

Matthew McNally wrote:

I have a large number of SSIS packages, which I have developed over the last few months.

Having written and tested them locally, running in VS05 etc - I have moved them to a server, stored in the MSDB database.

I am having real troubles with packages that move tables from one database to another.

I am working on a migration project, so I have several packages that move tables from the source database, into my staging database.

One package which will not run at all, basically just moves 15 tables from database A on my server to database B.

The package is essentially a few SQL tasks to create tables, then a data flow.

The data flow contains the table movements as an OLE DB source to an OLE DB destination. No intermediate processing.

In an attempt to get some meaningful logs of the reasons for failre I ran the package from the commandline with the output piped to a text file. That text file contained the following error:

Error: 2006-11-20 11:48:47.78
Code: 0xC0202009
Source: Data Flow Task Source - tblParking [1641]
Description: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Protocol error in TDS stream".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Communication link failure".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Shared Memory Provider: No process is on the other end of the pipe.
".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Communication link failure".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Shared Memory Provider: No process is on the other end of the pipe.
".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Communication link failure".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Shared Memory Provider: No process is on the other end of the pipe.
".
End Error
Error: 2006-11-20 11:48:47.78
Code: 0xC0047038
Source: Data Flow Task DTS.Pipeline
Description: The PrimeOutput method on component "Source - tblParking" (1641) returned error code 0xC0202009. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
End Error
Error: 2006-11-20 11:48:47.84
Code: 0xC0047021
Source: Data Flow Task DTS.Pipeline
Description: Thread "SourceThread1" has exited with error code 0xC0047038.
End Error

I've googled for most of the error messages there, and tried applying some of the things I found.

I've set the commit size on the OLE DB destination to 10k rows.

I've set the number of engine threads to 2.

The SQL Agent service is started by a domain user that has sufficient server and database roles to do what it needs - other packages run fine.

I'm really stumped here now - this package will run perfectly in visual studio, but fails when ran
as a scheduled task, and I'd really appreciate any advice or pointers

Every time I have received this error:

"Communication link failure".

It has been due to network connectivity isuues during the execution of my package; nothing to do with the package itself...not sure if that is always the case.

|||I dont think its a network problem Rafael

Firstly, as there should be no network traffic, as the source and target database are on the same server.

Secondly, the package will consistently fail as a scheduled task. I could run it now manually - and it would be fine. Schedule it to run 2 minutes later - and it will fail.

Actually - I only assume there is no network traffic. The server is called Llama, and my package has two data-sources, both of which are mapped to databases on Llama.

Surely this does not mean that these packages are sending data across the network to talk to the server they reside on?|||

Verify your boot.ini file on that server and make sure that there is no memory limit like using /3GB flag. That will reduce available memory to outside applications. We faced similar issues on "Communication link failure". After removing /3gb limit flag it was running fine.

Best of luck.

Veera Maganti

|||Thanks for your response Veera.

the boot.ini on this server does not have the /3gb switch

The whole boot.ini is:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003, Standard" /fastdetect /NoExecute=OptOut
|||

Well there's your problem right there. Your server is called "Llama". if you upgrade to the "Cheetah" it will run just fine.

just joking... did you try entering a password into the SSIS to encryptsensativedatawithpassword? then schedule it and enter the password in there?

|||

Hi Matthew,

I have the same error, I want to know if you can solve this problem.

Thank you for your help.

Antonio

No comments:

Post a Comment