Wednesday, April 13, 2005

MSDAORA Oracle upgrade connectivity Problem

Oracle client always have connectivity problem to the Oracle database server due to the improper configuration in C:\Oracle\Ora81\network\ADMIN\TNSNAMES.ORA (Assume you did not change the default install folder)

Sometimes you may experience all the configuration are fine, you also can use TNSPING and SQLPLUS to access the ORACLE server without problem, but your Application using MSDAORA provider is facing problem to access the Oracle Server, you may get the error like:-
Error while trying to retrieve text for error ORA-03121
This is usually happen after you upgraded your Oracle client, you have restarted your machine, all the TNSNAMES.ORA entries are correct, everything is fine except your application, either ASP, ASP.NET, VB.NET or any application that use MSDAORA provider.
Why the problem happen is, after you upgraded your Oracle client, your MSDAORA still pointing to the old Oracle version, that's why the problem occurs.
To resolve this problem, goto your machine MSDAORA home C:\Program Files\Common Files\System\Ole DB folder, you will see there are some .reg files:-
mtxoci81_winnt.reg
mtxoci81_win2k.reg
mtxoci7x_winnt.reg
mtxoci7x_win2k.reg
If your Oracle client is 8.1 with Windows 2000 and above, double click the mtxoci81_win2k.reg file to register the new registry for the newer client. Then restart your machine, the problem will be solved automatically.
The content of the mtxoci81_win2k.reg is
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI]
"OracleXaLib"="oraclient8.dll"
"OracleSqlLib"="orasql8.dll"
"OracleOciLib"="oci.dll"
The nice thing about Oracle is, once the Oracle problem is resolved, you will enjoy with Oracle.

3 comments:

Anonymous said...

Hi NG Yew Ban. I've been looking for software information and came across your site. I was really after software related info but I came across your site and found it a good posting even though this post was'nt exactly what I was after. Thanks for the read

Anonymous said...

Hi,

I was having problems getting OleDB code which my coworker wrote to work on my machine. I've tried all sorts of things, even attempting to reinstall Oracle OleDB drivers, but nothing worked. Fortunately I stumbled across your site doing random Google searches on MSDAORA and tried your registry fix. That did the trick!!! I didn't even reboot (although I'm going to do so pretty soon).

Thanks for your help!!!!

Anonymous said...

Hi NG Yew Ban. Thank so much!!!!!