First connect to database with ODP fails error=-3002 msg='' — oracle-tech

    Forum Stats

  • 3,715,957 Users
  • 2,242,917 Discussions
  • 7,845,703 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

First connect to database with ODP fails error=-3002 msg=''

233833
233833 Member Posts: 49
Tried the example in the odp pdf file. When trying to do con.open()
i get an OraExeception: (the message is empty, the error-number is 3002)
see below for detailed error log...

Tnsping works, TOAD also works (currently I don't have other client tools on my pc, I will download sqlplus et al. but that will take a day on my corporate network...

If I interpret -3002 as ORA-3002 then that means 'operator not supported' but, I doubt that is the correct error-interpretation.

connect_string="User Id=rainbow; Password=youwish;Data Source=pc353_rbow"

Next is the output from:
Console.Write("#=" + ex.Number.tostring + "|msg=" + ex.Message + "|proc=" + ex.Procedure + "|src=" + ex.Source + "|trace=" + ex.StackTrace)


#=-3002|msg=|proc=pc353_rbow|src=Oracle Data Provider for .NET|trace= at Oracle.DataAccess.Client.OraException.HandleErrorHelper(Int32 errCode, OraConnection conn, IntPtr opsErrCtx, IntPtr opsSqlCtx, Object src, String procedure)
at Oracle.DataAccess.Client.OraException.HandleError(Int32 errCode, OraConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Client.OraConnection.Open()
at WindowsApplication6.Form1.btnConnect_Click(Object sender, EventArgs e) in C:\Documents and Settings\pe\My Documents\Visual Studio Projects\WindowsApplication6\WindowsApplication6\Form1.vb:line 124

Comments

  • 233833
    233833 Member Posts: 49
    I tried something new:

    I have extended my app to also try a connection with Oracle Data Provider for OLEDB (9.2)

    My test-app has 2 methods doing exactly the same thing, once with OleDB, once with Ora-ODP, I can trigger them with a button, so I have a button 'Connect ODP' and a button 'Connect OLE'. Both do an open, ds.Fill and close

    If I first try to connect ODP => error -3002 (see prev. mail for trace)
    then OLEDB => error -2147467259 msg=LC (weird message)

    #=-2147467259|msg=LC|src=OraOLEDB|
    trace=
    at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
    at System.Data.OleDb.OleDbConnection.InitializeProvider()
    at System.Data.OleDb.OleDbConnection.Open()
    at WindowsApplication6.Form1.btnConnectOLE_Click(Object sender, EventArgs e) in C:\Documents and Settings\pe\My Documents\Visual Studio

    Now if I restart the app and FIRST do the OLEDB connection, that works fine, even better:
    when I (during the same run) now also try the ODP connection, that works too !!!

    Any idea of what I'm doing wrong or how OLEDB influences the ODP side? (I'm not sure if it's supported to use both connection-methods in one app, it started with just the ODP part, but I wanted to see what happened using the OLEDB provider. For my current project (due-date 2Q2003) I'll probably stick with OLEDB, but we hope to use ODP with support for DML arrays (not supported in beta yet). A previous project was done with 'MS Data Provider for OLEDB for Oracle'

    Can anyone briefly summerise the benefits/advantages/disadvantages of:
    - MS Provider for OLEDB (with ADO.NET)
    - Oracle Provider for OLEDB (with ADO.NET)
    - ODP.NET

    So far my experience is with the first and I see 2 problems:
    - no support for array arguments in stored procs
    - weird behaviour with ref-cursors: they do a DESCRIBE of the procedure and 'try again'
    - the provider seems to be sensitive to order of parameters (sometimes does not work,
    but it can be made stable after some experimenting)

    All help appreciated.
  • 83753
    83753 Member Posts: 164
    Phillip,

    First of all, the error number that you have obtained is an internal error and it does NOT correspond to an Oracle error (i.e. ORA-3002).

    Due to the fact that other Beta users are able to connect, my guess is that the issue you are encoutering may be an installation/setup issue. However, you should have obtained an error message of "internal error". We will try to fix this in the next release.

    As for the problem that you're running into, please check the following:

    1) the PATH environment variable includes %ORACLE_HOME%\bin where %ORACLE_HOME% is your Oracle home directory with 9.2 Oracle Client Software
    2) OraOps.dll resides under %ORACLE_HOME%\bin

    Questions:
    1) Can you construct an OraTimeStamp structure for example in your application (without first attempting to establish a connection) and carry out an operation like .ToString() for example without an error?
    2) Have you tried re-installing?
    3) Does the same problem exist after a reboot?

    thanks,

    - nari




  • 221638
    221638 Member Posts: 18
    <snip>
    please check the following:
    1) the PATH environment variable includes %ORACLE_HOME%\bin where %ORACLE_HOME% is your Oracle home directory with 9.2 Oracle Client Software
    2) OraOps.dll resides under %ORACLE_HOME%\bin
    Questions:
    1) Can you construct an OraTimeStamp structure for example in your application (without first attempting to establish a connection) and carry out an operation like .ToString() for example without an error?
    2) Have you tried re-installing?
    3) Does the same problem exist after a reboot?
    thanks,
    - nari
    I am having a similar problem. When I invoke MyConnection.Open, I get the same error stack: MyCode -> Oracle.DataAccess.Client.OraConnection.Open -> .HandleError -> .HandleErrorHelper. There is no error text, and the error number appears as -3002.

    I can use SQL*Plus, using MyUser/[email protected] to connect successfully to my database.

    I have verified that my PATH variable contains %ORACLE_HOME%\bin, and that OraOps.dll is in that directory.

    I can construct an OraTimeStamp structure, initialize it, and perform a .ToString operation on it before attempting to establish a database connections.

    I have tried uninstalling and reinstalling my Oracle client and ODP.Net applications. Rebooting does not help, either.

    Some of my coworkers have installed the same version and are executing successfully. I've obviously missed something or broken something. Any other suggestions as to where to look?
  • 182042
    182042 Member Posts: 563
    Do you have a single Oracle Home or multiple Oracle Homes on this machine.
  • 221638
    221638 Member Posts: 18
    Do you have a single Oracle Home or multiple Oracle Homes on this machine.
    I have multiple Oracle homes. I have Oracle8 and Oracle9 clients installed. ODP.Net is installed on Oracle9, and I've used the Oracle Home Selector to set my Primary Oracle Home to be Oracle9.
  • 233833
    233833 Member Posts: 49
    I have a multi home machine, 8i database server is installed
    + installed 9.2 ORACLE_HOME with just client
    + ODP.NET beta + OLEDB provider 9.2

    Set ORACLE_HOME through ORAHOME selector to 9.2 home

    C:\>path
    PATH=C:\Oracle\ora91\bin;C:\oracle\ora81\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;F:\xml\saxon;C:\Program Files\Rational\common;

    (Note on this: should'nt home selector also swap jre paths or is that unrelated ?)

    and lo and behold...
    IT WORKS NOW!!!

    I did not think of switching the Oracle Home, mostly because most tools
    I need have to have the ORACLE_HOME set to version 8i.

    So seems to be a solution for me, will reboot and check again to be sure this is it.
    A nicer error message would be much appreciated though...

This discussion has been closed.