OracleException: ORA-03106: fatal two-task communication protocol error

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Glenn
Posts: 7
Joined: Thu 25 Oct 2012 11:16

OracleException: ORA-03106: fatal two-task communication protocol error

Post by Glenn » Tue 27 Feb 2018 10:50

Hi

I upgraded from 8.5 to 9.5.454.
I connect in direct mode to Oracle 11.2.0.4.

Now, when reading from a view with 61 columns I get
"OracleException: ORA-03106: fatal two-task communication protocol error".
I do not get the exception if the view contains less than 31 columns.
I get the same exception using Devart.Data.Oracle.OracleCommand with "select * from xx"
or through a datacontext: GetTable<xx>().ToList()

Best regards
Glenn Andersen
Denmark

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: OracleException: ORA-03106: fatal two-task communication protocol error

Post by Pinturiccio » Wed 28 Feb 2018 13:25

We could not reproduce the issue. Please post here the DDL script of your table and the full query required for reproducing the issue.

Glenn
Posts: 7
Joined: Thu 25 Oct 2012 11:16

Re: OracleException: ORA-03106: fatal two-task communication protocol error

Post by Glenn » Thu 01 Mar 2018 13:04

OK, Here is the script for the view

Code: Select all

CREATE OR REPLACE FORCE VIEW AM_SPORLEVII.V_SPORLEV_SAMLET
(
   ID,
   STRKAFS,
   NAVN,
   HOVEDSTRAEKNING,
   STRAEKNING,
   AFSNIT,
   KPMSPORTYPENAVN,
   BANENR,
   KPMSTRK,
   KPMSTRK_NAVN,
   SPORNUMMER,
   FRA_KM,
   TIL_KM,
   SPOR_FRA_KM,
   SPOR_TIL_KM,
   LAENGDE,
   SKN_SKNSTRENGID,
   SKN_SKINNESTRENG,
   SKN_SKNTYPEID,
   SKN_SKINNETYPE,
   SKN_SKNIBRUGTILSTID,
   SKN_IBRUGTILSTAND,
   SKN_SKNSTAALKVALID,
   SKN_STAALKVALITET,
   SKN_FABRIKATID,
   SKN_FABRIKAT,
   SKN_FAB_AAR,
   SKN_IBRUGDATO,
   SKN_BEMAERKNING,
   SKN_REDIGER_BRUGER,
   SKN_REDIGER_DATO,
   SKN_SLETTEMARKERING,
   SVL_OVBTYPEID,
   SVL_OVBTYPE,
   SVL_BEF_FAB_AAR,
   SVL_SVELLER_FABRIKATID,
   SVL_SVELLEFABRIKAT,
   SVL_FAB_AAR,
   SVL_IBRUGDATO,
   SVL_BEMAERKNING,
   SVL_SLETTEMARKERING,
   SVL_REDIGER_BRUGER,
   SVL_REDIGER_DATO,
   BLST_BLSTTYPEID,
   BLST_BLSTTYPE,
   BLST_IBRUGDATO,
   BLST_BEMAERKNING,
   BLST_SLETTEMARKERING,
   BLST_REDIGER_BRUGER,
   BLST_REDIGER_DATO,
   UBLST_UBLSTTYPEID,
   UBLST_UBLSTTYPE,
   UBLST_IBRUGDATO,
   UBLST_BEMAERKNING,
   UBLST_SLETTEMARKERING,
   UBLST_REDIGER_BRUGER,
   UBLST_REDIGER_DATO,
   VALID,
   STATUS,
   REDIGER_BRUGER,
   REDIGER_DATO
)
AS
   SELECT ss.ID,
          ss.STRKAFS,
          afs.navn,
          TRIM (TO_CHAR (afs.hvdstrk, '000')) hovedstraekning,
          TRIM (TO_CHAR (afs.delstrk, '000')) straekning,
          TRIM (TO_CHAR (afs.afsnit, '000')) afsnit,
          (SELECT MIN (st.NAVN)
             FROM am_spor.v_spor_data spor, am_spor_enorm.sportype st
            WHERE     spor.sportypeid = st.id(+)
                  AND (    ss.STRKAFS = spor.STRKAFS
                       AND UPPER (ss.spornummer) = UPPER (spor.spornummer)
                       AND spor.fra_km <= ss.fra_km
                       AND spor.til_km >= ss.fra_km))
             KPMSPORTYPENAVN,
          afs.banenr,
          ss.kpmstrk,
          (SELECT kp.kpm || ' (' || kp.kpm_forkortelse || ')'
             FROM am_strk.strkgis_kpm kp
            WHERE kp.kpm = ss.kpmstrk)
             kpmstrk_navn,
          ss.SPORNUMMER,
          ss.FRA_KM,
          ss.TIL_KM,
          ss.SPOR_FRA_KM,
          ss.SPOR_TIL_KM,
          ABS (ss.til_km - ss.fra_km) * 1000 laengde,
          sk.sknstrengid SKN_SKNSTRENGID,
          (SELECT l.sknstreng
             FROM am_sporlevii.VLST_sknstreng l
            WHERE sk.sknstrengid = l.ID)
             AS skn_skinnestreng,
          sk.skntypeid SKN_SKNTYPEID,
          (SELECT l.skntype
             FROM am_sporlevii.vLST_SKNTYPE l
            WHERE sk.skntypeid = l.ID)
             AS skn_skinnetype,
          sk.sknibrugtilstid SKN_SKNIBRUGTILSTID,
          (SELECT i.sknibrugtilst
             FROM am_sporlevii.vLST_SKNIBRUGTILST i
            WHERE sk.sknibrugtilstid = i.ID)
             AS skn_ibrugtilstand,
          sk.sknstaalkvalid SKN_SKNSTAALKVALID,
          (SELECT K.sknstaalkval
             FROM am_sporlevii.vLST_SKNSTAALKVAL K
            WHERE sk.sknstaalkvalid = K.ID)
             AS skn_staalkvalitet,
          sk.fabrikatid SKN_FABRIKATID,
          (SELECT f.fabrikat
             FROM am_sporlevii.vLST_FABRIKAT f
            WHERE sk.fabrikatid = f.ID)
             AS skn_fabrikat,
          sk.fab_aar SKN_FAB_AAR,
          sk.ibrugdato SKN_IBRUGDATO,
          sk.bemaerkning SKN_BEMAERKNING,
          sk.rediger_bruger SKN_REDIGER_BRUGER,
          sk.rediger_dato SKN_REDIGER_DATO,
          TO_NUMBER (NULL) SKN_SLETTEMARKERING,
          sv.ovbtypeid SVL_OVBTYPEID,
          (SELECT l.ovbtype
             FROM am_sporlevii.vLST_ovbtype l
            WHERE sv.ovbtypeid = l.ID)
             AS svl_ovbtype,
          sv.bef_fab_aar SVL_BEF_FAB_AAR,
          sv.sveller_fabrikatid SVL_SVELLER_FABRIKATID,
          (SELECT f.sveller_fabrikat
             FROM am_sporlevii.vLST_sveller_fabrikat f
            WHERE sv.sveller_fabrikatid = f.ID)
             AS svl_svellefabrikat,
          sv.fab_aar SVL_FAB_AAR,
          sv.ibrugdato SVL_IBRUGDATO,
          sv.bemaerkning SVL_BEMAERKNING,
          TO_NUMBER (NULL) SVL_SLETTEMARKERING,
          sv.rediger_bruger SVL_REDIGER_BRUGER,
          sv.rediger_dato SVL_REDIGER_DATO,
          bl.blsttypeid BLST_BLSTTYPEID,
          (SELECT l.blsttype
             FROM am_sporlevii.vLST_blsttype l
            WHERE bl.blsttypeid = l.ID)
             AS blst_blsttype,
          bl.ibrugdato BLST_IBRUGDATO,
          bl.bemaerkning BLST_BEMAERKNING,
          TO_NUMBER (NULL) BLST_SLETTEMARKERING,
          bl.rediger_bruger BLST_REDIGER_BRUGER,
          bl.rediger_dato BLST_REDIGER_DATO,
          ubl.ublsttypeid UBLST_UBLSTTYPEID,
          (SELECT l.ublsttype
             FROM am_sporlevii.vLST_ublsttype l
            WHERE ubl.ublsttypeid = l.ID)
             AS ublst_ublsttype,
          ubl.ibrugdato UBLST_IBRUGDATO,
          ubl.bemaerkning UBLST_BEMAERKNING,
          TO_NUMBER (NULL) UBLST_SLETTEMARKERING,
          ubl.rediger_bruger UBLST_REDIGER_BRUGER,
          ubl.rediger_dato UBLST_REDIGER_DATO,
          CASE
             WHEN (   sk.VALID = 0
                   OR sv.VALID = 0
                   OR bl.valid = 0
                   OR ubl.valid = 0)
             THEN
                0
             ELSE
                -1
          END
             VALID,
          CASE
             WHEN     ss.skinner_id IS NULL
                  AND ss.sveller_id IS NULL
                  AND ss.ballast_id IS NULL
                  AND ss.uballast_id IS NULL
             THEN
                'Ingen data'
             WHEN ss.skinner_id IS NOT NULL AND sk.VALID = 0
             THEN
                'Skinner: ' || sk.status
             WHEN ss.sveller_id IS NOT NULL AND sv.VALID = 0
             THEN
                'Sveller: ' || sv.status
             WHEN ss.ballast_id IS NOT NULL AND bl.VALID = 0
             THEN
                'Ballast: ' || bl.status
             WHEN ss.uballast_id IS NOT NULL AND ubl.VALID = 0
             THEN
                'Underballast: ' || ubl.status
          END
             STATUS,
          ss.REDIGER_BRUGER,
          ss.REDIGER_DATO
     FROM am_strk.btrafsnit afs,
          am_sporlevII.sporlev_samlet ss,
          am_sporlevII.skinner sk,
          am_sporlevII.sveller sv,
          am_sporlevII.ballast bl,
          am_sporlevII.uballast ubl
    WHERE     ss.strkafs = afs.strkafs(+)
          AND (ss.skinner_id = sk.id(+))
          AND (ss.sveller_id = sv.id(+))
          AND (ss.ballast_id = bl.id(+))
          AND (ss.uballast_id = ubl.id(+));
