Oracle 10g and OracleClient .Net 1.0/1.1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

We're currently upgrading to Oracle 10g client and we've hit an issue with
..NET 1.0 and 1.1 applications that use OracleClient to connect to Oracle.

Basically any .NET 1.0 or 1.1 application that tried to open a connection to
Oracle would get a "System.Data.OracleClient requires Oracle client software
version 8.1.7 or greater." exception. However ASP.NET 1.1 applications are
able to connect OK.

I managed to trace the problem as far as MtxOci8.dll which is installed in
windows\system32 and also in the .NET 1.1 folder. This explains why ASP.NET
1.1 applications work as MtxOci8.dll is in the same location as aspnet_wp.exe
which means this version is used instead of the one in system32. Whereas all
other applications will use the version is system32.

I've updated the version in system32 with the one installed in the .NET 1.1
folder and everything works, even a COM+ application that had failed when 10g
client was installed!

I've seen various posts indicating that this is a permission issue, but it
even occurs on my development box where for my sins I'm a local admin, so I
don't think it's a permission issue. This issue occurrs on my development
pc, Windows XP SP2, Oracle 10g Client as well as on the Windows 2000 server.

Using WinDbg I've managed to see the call into MtxOci8.dll to obtain the
Oracle version (MTxOciGetOracleVersion) and it's clear that the two versions
do different things! But debugging at this level is beyond me at present!

I also notice that .NET 2 does things differently and does not use
MtxOci8.dll, but it's virtually impossible to get applications upgraded, as
you can see we still have .NET 1.0 code!

I guess my questions are:

Have you seen anything like this before?

Are there any issues in using the version of MtxOci8.dll installed with .NET
1.1, it certainly seems to work?!

Is there another way to fix this issue?

Why is the version number on MtxOci8.dll the same for the .NET 1.0 and .NET
1.1 versions even though they are clearly different? Could this explain why
the version in system32 is not updated?

Why is MtxOci8.dll installed in system32 with .NET 1.0 (OracleClient Install
- I assume) but into .NET 1.1 folder with .NET 1.1?

Thanks

Doug
 
Hi Doug,

We need to perform more research on this issue . We will reply here as soon
as possible.
If you have any more concerns on it, please feel free to post here.

Thanks for your understanding!
Best regards,
Wen Yuan
 
Hi Doug,
Thanks for your waiting.

Frankly, I haven't gotten such feedback so far. I have also checked bug
list.
Why is the version number on MtxOci8.dll the same for the .NET 1.0 and ..NET
1.1 versions even though they are clearly different? Could this explain why
the version in system32 is not updated?

Have you installed latest version of MDAC 2.8 on your machine? As far as I
know, not only .net framework, many other programs will also install MDAC.
Maybe they have conflict to install different dll on your machine.

We highly recommend you re-install MDAC 2.8.
http://www.microsoft.com/downloads/details.aspx?DisplayLang=en&FamilyID=6c05
0fe3-c795-4b7d-b037-185d0506396c

I have also consulted with our ADO.net product team, but I haven't gotten
the helpful response so far. If I can get any information, I will pass it
for you also.

I apologized for any inconvenient this may have accused. Please try MDAC
2.8 and let me know if the issue still persists.

Thanks for your understanding.
Have a great weekend,
Sincerely,
Wen Yuan
 
Hi Doug,

Thanks for your waiting.
I have contacted with product team, and received some reply from them.
Please feel free to update here if you have anything unclear. I'm glad to
assist you.

Hope this helps,
Sincerely,
Wen Yuan

1.Is this a known issue in using the version of MtxOci8.dll installed with
.NET 1.1?
We haven't seen this issue before, and I talked to someone worked on
OracleClient since 1.0, and he hadn't seen it before either. It's a little
odd that it wouldn't have come up before, especially right around the time
that 1.1 was released, since it would have been more common then for people
to have both 1.0 and 1.1 on their machines. I don't know if there's
something unusual about the configuration of this particular machine, but
there's nothing obviously out of the ordinary for me.

2.Why is the version number on MtxOci8.dll the same for the .NET 1.0 and
.NET 1.1 versions even though they are clearly different? Could this
explain why the version in system32 is not updated?
No good answer to that. We verified that the contents of the DLL are
different, and this is intentional. In both 1.0 and 1.1, we are using that
DLL to figure out which version of the Oracle client we are working with.
However, in 1.1, there's only one other purpose. In 1.0, there are a lot
more things in there, basically we are compiling mtxoci.dll (without the 8
in the name) into mtxoci8.dll, and just using the one DLL. In 1.1, we split
out most of that, and are using mtxoci.dll directly and only use
mtxoci8.dll for 2 specific reasons. In 2.0, we don't use it at all, as you
have seen. There are reasons why we did what we did in 1.1 and 2.0, but
there's basically irrelevant in this case. We have no idea where the
version number came from, and why it wasn't updated. I don't think this is
why it wasn't updated in system32 though. I haven't tried this with a
totally clean system, but we know that on machines that don't have 1.0,
system32 does not contain any version of mtxoci8.dll, and when you install
1.1, it still installs it into its framework directory.

