简体   繁体   中英

SSIS Error: 0xC0202009 at Data Flow Task, OLE DB Source [1759]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005

I have an SSIS package that is failing toward the end of the file. I need data from 2022-07-01 on but it fails at date 2022-08-12. I tried running everything after the 2022-08-01 to see if there was bad data but it ran fine with no errors. Not sure why it is failing when running from 2022-07-01 on.

在此处输入图像描述

在此处输入图像描述

When I inspect the record after where it failed I don't see anything out of the ordinary plus it did get those when I ran it from 8-1 on so I think that rules out bad data.

在此处输入图像描述

Below is the SQL from the OLEDB Source:

SELECT     
    ord_company, ord_number, ord_customer, ord_bookdate, 
    ord_bookedby, ord_status, ord_originpoint, ord_destpoint, 
    ord_invoicestatus, ord_origincity, ord_destcity, ord_originstate, 
    ord_deststate, ord_originregion1, ord_destregion1, ord_supplier, 
    ord_billto, ord_startdate, ord_completiondate, ord_revtype1, 
    ord_revtype2, ord_revtype3, ord_revtype4, ord_totalweight, 
    ord_totalpieces, ord_totalmiles, ord_totalcharge, ord_currency, 
    ord_currencydate, ord_totalvolume, ord_hdrnumber, ord_refnum, 
    ord_invoicewhole, ord_remark, ord_shipper, ord_consignee, 
    ord_pu_at, ord_dr_at, ord_originregion2, ord_originregion3, 
    ord_originregion4, ord_destregion2, ord_destregion3, 
    ord_destregion4, mfh_hdrnumber, ord_priority, 
    mov_number, tar_tarriffnumber, tar_number, [timestamp], 
    tar_tariffitem, ord_contact, ord_showshipper, ord_showcons, 
    ord_subcompany, ord_lowtemp, ord_hitemp, ord_quantity, 
    ord_rate, ord_charge, ord_rateunit, ord_unit, trl_type1, 
    ord_driver1, ord_driver2, ord_tractor, ord_trailer, ord_length, 
    ord_width, ord_height, ord_lengthunit, ord_widthunit, 
    ord_heightunit, ord_reftype, cmd_code, ord_description, 
    ord_terms, cht_itemcode, ord_origin_earliestdate, 
    ord_origin_latestdate, ord_odmetermiles, ord_stopcount, 
    ord_dest_earliestdate, ord_dest_latestdate, 
    ref_sid, ref_pickup, ord_cmdvalue, ord_accessorial_chrg, 
    ord_availabledate, ord_miscqty, ord_tempunits, ord_datetaken, 
    ord_totalweightunits, ord_totalvolumeunits, ord_totalcountunits, 
    ord_loadtime, ord_unloadtime, ord_drivetime, ord_rateby, 
    ord_quantity_type, ord_thirdpartytype1, ord_thirdpartytype2, 
    ord_charge_type, ord_bol_printed, ord_fromorder, ord_mintemp, 
    ord_maxtemp, ord_distributor, 
    opt_trc_type4, opt_trl_type4, ord_cod_amount, appt_init, 
    appt_contact, ord_ratingquantity, ord_ratingunit, 
    ord_hideshipperaddr, ord_hideconsignaddr, ord_booked_revtype1, 
    ord_mileagetable, ord_tareweight, ord_grossweight, ord_trl_type2, 
    ord_trl_type3, ord_trl_type4, ord_allinclusivecharge, 
    ord_extrainfo1, ord_extrainfo2, ord_extrainfo3, ord_extrainfo4, 
    ord_extrainfo5, ord_extrainfo6, ord_extrainfo7, ord_extrainfo8, 
    ord_extrainfo9, ord_extrainfo10, ord_extrainfo11, ord_extrainfo12, 
    ord_extrainfo13, ord_extrainfo14, ord_extrainfo15, ord_rate_type, 
    ord_barcode, ord_broker, ord_stlquantity, ord_stlunit, 
    ord_stlquantity_type, ord_fromschedule, ord_schedulebatch, 
    last_updateby, last_updatedate, ord_mileage_adj_pct, 
    ord_trlrentinv, ord_revenue_pay_fix, ord_revenue_pay, 
    ord_reserved_number, ord_customs_document, 
    ord_charge_type_lh, ord_noautosplit, ord_noautotransfer, 
    ord_complete_stamp, ord_totalloadingmeters, 
    ord_totalloadingmetersunit, ord_entryport, ord_exitport, 
    ord_commodities_weight, ord_intermodal, ord_dimfactor, 
    external_id, external_type, Ord_UnlockKey, ord_TrlConfiguration, 
    ord_origin_zip, ord_dest_zip, ord_rate_mileagetable, ord_toll_cost, 
    ord_toll_cost_update_date, ord_raildest, ord_railpoolid, 
    ord_trailer2, ord_odmetermiles_mtid, ord_route, 
    ord_route_effc_date, ord_route_exp_date, ord_order_source, 
    ord_edipurpose, ord_ediuseraction, ord_edistate, 
    ord_no_recalc_miles, ord_editradingpartner, ord_edideclinereason, 
    ord_miscdate1, ord_carrier, ord_pyd_status_1, ord_pyd_status_2, 
    rd_pin, ord_accounttype, ord_batchrateeligibility, 
    ord_batchratestatus, ord_odometer_start, ord_odometer_end, 
    ord_billmiles, ord_paymiles, ord_standardhours, 
    ord_preventexternalupdate, ord_job_ordered, ord_job_remaining, 
    ord_shortcomment, ord_lastratedate, ord_manualeventcallminutes, 
    ord_manualcheckcallminutes, sv_manu_export_flag, ord_cbp, 
    ord_cyclic_dsp_enabled, ord_preassign_ack_required, 
    ord_anc_number, ord_gvw_unit, ord_gvw_amt, ord_gvw_adjstd_unit, 
    ord_gvw_adjstd_amt, ord_BelongsTo, ord_thirdpartytype3, 
    ord_thirdparty_split_percent, ord_thirdparty_split, ord_chassis, 
    ord_chassis2, ord_showasconsignee_dist, 
    ord_use_showasconsignee_dist, ord_nomincharges, 
    car_key, GST_REQ, QST_REQ, ord_carrierchangecode, 
    ord_extequip_automatch, IVA_REQ, ord_broker_percent, 
    ord_target_margin, ord_paystatus_override, ord_customdate, 
    ord_timezone, ord_datepromised, ord_edistate_prior, 
    ord_pallet_type, ord_pallet_count, ord_railramporig, 
    ord_railrampdest, rowsec_rsrv_id, ord_reviewneeded, ord_DelRptSent,   
    recurring_job_flag, ord_remark2, ord_reviewed, ord_reviewedby, 
    ord_revieweddate, ord_routename, ord_billing_usedate, 
    ord_billing_usedate_setting, HST_REQ, ord_ratemode, 
    ord_servicelevel, ord_servicedays, ord_over_credit_limit_approved, 
    ord_over_credit_limit_approved_by, ord_triprpt_last_rundate, 
    ord_invoice_effectivedate, payrollcloseddate, billingcloseddate, 
    ord_override_stop_type, ord_checklisttype, ord_mastermatchpending, 
    ord_railschedulecascadepending, ord_importexport, 
    ord_pendinglegstatusupdate, ord_ediaccepttext, 
    ord_retaintosafefill, ord_submode, ord_job_freightbased, 
    ord_approved, ord_app_eqcodes, ord_qty_ordered, ord_totalmileunits, 
    ord_totalpallets, ord_totalpalletunits, ord_totalcount2, 
    ord_totalcount2units, ord_rate_per, ord_sub_charge, 
    ord_discount_rate, ord_discount, ord_discount_qty, 
    ord_discount_per, ord_disc_tar_number
