cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Superfreak3
Level 11

Questions About Using Oracle.ManagedDataAccess Reference in a Custom Action...

Hi all,

First off, forgive me as this is probably entirely an Oracle Issue, but I'm wondering if someone out there has done something similar and experienced my issues. I have a Web App installation that handles both SQL and Oracle Db connections. We wanted users to be able to install this app on a server that may not have a local Oracle instance and didn't want those folks to have to install the Oracle Client. So, what I did was simply created a new connection info dialog for Oracle. A click of the Next button on that dialog runs the Custom Action in questions. All the widget does is grabs some of the entered values via PROPERTIES, cobbles together a connection string and tries to open the connection.

I should add here that I am basically a newb to Oracle workings!

The custom action has Oracle.ManagedDataAccess as a Reference. Initially everything was working great with what I'll call a direct connection or using this command line to open the connection...

connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mymachinename.mydom.local)(PORT=1521))(CONNECT_DATA=(SID=ORCL)));User Id=ITSME;Password=Password1;"


Working only with this connection, everything worked installing on both a separate server and pointing to the remote Db or installing directly on the Oracle Db Server. However, we're recently learned that we have to support TNSNAMES.ora. So, if this option is chosen, the widget cobbles a connection string as follows...

connectionString="Data Source=ORCL;User Id=ITSME;Password=Password1;"


This is where the weirdness comes in. To use TNSNAMES.ora our app has to be installed directly on the Oracle Db Server. For some reason, I cannot get this connection check to function properly. It just does not connect and returns...

ORA-12154:TNS:could not resolve the connect identifier specified

I read a bunch and played around and eventually got it to work on one of our test servers after compiling my widget as x64. I thought I had reached the promised land, but there of course was a twist. Apparently our application is having an issue running directly on the Oracle Db Server. On the server I tested on, Oracle's ManagedDataAccess assembly was removed from the GAC so the .dll we ship with in the app would work. Once there was something in the GAC again, my success well, failed!

So, I'm wondering how to best handle this as it seems there is some type of conflict with the ManagedDataAccess .dll Oracle installs to the GAC and what we are using in my widget and our app. This seems like it could be quite hairy.

The current solution for the app is to install .dlls to the GAC. That concerns me as well, but that's a topic for a different day.

In short, is there anyone out there that has created their own Oracle connection dialog with a connection check mechanism similar to mine? If so, did you have issues with Oracle.ManagedDataAccess.dll?

Any information or points to it would be more than GREATLY appreciated!
Labels (1)
0 Kudos
(3) Replies
chad_petersen
Level 9

I can't speak directly to your issue, but I can tell you that items installed to the GAC are not available for use until after InstallFinalize. So, you cannot call any managed custom actions using assemblies that the same install GACs. You might be able to register a COM interface for the same assembly and use that during the install, depending if your assembly also has a COM interface or not.

I hope that helps.

Chad
0 Kudos
chad_petersen
Level 9

Here is some information on what I was referring to. Rob Mensching is the father of WiX, in case you have not heard of him before. A long-time Microsoft employee who now works for FireGiant.

https://www.mail-archive.com/wix-users@lists.sourceforge.net/msg26474.html

Hopefully this is helpful to you.

Chad

0 Kudos
Superfreak3
Level 11

chad.petersen wrote:
I can't speak directly to your issue, but I can tell you that items installed to the GAC are not available for use until after InstallFinalize. So, you cannot call any managed custom actions using assemblies that the same install GACs. You might be able to register a COM interface for the same assembly and use that during the install, depending if your assembly also has a COM interface or not.

I hope that helps.

Chad


I don't need to access the GAC dlls, just install them there. I hope we can stay away from installing Oracle.ManagedDataAccess to the GAC. I just don't think installing something involved in another application is a good idea.
0 Kudos