TNS,can not handle the service name when two different version installed together - oracle

In our server,we publish a asp.net application,which use the oracle11g as the database.
We just set the connection string in the web.config,it works.
However someone install the oracle8 in the same server since they need them in other client application.
But after that,our web applcation can not work,we get the error:
ora-12154 TNS an not handle the service name
Then I found that the path environment has been changed. The "C:/app/oracle81/bin" is added at first. But even I change the "D:/app/oracle11g/bin" first,it does not work also.
Any idea to make the both work?

You might investigate what drivers are being used within .NET ... Microsoft's deprecated Oracle provider or Oracle's own provider or some kind of ODBC provider sitting on top of several kinds of possible drivers in a DSN. Each might be remedied in a different way.
But it sounds like the Oracle 8 installation has stolen priority over the Oracle 11 installation in some way that is not just the "PATH" environment variable. My guess would be the registry.
In ascending order of inconvenience and effectiveness you could try:
1) Run the Oracle 11 installer and see if it knows about the Oracle 8 home. (Unlikely if it's 8.0). Set it as default or top of the list; exit; then go back and set Oracle 11 as the default/top of the list.
2) Configure the TNS entries in your Oracle 8 home to connect to your Oracle 11 database. Live with the fact you're using a very out of date client.
3) Uninstall and reinstall Oracle 11 to get it to steal back the priority.

By default the .net framework uses the FIRST oracle directory it comes to the in the path statement. There have been some discussions on how to get around this - but your best bet is to run one client per machine.

Related

Oracle Repository creation utility Unable to connect to oracle 11g Enterprise Edition database DB ORA-01882: timezone region

it happened on Oracle fussion middleware error.
Unable to connect to the DB. Check if DB connection details entered are correct.
ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
To be very honest, i i've searched thouroughly.
i found out that it had something to do with the jdk in my oracle 11g ee edition so i tried running timezone updater on the jdk, but the timezone was unable to update.. it returned an error saying 'cant rename {0} to {1}'.
am not even sure am on the right path... please can someone out there give me a hand.
the timezone error was coming up as a result of the character set i selected for my database. it was suppose to be utf8 however, i choose some other one. i had to uninstall my database, and recreated a new one using "utf8" character set, which happens to be a general standard. :)
Installation of FMW falls into two categories: Developer and Production. Developer uses soa_quickstart + WCC + WCP + MFT etc. WLS and all needed files are installed in this installation and then there are 3 different domains that can be used/configured - local to JDev, standalone (file based no DB or RCU required) and Compact (db required + RCU). Production requires WLS + infrastructure + binaries (SOA/OSB/BPM, MFT, WCC, WCP). These are all separate installs and require DB and RCU as well. So, the question is: what are you installing and why? If you are installing for a production env you should follow the oracle install instructions and EDG closely. If you are installing a dev env, then it is very fast and easy - a standalone env is a great choice. While there are some capabilities not available in a Standalone/File- based install, it is still the preferred choice for SOA/OSB/BPM developers. If you simply want a FMW install to play with or use as a developer, you can download and install a free VirtualBox image that comes fully configure and ready to use. You should also consult the system compatibility guide as well, just to be sure.

OCISessionBegin hangs in multithreaded COM+ applications [Delphi + ODAC + Oracle]

We have here a application that uses ODAC components inside COM+ dlls to connect to Oracle Server 11g.
Lately we are facing a problem that we cannot find the solution.
For some reason, when the concurrency of the application server at some of our clients is too high, some dlls starts to hang and they have to kill the process to restore the usability of our product. Trying to reproduce the error here at our office, we created a test environment to stress an application server. We start 30-50 programs that make calls to application and after some time the problem appears.
Debugging our DLL after the server hangs, shows that any subsequent call to OCISessionBegin cannot complete. No error is generated. No other symptoms are visible.
The last line that the we try to execute is: Check(OCISessionBegin(...)); on OraClasses.pas
We checked the database no contention, no lock.
We are using ODAC 6 on our clients, but we upgraded it to the last version and the problem persists. We have to use the Oracle Client 10 to connect to the database 11g because the are using the version 6 of ODAC.
Thanks a lot
AFAIK you need to create your environment with both OCI_EVENTS + OCI_THREADED attributes sets, in such a configuration.
For instance, here is how it is initialized in our Open Source direct Oracle access unit:
fEnvironmentInitializationMode := OCI_EVENTS or OCI_THREADED;
...
with OCI do
try
if fEnv=nil then
// will use UTF-8 encoding by default, in a multi-threaded context
// OCI_EVENTS is needed to support Oracle RAC Connection Load Balancing
EnvNlsCreate(fEnv,Props.EnvironmentInitializationMode,
nil,nil,nil,nil,0,nil,OCI_UTF8,OCI_UTF8);
I suspect you have to check how your OCI environment is created in ODAC.

Oracle Connection String With Windows Authentication