FROM
    orderheader
WHERE     
    (ord_bookdate > '2022-07-01')

ord_bookdate is in this format: '2022-07-01 00:00:00.000' so I tried saying: WHERE ord_date > '2022-06-30 00:00:00.000' as well with the same error.

Error is below:

SSIS package "C:\Users\Desktop\Code\SSIS_TMW_ORDERHEADER\SSIS_TMW_ORDERHEADER.dtsx" starting.

Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.

Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.

Warning: 0x80049304 at Data Flow Task, SSIS.Pipeline: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available. To resolve, run this package as an administrator, or on the system's console.

Information: 0x40043006 at Data Flow Task, SSIS.Pipeline: Prepare for Execute phase is beginning.

Information: 0x40043007 at Data Flow Task, SSIS.Pipeline: Pre-Execute phase is beginning.

Information: 0x4004300C at Data Flow Task, SSIS.Pipeline: Execute phase is beginning.

Error: 0xC0202009 at Data Flow Task, OLE DB Source [1759]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.

An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Transaction (Process ID 275) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.".

Error: 0xC0047038 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on OLE DB Source 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. There may be error messages posted before this with more information about the failure.

Information: 0x40043008 at Data Flow Task, SSIS.Pipeline: Post Execute phase is beginning.

Information: 0x4004300B at Data Flow Task, SSIS.Pipeline: "CData Snowflake Destination" wrote 44992 rows.

Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning.

Task failed: Data Flow Task
Warning: 0x80019002 at SSIS_TMW_ORDERHEADER: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

SSIS package "C:\Users\Desktop\Code\SSIS_TMW_ORDERHEADER\SSIS_TMW_ORDERHEADER.dtsx" finished: Failure.
The program '[21224] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).

Is there some way to cast this or something that will fix the error?

This has nothing to do with SSIS, the error is pretty simple:

Transaction (Process ID NNN) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."

This means that the query is part of a deadlock (look it up), SQL server decided to "sacrifice" it in order to unlock the situation. Are you working on a busy system? how much time does it take to run this query?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM