[Mono-dev] ORACLE: error connecting to database

Sebastian Good sebastian at palladiumconsulting.com
Fri May 23 17:44:52 EDT 2008


We have had success connecting to Oracle via 10.2 and 11g drivers in 32 and
32/64-bit modes, respectively. There are indeed warnings of conversion
issues in 64-bit mode, but we have not yet seen any trouble when transfering
strings, numbers, clobs, etc. We're on Mono 1.9 on some relatively ancient
'enterprise' RedHat Linux and Vista, both 64-bit. This would suggest the
problem is indeed in the connect string. I recall a particular connect
syntax worked with Microsoft's drivers, but not Mono's, so we are just using
TNSNAMES.

On Fri, May 23, 2008 at 9:40 AM, <mono-devel-list-request at lists.ximian.com>
wrote:

>
> Message: 3
> Date: Fri, 23 May 2008 02:17:30 +0200
> From: "Jb Evain" <jb at nurv.fr>
> Subject: Re: [Mono-dev] Hashtable.Clone speedup.
> To: "Miguel de Icaza" <miguel at ximian.com>
> Cc: mono-devel-list <mono-devel-list at ximian.com>
> Message-ID:
>        <69f7d8470805221717t2da79329u7e81c6ca6208d342 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hey,
>
> On 5/23/08, Miguel de Icaza <miguel at ximian.com> wrote:
> >     What to look for: I avoided copying two fields hashKeys and
> >  hashValues as those seem like caches that are computed on demand.   But
> >  did I miss anything important?
>
> I don't think we want to clone the field modificationCount. Also it
> could use Array.Copy.
>
>
> --
> Jb Evain  <jb at nurv.fr>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 23 May 2008 06:26:09 -0700 (PDT)
> From: Daniel Morgan <monodanmorg at yahoo.com>
> Subject: [Mono-dev] Bug 393920 - ORACLE: error connecting to database
>        (X86-64)
> To: mono-devel-list at lists.ximian.com
> Message-ID: <899557.81679.qm at web30802.mail.mud.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
>
> I have not tested System.Data.OracleClient on X86-64
> in 64-bits mode.
>
> Could you have developed/tested using a 32-bit
> machine?
>
> Marshaling of data between the managed
> System.Data.OracleClient and the OCI library could be
> the source of the problem.  Particularly, with the
> marshaling of unicode strings, integers, and enums.
>
> Also, could you have funky embedded characters in your
> username or password in your connection string.  It
> maybe best to delimit your username and password with
> a single-quote.
>
> con.ConnectionString = "Data Source=somehost;User
> ID='BOB';Password='SMITH#082';
>
> Do you have an embedded double-quote or single-quote
> in your username or password?
>
> --- bugzilla_noreply at novell.com wrote:
>
> > From: bugzilla_noreply at novell.com
> > To: mono-bugs at lists.ximian.com
> > Date: Fri, 23 May 2008 05:01:55 -0600 (MDT)
> > Subject: [Mono-bugs] [Bug 393920] New: ORACLE: error
> > connecting to database
> >       (X86-64)
> >
> > https://bugzilla.novell.com/show_bug.cgi?id=393920
> >
> > User pedro.spires at gmail.com added comment
> >
> https://bugzilla.novell.com/show_bug.cgi?id=393920#c1
> >
> >            Summary: ORACLE: error connecting to
> > database (X86-64)
> >            Product: Mono: Class Libraries
> >            Version: SVN
> >           Platform: x86-64
> >         OS/Version: RHEL 4
> >             Status: NEW
> >           Severity: Critical
> >           Priority: P5 - None
> >          Component: Sys.Data
> >         AssignedTo:
> > bnc-blr-team-mono at forge.provo.novell.com
> >         ReportedBy: pedro.spires at gmail.com
> >          QAContact: mono-bugs at lists.ximian.com
> >           Found By: Development
> >
> >
> > When i connect to database i get the following
> > error:
> >
> > Unhandled Exception:
> > System.Data.OracleClient.OracleException: ORA-00604:
> > error
> > occurred at recursive SQL level 1
> > ORA-01756: quoted string not properly terminated.
> >   at
> >
> System.Data.OracleClient.Oci.OciGlue.CreateConnection
> > (OracleConnectionInfo conInfo) [0x00000]
> >   at
> >
> System.Data.OracleClient.OracleConnectionPoolManager.CreateConnection
> > (OracleConnectionInfo info) [0x00000]
> >   at
> >
> System.Data.OracleClient.OracleConnectionPool.CreateConnection
> > ()
> > [0x00000]
> >   at
> >
> System.Data.OracleClient.OracleConnectionPool.GetConnection
> > () [0x00000]
> >   at System.Data.OracleClient.OracleConnection.Open
> > () [0x00000]
> >   at Altaia.GeoProbe.Program.IsRunning () [0x00000]
> >   at Altaia.GeoProbe.Program.Main (System.String[]
> > args) [0x00000]
> >
> > the machine is a Dual-Core AMD Opteron(tm) Processor
> > 8218
> > Red Hat Enterprise Linux AS release 4 (Nahant Update
> > 4)
> > Linux 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT
> > 2006 x86_64 x86_64 x86_64
> > GNU/Linux
> >
> >
> > This just happens in on this machine (production
> > machine). It works well on
> > development machine (32 bits Slackware 12) and on
> > Windows Micosoft .NET 2.0
> >
> >
> > I've done a little code to test:
> >
> >
> > using System;
> > using System.Data.OracleClient;
> >
> > namespace Altaia.GeoProbe
> > {
> >     public class Program
> >     {
> >         public static int Main(string[] args)
> >         {
> >                 IsRunning();
> >                 return 0;
> >         }
> >
> >         public static void IsRunning()
> >         {
> >             string conn = "Server=E29n.pt;User
> > ID=xxxxx;Password=xxxxx;";
> >             Console.WriteLine(conn);
> >             OracleConnection connection = new
> > OracleConnection(conn);
> >             connection.Open();
> >             connection.Close();
> >         }
> >     }
> > }
> >
> > This error doesn't allow our application to go in
> > production.
> > This is our first time using mono
> >
> > The mono environment is installed on our user and
> > not system wide.
> > We had to install also pkg-config-0.22 and
> > glib-2.16.3 in user area too.
> >
> > I've tried mono version 1.9.1 and svn version
> >
> > Please help, this problem is causing us some
> > problems we didn't expect
> >
> > Thanks
> >
> >
> > -
> ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080523/2ced0467/attachment.html 


More information about the Mono-devel-list mailing list