3.Why is MtxOci8.dll installed in system32 with .NET 1.0, but installed
into .NET 1.1 folder with .NET 1.1?
1.0 and 1.1 both shipped their own versions of mtxoci8.dll, as I described
above. We weren't able to figure out why they install them in different
locations though. I don't think this was intentional. Having said all of
that though, the best solution here is to remove 1.0 from the machine
entirely.
We no longer support the 1.0 version of OracleClient (since December
2004):http://support.microsoft.com/default.aspx?pr=lifeDevTool#NET Framewo
rk
What is the support lifecycle for the OracleClient and ODBC .NET data
providers that were released as add-ons for the Microsoft .NET Framework
1.0?
These two data providers were released after .NET Framework 1.0 was
released, so they have their own lifecycle. Support for the OracleClient
and ODBC .NET data providers will end on Dec 31, 2004.

I don't know for sure that nothing else will install or use mtxoci8.dll in
the system folder. I only know for sure what the OracleClient provider is
doing.
 
Hi Wen Yuan

Thanks for your response and apologies for not replying sooner!

MDAC 2.8 is installed on my XP machine where this issue also happens. I
have not reinstalled it as I've search through the MDAC release manifests
back to version 2.5 and none of them install mtxoci8.dll so I don't think it
will help.

I've installed the OracleClient for .NET 1.0 on a clean Windows 2003 server
that includes .NET 1.0 and 1.1 and can verify that it installs mtxoci8.dll
into Windows\System32. It also removes this file if it is uninstalled, so
good news there.

I think the reason why this wasn't seen at the time .NET 1.1 may be that it
works with Oracle 9i client, it's only with 10g that it breaks provided of
course that mtxoci8.dll remains in system32.

I've just removed mtxoci8.dll from system32 (well renamed actually!) and the
results are interesting:

..NET 1.0 application connects to Oracle using 10g client, no exceptions.
Mtxoci8.dll not loaded by the application but mtxoci.dll is. I don't
understand why this works!
..NET 1.1 application connects to Oracle using 10g client, no exceptions.
Mtxoci8.dll is loaded from the .NET 1.1 folder.

This makes sense by looking at the .NET 1.0 OracleClient code, if it can't
find MtxOci8.dll it degrades gracefully and sets the version to 81 and uses
the MtxOci.dll to see if a 'newer' version of MtxOci is installed. A similar
thing happens in .NET 1.1 OracleClient but it never gets that far as it first
loads MtxOci8.dll from the .NET 1.1 Framework folder.

So I'm not sure now whether to replace Mtxoci8.dll in System32 with the .NET
1.1 version or to just delete it! Which would you recommend as a short term
workaround, and feel free to say neither! I'm tempted to say delete the
file, but for this I'd need to be happy that nothing else uses it, do you
know of any other technology that makes use of MtxOci8.dll or is it only used
by .NET and OracleClient?

I didn't know that support had ended for OracleClient 1.0, this may be the
compelling reason to get the applications upgraded to .NET 1.1 (at least on
the application server side!). That way if we uninstall OracleClient 1.0
Mtxoci8.dll will be removed and all should be good! But I fear this may take
some time to action!

Thanks once again for your help.

Cheers

Doug
 
Hi Doug,

My suggestion is just to uninstall .NET 1.0, which may remove mtxoci8.dll
as you said, but it's hard to know if the uninstaller will actually do that
or not, unless you just try it. The problem is that we don't know for sure
that the one in system32 is not being used by any other components,
although I don't think it is. I know that for OracleClient, only 1.0 will
put the DLL in system32 and will use it from there. So if you remove or are
not using 1.0, deleting that DLL would be fine. I'm sorry I just don't know
for sure if that would have an impact on any other applications.

However, if you uninstall 1.0 and it goes away automatically, that answers
the question. :)

Additionally, I would not replace the one in system32 with the one in the
1.1 folder, because we know that 1.1 is loading the one it needs, so the
only things that could load from system32 are 1.0 apps or some unknown app.
I think it's better to have nothing there at all instead of an unexpected
version.

Hope this helps,
Sincerely,
Wen Yuan
 
Hi Wen Yuan

Thanks for all your help on this, I now at least know what the options are!

Cheers

Doug
 
Back
Top