Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Error ORA-03106: Fatal two task error connecting (Read 18454 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Error ORA-03106: Fatal two task error connecting
01.04.06 at 09:59:20
 
Tony from Indonesia asked the following question:
 
Question:
I am getting connection errors when I try to connect from Excel to my Oracle database with ADO. The error is:
 
ORA-03106: Fatal two-task communication protocol error
 
Answer:
This is not an ADO error but most likely an OO4O (Oracle Objects for OLE) error. I have only seen these two-task errors with Oracle7. Are you still using Oracle7?
 
In my experience this error can happen when you have:
- version mismatches. Your OO4O version does not match the database version
- SQL*Net problems. Somehow the tns name is not correctly configured.
 
The pragmatic solution is to really use an ADO connection. In SQL*XL, specify to configure a new ADO connection and I am sure you will not get this error.
 
References:
SQL*XL product page: Database access from Excel
   http://www.oraxcel.com/projects/sqlxl
Connecting from Excel to various databases:
   http://www.oraxcel.com/projects/sqlxl/help/techniques/connecting/index.html
Back to top
 
« Last Edit: 15.12.06 at 07:34:10 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Tony(Guest)
Guest



Re: Error ORA-03106: Fatal two task error connecti
Reply #1 - 03.04.06 at 12:35:29
 
Hello Gerrit-Jan,
 
I am using Oracle Database XE (10g)
and the OLE DB Provider is Microsoft OLE DB Provider for Oracle  
 
 
Regards,
Tony N
 
Back to top
 
 
Email   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Error ORA-03106: Fatal two task error connecti
Reply #2 - 03.04.06 at 14:21:47
 
Interesting as I have only seen the two-task error with Oracle7 and OO4O. Would you mind checking it once more for me please to be very sure this is not OO4O?
 
1. In the connection history list, delete all previous connections  
2. Open the advanced section of the connection dialog
3. Click the button to create a new ADO connection
4. Choose the Microsoft OLEDB provider for Oracle
 
Can you confirm you still get the error?
What happens when you try the Oracle OLE DB Provider?
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Tony Nilsson
YaBB Newbies
*




Posts: 9
Re: Error ORA-03106: Fatal two task error connecti
Reply #3 - 15.12.11 at 18:00:45
 
Hi,
It's Me , The other Tony N from Sweden!
Blive it or not, I have the same problem with this code in XP.
Created and work in Wndows 7:
 
Sub Get_Levfakt()
  Dim strHost As String, strDatabase As String, strSQL As String, strUser As String, strPassword As String
  Dim strConOracle, oConOracle, oRsOracle
  Dim StrResult As String
   
  Application.StatusBar = "Hämtar data, var god vänta....."
   
                 
  strHost = "172.30.81.202"
  strDatabase = "XXXX"
  strUser = "XXXX"
  strPassword = "XXXXXXXXX"
  Port = "XXXX"
                 
                 
If Range("Fabrik").Value = "%" Then
  strSQL = "SELECT accounting_year ""År"", voucher_date ""Datum"", Account ""Konto"", Code_B ""Kst"", Code_D ""Res.enh"", amount ""Belopp"", Text ""Kund #Ritning"", Reference_number ""Lev.Fakt.nr"" FROM gen_led_voucher_row WHERE Text LIKE ('%#%') AND voucher_type ='J' "
  Else: strSQL = "SELECT accounting_year ""År"", voucher_date ""Datum"", Account ""Konto"", Code_B ""Kst"", Code_D ""Res.enh"", amount ""Belopp"", Text ""Kund #Ritning"", Reference_number ""Lev.Fakt.nr"" FROM gen_led_voucher_row WHERE Text LIKE ('%#%') AND voucher_type ='J' AND Code_D ='" & Range("Fabrik").Value & "'"
End If
                 
    With Application
       .Calculation = xlManual
       .MaxChange = 0.001
    End With
    ActiveWorkbook.PrecisionAsDisplayed = False
             
  Sheets("IFS").Select
 
  Range("A7:H65535").Select
  Selection.ClearContents
   
  strConOracle = "Driver={Microsoft ODBC for Oracle}; " & _
        "CONNECTSTRING=(DESCRIPTION=" & _
        "(ADDRESS=(PROTOCOL=TCP)" & _
        "(HOST=" & strHost & ")(PORT=" & Port & "))" & _
        "(CONNECT_DATA=(SERVICE_NAME=" & strDatabase & "))); uid=" & strUser & " ;pwd=" & strPassword & ";"
  Set oConOracle = CreateObject("ADODB.Connection")
  Set oRsOracle = CreateObject("ADODB.Recordset")
  oConOracle.Open strConOracle
  Set oRsOracle = oConOracle.Execute(strSQL)
  Field = 0
  Range("A7").Select
  Do While Not oRsOracle.EOF
       
      ActiveCell().Value = oRsOracle.Fields(0).Value
       
      For Field = 0 To 7
      If oRsOracle.Fields(Field).Value <> "-" Then
      ActiveCell().Offset(0, Field).Value = oRsOracle.Fields(Field).Value
      Else: ActiveCell().Offset(0, Field).Value = ""
      End If
       
      Next Field
       
      ActiveCell().Offset(1, 0).Select
      oRsOracle.MoveNext
       
  Loop
  oConOracle.Close
  Set oRsOracle = Nothing
  Set oConOracle = Nothing
 
 
 
 
 
Quote from Gerrit-Jan Linker on 01.04.06 at 09:59:20:
Tony from Indonesia asked the following question:

Question:
I am getting connection errors when I try to connect from Excel to my Oracle database with ADO. The error is:

ORA-03106: Fatal two-task communication protocol error

Answer:
This is not an ADO error but most likely an OO4O (Oracle Objects for OLE) error. I have only seen these two-task errors with Oracle7. Are you still using Oracle7?

In my experience this error can happen when you have:
- version mismatches. Your OO4O version does not match the database version
- SQL*Net problems. Somehow the tns name is not correctly configured.

The pragmatic solution is to really use an ADO connection. In SQL*XL, specify to configure a new ADO connection and I am sure you will not get this error.

References:
SQL*XL product page: Database access from Excel
  http://www.oraxcel.com/projects/sqlxl
Connecting from Excel to various databases:
  http://www.oraxcel.com/projects/sqlxl/help/techniques/connecting/index.html

Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Error ORA-03106: Fatal two task error connecti
Reply #4 - 17.12.11 at 12:27:44
 
I indeed found that it is broader than just for OO4O.
 
In general a TWO-TASK environment variable can be set to make a connection to a remote database. Note that this has nothing to do with SQL*XL but it is specific for the Oracle client.
 
Quote:
TWO_TASK is an environment variable used to specify that connections should be made to a remote database (via SQL*Net) without specifying a service name (tnsnames.ora entry). This is equivalent to LOCAL registry entry on Windows platforms.

 
As far as I understand your database is a remote one and you seem to want to refer to it using the TWO-TASK variable instead of going through the tnsnames.ora file.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1