18 July, 2011

ODP.NET and VS2010

Pro ODP.NET for Oracle Database 11g (Expert's Voice in Oracle)For the past couple of weeks, I have been struggling with the usage of ODP.NET 11g version, together with VS2010.

I currently have Oracle 8i installed on my machine, and this is running TOAD v9.xxx, and also PL/SQL Developer, with VS2005.

All things are working fine.

I have actually been trying out VS2008 and VS2010 Express editions for quite sometime, but I have never ventured into the use of ODP.NET 11g.

Then about a month ago, I was able to get the installer for VS2010 Premium from our IT folks, and that is when my nightmares began.

Database Normalization eBook

Conflict of (OraHome) Interests

I didn't know it, but right on top of my working environment, I installed immediately, without trying out the earlier versions (ODAC ver9, ver10), ODTwithODAC112021. Well, I was able to run VS2010 codes using ODP.NET, and I was actually able to note that it is fast. I managed to create a simple code that lets me use stored procedures, which I immediately progressed to REF_CURSOR, as is the offered advantage when using ODP.NET, which is able to fetch multiple rows and multiple columns data set, which can be easily accessed as per normal (hasRows, etc., etc.).

ODP.NET Developer's Guide: Oracle Database 10g Development with Visual Studio 2005 and the Oracle Data Provider for .NET: A practical guide for ... Oracle Developer Tools for Visual Studio 2005But that is in exchange for a non-functioning TOAD, which is now unable to access some 'older' systems. 8i, 9i, etc. The error messages I got, which when I googled out to see if anything can be of help, did not help my situation. Yes, there are a ton of articles that should help me out, but to my situation, no help from the web was of help.

I got these: ORA-12541, TNS no listener, ORA-31xxx something, something, xxx is no longer accessible xxx, etc.

The thing is, when I run into these problems, that is when I found out that there is the known problem of versioning issues with Oracle clients, where the Home is switched from here to there with each installation, or that even when it didn't, a new conflict arises between the different Ora versions.

So I uninstalled ODTwithODAC112021, but that didn't restore my system to its working condition.

Thus began my half-month experimentation - mind you, I am not able to work during these times!

When one fails, will the others succeed?

I now tried installing Oracle 9i, which installed correctly, but TOAD can't perform login. Uninstalled.

Pro .NET Oracle ProgrammingI tried back ODTwithODAC112021, which resulted to the error: "OCI version product is not supported", and when I googled this error msg, I found that TOAD has to be upgraded to version 10. Money?

Uninstalled ODTwithODAC112021, but still TOAD can't do login.

I now tried installing ODAC92070, but the setup was terminated without any error msg at all. It just quit on me!

I now tried to install back Oracle 8i client, but this one also throws out an error msg now, and can't be installed anymore.

Have I cracked my PC's nervous system? It is so confused now!

I attempted installation of Oracle 9i client, and while it installed correctly, TOAD still can't run. Uninstalled.

At this time, I looked at ODAC101040, installed it, and voila! TOAD runs. But wait a minute, VS2010 now throws out some error. Version problem? Unfortunately, I didn't capture the error message details. Somehow it has got to do with some service that isn't running. However, I did check that  OracleMTSRecoveryService is running from the Services view. Uninstalled.

As I am getting tired now, and running out of options, I planned to just make VS2010 run, declare that this is more the important thing, and call it a day. I installed ODTwithODAC112021, but at this time, even this one now throws out an error during installation. I can't proceed to install it!

Pro .NET Oracle ProgrammingI find that this is due to my home being selected as DEFAULT_HOME1, which is the very first home that was created with my old configuration when Oracle 8i was installed.

I changed that to OraClient11g_home1, and I was able to install ODTwithODAC112021, and then I was able to run VS2010 okay, but not TOAD (at least, some newer systems I can connect to, but not all, esp those running on old servers).

I went to sleep.

A new day

I thought that I would be okay with what I now have, but I was wrong. I can't rest until everything works the same, as when I started, and yet I wanted to work with the latest versions. I repeated the whole exercise the whole day, again, but still ended up with either the VS2010 working, and TOAD not working, or the other way around.

Did I mention it took me half a month doing this? I did. A couple of days. But it is good that my boss never asked me on what I have produced within those 2 weeks while attempting to make things work on ODT.NET and VS2010.

Revo Uninstaller to the rescue (or so I thought)

Professional Visual Studio 2010 (Wrox Programmer to Programmer)After so many days doing install and uninstall actions, my system seems to have been corrupted. I can't even unstall the 8i, 9i clients completely, and also the ODAC 9, 10, and 11 versions. They remain in the system even after I have performed uninstallation. What's worse, my system doesn't work as before.

I have Revo on my system, so I went to 'Forced uninstall' mode, and I was glad I did. I cleaned up my system, even to the last bit of these Ora creatures - completely!

And right after the last clean-up, I'm not able to access internet, or even our intranet applications! I must have uninstalled some fundamental services when I did the clean-up! I did!

My TCP/IP was deleted together with the items when I did the forced uninstall!

So not only do I have a system that doesn't run TOAD, or VS2010. I now have a system that can't do network connections! And in a company that relies on networks for applications to run, my system has become useless altogether now!

A help from our User Support Team.

Visual Studio 2010 All-in-One For DummiesI quickly went to our User Support group, and I told him what happened. You see, I have other PCs at work that I used to google possible fixes when TCP/IP is broke, and I did all those things. Yes, there is help all over the web, but unfortunately, none of these, though helpful, helped my situation.

So I went over to the 'nut-and-bolt' guys, and I was advised to see if I can do it by system restore. So I grab that flicker of hope, immediately proceeded to do a system restore, and my PC was back! Now I only have those duplicates to deal with.

I now cautiously performed the uninstallation of the Oracle products. (You have to get burned before you become cautious and careful sometimes...) I checked, and I found that there was an article somewhere in the OracleForums, about manually uninstalling Oracle 8i, 9i, etc. I followed that to the letter after doing the OUI uninstallation actions. I edited the registry, removed the folders, delete the files in the Temp\ folder, emptied my Recycle bin, with the reboot after the registry edit and after emptying the bin.

At this point, I now have a 'clean' system.

Instant Client, ODAC92070 and ODAC112021 (XCopy version) - the three muskeeters

Microsoft Visual Studio 2010: A Beginner's GuideI was getting curious if Oracle Instant Client works, for me, I should say, since many do vouch for it. So as part of my curiosity, and with my exhausted energy that I can only do little and quickly at that, I now tested Instant Client, especially that the procedure is fast and simple.

Copy zip file, unzip, rename, define Path, and copy over my TNSNAMES.ORA, SQLNET.ORA and LISTENER.ORA. I was careful to put these in the correct folder.

Did my TOAD 9.xxx work? You bet it did!

However, as I have said, some older systems I still am not able to connect to. We're not done yet...

I now installed ODAC92070, taking note of any error messages that might get thrown during installation. Well, there was none.

Does TOAD still work? You bet it does!

And now, I am able to access the old Oracle server. Last hurdle, VS2010.

Visual Studio 2010 Professional UpgradeWith all hopes dashed with the failed attempts on ODTwithODAC112021, I switched to ODAC112021, which is basically the same as the former, but is just different in the manner of installation, I tried the XCOPY version.

Finally, the system variable TNS_ADMIN was set to the final folder/directory, and testing was done:

TOAD - it works!
VS2010 - it works!

Victory, at last!

Boy, I still got what I wanted, and although I didn't get it so easily, there is prize for the persistent and diligent.

Till then!

Enhanced by Zemanta