We have a requirement to make our products work on Oracle as well as SQL Server (around which they were originally built). Unfortunately we don't have any in house Oracle development experience to speak of but as a senior dev it has fallen to me to lead the project. So far I have managed to make our app connect to an Oracle database (I'm using Oracle XE 11.2) by using the following connection string:
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=VS010-ORA11GR1)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=DEVORA)));User Id=dbo;Password=dbo;
The reason we decided to use this type of connection string is because we do not want to rely on changing tnsnames.ora on every client machine. However, as you can see this specifies an Oracle user and associated password. We also need to provide the ability to use the equivalent of SQL Server integrated security.
According to the literature I have read, to do this I simply need to specify / as the user id and then omit the password portion (as this is ignored anyway for Windows authentication). I also created the user in Oracle, making sure it matched the Windows user, with the following snippets:
CREATE USER "OPS$<DOMAIN>\<user>" IDENTIFIED EXTERNALLY;
GRANT CONNECT,RESOURCE TO "OPS$<DOMAIN>\<user>";
I also checked that the sqlnet.ora file on my local machine which hosts the XE instance and my dev environment contained the line:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
I understood that this would enable my app to connect to the Oracle database uing Windows Authentication. However what actually happens is that I get the following Oracle error message:
ORA-01005: null password given; logon denied
this doesn't make much sense because of course its null - it's supposed to be, according to the tutorials I've read.
The app targets .Net Framework 3.5, we are using the System.Data.OracleProvider and the actual connecting and so on is handled by Enterprise Library 5. Incidentally, I am aware of the deprecation of the OracleClient component but I just want this to work before I go into the extra complexities of changing providers.
Can anyone tell me what I'm missing? Have I chosen the wrong type of connection string? I apologise for any basic mistakes but I have always managed to avoid Oracle until now so my knowledge of it is close to zero.
Many thanks
I had the same problem and solved after adding this to conn. string:
Integrated Security=yes
To expand on the answer above by #Stikut. I tested this out with NHibernate 3.3.3.GA and it works.
user id=/;password=;Integrated Security=yes

No Microsoft Access driver in Mac OS X ColdFusion 9 Developer Edition - can’t create a datasource for Access

I have CF9 Developer Edition installed on Mac OS X 10.6. I have set up datasources successfully to the localhosts MySQL. However, I have taken on a website which uses a Microsoft Access database: fine on the actual server, but to work on the site offline I need to set up the datasource to talk to the Access database.
For some reason, there is no Microsoft Access option in the Add Driver list when setting up a new datasource in the CF admin.
Any ideas on what I need to do would be most helpful.
There is no mac driver for Access available.
You can upconvert your database to the free edition of SQL Server. It's probably a good idea to convince your customer to migrate from Access to SQL Server anyways.
Whilst I'd very much second the comments above regarding getting off of Access if you can, there does appear to be a couple of type-4 (pure java) JDBC access drivers (although I've not used them)
http://www.hxtt.com/access.html
This article links to two drivers. Neither are free but both have evaluation periods on them which may get you through what you need to do.
http://www.razorsql.com/articles/ms_access_mac_os_x.html
You should be able to use these as custom JDBC datasources in ColdFusion.
let us know if you have any success.
There's proprietary read-only driver available.

How do I fix a broken connection to DB2 from a web application?

I support some old web applications, VBScript-based ASP for the UI and VB6 COM modules for the business and data access layers. Last weekend, I installed DB2 Connect Enterprise Edition v8 fixpack 14 on several Windows 2000 servers, and one of the web apps errors out on null data when it calls the built in VBScript function FormatNumber. This numeric data is retrieved by a SQL Server query, but the only way the SQL Server column is populated is with the calculated results returned from a DB2 query earlier in a progression through several pages.
When I installed DB2 Connect EE, one of the components loaded was MDAC 2.7. I followed corporate instructions and had the installation save an ODBC System Data Source, which reported a good connection when I tested it after the install.
For what it's worth, the project references in the production VB6 modules pointed to MDAC 2.5. I have tried recompiling and deploying to COM on my test server new versions of the VB6 modules referencing MDAC 2.7. My development environment is Windows XP Pro, with MDAC 2.8 and DB2 Connect EE v9.5 installed. When I deployed the updated VB6 dlls, the CreateObject fails to instantiate the classes with the error message that "The class does not support automation or the requested interface".
I've rolled the DB2 Connect install back and have reinstall v8 of the DB2 runtime client, which was the previous environment. The problem, however, persists.
I don't really get the picture for how things are connected together - where is the SQL Server and where is the DB2.
There are forums on IBM's site for helping out specifically with DB2 Connect EE, wwhich I think is a pretty pricey product (not sure tho).
One way I have seen people do it is configure a SQL server as the data gateway. You can define DB2 as a linked server, and then perform SQL queries through the SQL server in order to get to DB2. Apps need only to be able to connect to SQL Server, not directly to DB2. They get to DB2 indirectly. Depending on the load on the system this may or may not be feasible for you. You can even do joins across data stored separately in DB2 and SQL with this approach.
It's one more option in the toolbox, along with replication, data federation, and so on. I found that it reduces the variability in connectivity.

Resources