and the DDL

Code: Select all

Column, ID, DataType, Null?
ID	1	NUMBER	N
STRKAFS	2	NUMBER (6)	Y
NAVN	3	VARCHAR2 (50 Char)	Y
HOVEDSTRAEKNING	4	VARCHAR2 (4 Char)	Y
STRAEKNING	5	VARCHAR2 (4 Char)	Y
AFSNIT	6	VARCHAR2 (4 Char)	Y
KPMSPORTYPENAVN	7	VARCHAR2 (50 Char)	Y
BANENR	8	VARCHAR2 (5 Char)	Y
KPMSTRK	9	NUMBER	Y
KPMSTRK_NAVN	10	VARCHAR2 (53 Char)	Y
SPORNUMMER	11	VARCHAR2 (50 Char)	Y
FRA_KM	12	NUMBER (7,3)	Y
TIL_KM	13	NUMBER (7,3)	Y
SPOR_FRA_KM	14	NUMBER (7,3)	Y
SPOR_TIL_KM	15	NUMBER (7,3)	Y
LAENGDE	16	NUMBER	Y
SKN_SKNSTRENGID	17	NUMBER	Y
SKN_SKINNESTRENG	18	VARCHAR2 (100 Char)	Y
SKN_SKNTYPEID	19	NUMBER	Y
SKN_SKINNETYPE	20	VARCHAR2 (100 Char)	Y
SKN_SKNIBRUGTILSTID	21	NUMBER	Y
SKN_IBRUGTILSTAND	22	VARCHAR2 (100 Char)	Y
SKN_SKNSTAALKVALID	23	NUMBER	Y
SKN_STAALKVALITET	24	VARCHAR2 (100 Char)	Y
SKN_FABRIKATID	25	NUMBER	Y
SKN_FABRIKAT	26	VARCHAR2 (100 Char)	Y
SKN_FAB_AAR	27	NUMBER (4)	Y
SKN_IBRUGDATO	28	DATE	Y
SKN_BEMAERKNING	29	VARCHAR2 (256 Byte)	Y
SKN_REDIGER_BRUGER	30	VARCHAR2 (30 Byte)	Y
SKN_REDIGER_DATO	31	DATE	Y
SKN_SLETTEMARKERING	32	NUMBER	Y
SVL_OVBTYPEID	33	NUMBER	Y
SVL_OVBTYPE	34	VARCHAR2 (100 Char)	Y
SVL_BEF_FAB_AAR	35	NUMBER (4)	Y
SVL_SVELLER_FABRIKATID	36	NUMBER	Y
SVL_SVELLEFABRIKAT	37	VARCHAR2 (100 Char)	Y
SVL_FAB_AAR	38	NUMBER (4)	Y
SVL_IBRUGDATO	39	DATE	Y
SVL_BEMAERKNING	40	VARCHAR2 (256 Char)	Y
SVL_SLETTEMARKERING	41	NUMBER	Y
SVL_REDIGER_BRUGER	42	VARCHAR2 (30 Char)	Y
SVL_REDIGER_DATO	43	DATE	Y
BLST_BLSTTYPEID	44	NUMBER	Y
BLST_BLSTTYPE	45	VARCHAR2 (100 Char)	Y
BLST_IBRUGDATO	46	DATE	Y
BLST_BEMAERKNING	47	VARCHAR2 (256 Byte)	Y
BLST_SLETTEMARKERING	48	NUMBER	Y
BLST_REDIGER_BRUGER	49	VARCHAR2 (30 Byte)	Y
BLST_REDIGER_DATO	50	DATE	Y
UBLST_UBLSTTYPEID	51	NUMBER	Y
UBLST_UBLSTTYPE	52	VARCHAR2 (30 Char)	Y
UBLST_IBRUGDATO	53	DATE	Y
UBLST_BEMAERKNING	54	VARCHAR2 (256 Byte)	Y
UBLST_SLETTEMARKERING	55	NUMBER	Y
UBLST_REDIGER_BRUGER	56	VARCHAR2 (30 Byte)	Y
UBLST_REDIGER_DATO	57	DATE	Y
VALID	58	NUMBER	Y
STATUS	59	VARCHAR2 (270 Byte)	Y
REDIGER_BRUGER	60	VARCHAR2 (30 Byte)	N
REDIGER_DATO	61	DATE	N
/Glenn

Glenn
Posts: 7
Joined: Thu 25 Oct 2012 11:16

Re: OracleException: ORA-03106: fatal two-task communication protocol error

Post by Glenn » Thu 01 Mar 2018 13:06

My Query is "Select * from V_SPORLEV_SAMLET"

/Glenn

Glenn
Posts: 7
Joined: Thu 25 Oct 2012 11:16

Re: OracleException: ORA-03106: fatal two-task communication protocol error

Post by Glenn » Mon 05 Mar 2018 10:00

Solved!

In the view we have several "TO_NUMBER (NULL)" calls, including field number 32 (!)

We replaced all calls with "CAST (NULL AS NUMBER)" and now it works brilliantly.

All the best and thank you!
/Glenn

Post Reply