Can Oracle client versions 9 and 11 both be installed on the same machine? - oracle

I have a program using odac(11.2) and oracle client 11.2. Now I want to deploy it to a box which is already installed a oracle 9i client.
Some existing programs is depend on it so I fear the new client will harm the existing program. Is this true? And how can I keep them all working properly?

Normally you install oracle products in a dedicates ORACLE_HOME in different directories (like /ora/app/oracle/product/9.2 and /ora/app/oracle/product/11.2). Then you set the $ORACLE_HOME and $PATH variables to that directory which will be working fine.
We use many different client versions from 8.1.6 to 11.2 on one machine. Every application has an own shell script setting up the correct environment prior to starting.

Related

Toad for Oracle, No valid Oracle clients found. You need at least one 64-bit client properly configured

I get this error when I launch Toad for Oracle.
No valid Oracle clients found. You need at least one 64-bit client properly configured.
This has been happening since I upgraded the Oracle Client to Oracle 12c from 11g.
Here is what I have done so far to try to resolve it based on internet research:
I checked the path variable, it's currently set to C:\xyz\Oracle\ora12.1\client_2\bin, and there is an Oracle installation at this path.
I checked the TNS_ADMIN variable, it is currently set to C:\xyz\Oracle\ora12.1\client_2\network\admin. This also appears to be valid and correct, there is a tnsnames.ora file under this path.
SQL Plus works without issues, and Oracle SQL Developer also works without issues.
Is there anything else I can try to resolve this issue? Unfortunately, uninstalling and reinstalling Toad is not an option at this point as I do not have access to a new setup.
The issue is due to not having the Oracle Database installed on your computer.
You can download the database here: https://www.oracle.com/database/technologies/appdev/xe.html
Once the zip file is downloaded and extracted, run setup.exe. Once that is complete, the Oracle DB will be installed on your machine and the error will no longer appear.
With TOAD you need to have oracle client installed on your computer and you must configure the related TNSNAMES.ORA to connect to the server.
If you use SQLDeveloper you can do without oracle client installation.

How to change the Oracle Client user in a connection

I have the oracle 10 and 11 clients instaled in my machine. When i go to the command line and type TNSPING the output tells my something like this
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-OUT-2012 09:34:39
so, i assume that this machine is using the 10 version of oracle client to handle the connections.
How to change it?
If you go to a command line and type "tnsping" on a Windows machine, whichever Oracle Home is listed first in your PATH environment variable will be the Oracle Home that is used. If you want the 11g Oracle Home to be the default, you can edit the PATH environment variable (Control Panel | System | Advanced | Environment Variables) and move the 11g Oracle Home path ahead of the 10g Oracle Home path. Alternately, you should be able to open the Oracle Universal Installer from the 11g install and use the Oracle Home selector that is in that utility to change the order of the paths in your PATH environment variable. Behind the scenes, that tool is just rearranging the directories in your PATH.
Whether the default Oracle Home is being used by a particular application, though, is a somewhat different matter. Some applications are set up to use whichever Oracle Home happens to be the default. Other applications can make use of components installed in the non-default Oracle Home. Since you tagged this question ODP.Net, I assume that the application(s) you are actually concerned about are using ODP.Net. If that's the case, you probably want to look through the ODP.Net FAQ where it discusses using ODP.Net on a client with multiple Oracle Homes.
Exactly for the same reason I have made the following tool:
http://oratools.codeplex.com/wikipage?title=Oracle%20Home%20Selector&referringTitle=Home
it searches for oracle clients installed on machine, and allows to switch current oracle home by modifying registry, environment variables and registered libraries

ora-12560 :TNS: protocol adapter error after installing ODP.NET

I have installed Oracle Database 11.2.0.1 Win64 and also Client 11.2.0.1 Win64 in my windows 7 Ultimate and I was able to access Oracle database using Sql*plus
using sqlplus / as sysdba. After that I installed ODP.NET ODTwithODAC1120320_32bit to work with Oracle using C# in Visual Studio 2010. When i tried to add connection to Oracle database using ODP it pops out ora-12560 :TNS: protocol adapter error and even during logging to Oracle using SqlPlus / as sysdba.
I have read several articles that say stopped service will cause but mine is running.
What could be the problem???
The main problem that I faced Connecting to Oracle 11g using Server explorer in VS 2010 was not version compatibility of ODP with Oracle database but it's architecture. After such errors I uninstalled Oracle Database 11g using deinstall.bat file then cleaned Registry Key ../Software/Oracle and cleaned up temp files, did a system restart. Then installed Oracle 11g Database x32 Database server, ODP.NET x32, checked Env vars.
First success was that I was able to connect to DB using SQL*Plus. After that started VS 2010 and tried to connect ..... Connected! wow has worked in VS IDE. I was so happy :)
I remember how many times I reinstalled Oracle(cleaning,configuring checking listeners, restarting services). Then my hard work really paid off.
here is a screenshot
Generally, I advise to install Oracle server under different credentials than what you usually use. The Oracle server (under Windows) makes use of a few environment variables; and the same is the case with ODP.NET as well. And while you can't easily switch between different sets of env variables in your user profile, you can assign different env var values to a (different) user under which the Oracle server is installed and/or being run.
If you already have your Oracle server installed (which, I suspect, is your case), then try:
Create a new user in your Windows, make him sufficiently privileged. ("Admin" rights will do fine. :-))
Log in as the new user.
Set up ORACLE_HOME, ORACLE_SID, NLS_LANGUAGE and PATH environment variables for that particular user (not globally for the whole Windows!) to point to your Oracle server.
Log in as the original user.
Start the Services management console ("services.msc").
Change "Log On" credentials for the OracleServiceSOMETHING and Oracle SOMETHING VSS Writer Service and OracleJobSchedulerSOMETHING and OracleOraDb11g_home1TNSListener to that new user+password you just created. (... where SOMETHING is usually the name of your instance)
Stop all Oracle services.
Set up ORACLE_HOME and PATH env var to point to your ODP.NET root and root\bin folders respectively; set up the ORACLE_SID and NLS_LANGUAGE vars to whatever values you need.
Start all Oracle services. (After this moment they should be running under their own credentials.)
Let's pray that it works.
I myself would have to improvise, too, if this scenario didn't work. But so far I have successfully run two Oracle servers and one Oracle client on the same machine this way with no problems, so I hope it works for you too. If it does not, then there's still the option of reinstalling your Oracle server completely.
Don't forget about backing up your database ... just in case something horrible happens.

Cognos 8.3 failing to connect to data source. Why?

I have installed Cognos BI 8.3 on my machine, which has a Windows 7 OS 64-bit. In IBM's supported environment list for Cognos 8.3, Windows 7 is not listed. On top of that, it says the product will only integrate with 32-bit 3rd party libraries. So, you can already see that I'm already starting on a bad foot. But anyways, this is the machine I have and that is the software I got, so I decided to see if they would work together..
I installed Oracle 10g Express database also in my machine and Apache 2.2 server. Up to there no problems.
Before moving further, I copied ojdbc14.jar to cognos/.../webapps/p2pd/WEB-INF/lib and added the Oracle database in Cognos Configuration. Tested, passed.
With the database started, the Apache server started, and Cognos started, I was successfully able to start Cognos Connection on the computer. So, it looks like the OS is not an issue.
(You can see everything I did by following the steps on this site, which since two days ago seems to be down but I'm thinking will eventually come back up)
Then I decided to try the samples, so I tried to create a data source connection from Cognos to the Oracle database. So, in the admin config console (i.e. Administer Cognos Contents > Configuration), I decided to create a new Oracle data source. I put the credentials, but BAM.. testing fails.
Fail Message:
QE-DEF-0285 The logon failed.
QE-DEF-0323 The DSN(ODBC)/ServiceName is invalid. Either the DSN is missing or the host is inaccessible.
RQP-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in:
testDateSourceConnection
UDA-SQL-0031 Unable to access the "testDataSourceConnection" database.
UDA-SQL-0532 Data Source is not accessible: "XE".
ORA-12154: TNS:could not resolve the connect identifier specified
RSV-SRV-0042 Trace back:
...
From what I have researched, it could be a number of things, but nothing seems to work. Here is what I tried:
Adding ODBC driver. Added the Oracle XE driver, even making sure it was done in the 32-bit ODBC manager (i.e. Windows\SysWOW64\odbcad32.exe). That didn't work.
Added ORACLE_HOME, LD_LIBRARY_PATH, and TNS_ADMIN to my environment variables.
tnsping'ed the XE database and it the ping returned ok.
There are no tnsnames.ora duplicates in the computer.
I tried and I am able to connect to the database via sqlplus. Did I mention that Cognos Config database test also passed?
Installed Oracle XE client. But didn't do much with it because the Oracle server is installed in the computer and also has a client component.
Has anyone come across this problem? I haven't been able to diagnose the problem or make even the slight progress for days. If you would like me to provide more information on any of the solutions I tried, please do ask. If you have a potential solution or, even better, if you have been able to solve this problem before, please let me know how!
Thanks!
One thing to keep in mind : certain portions of Cognos BI are implemented via Java and other portions are implemented via native C++ processes (the BI Bus processes)
Cognos connects to the content store database from the Java process using JDBC.
The BI Bus processes will connect to Oracle using a native oracle client.
So based on your description, I'd say that the problem area is in the native oracle client configuration (or the Cognos service's perspective of it).
You mentioned adding the ORACLE_HOME, LD_LIBRARY_PATH, and TNS_ADMIN environment variables in windows, and the fact that Oracle Utilities like SQLPlus and TNSPing are working for you.
When you added the environment variables, did you add them to the SYSTEM area for environment variables or the User area...?
If you're running Cognos as a service, its going to be a child process of SERVICES.EXE, which is run as system (this process is also not restarted unless you reboot the machine).
I'd try this :
make sure the above environment variables are defined for the SYSTEM user (in the system area, not the user area)
once you've done this, reboot the machine
See if you can create the database connection now.
If that doesn't work, I'd suggest doing a "run as" of SQLPlus or TNSPING as the SYSTEM user (and see if that works).
In order to use oracle as data source, you must install 32 bit client.
64 bit client will not work.
So if you installed oracle express 64 bit, and you don't want to uninstall it,
you can just install additional 32 bit client, and make sure to set it as your default home.

Conflict on ORACLE_HOME: OC4J + Oracle Database 10g (10.2.0) on Windows XP

My project requires me to use OC4J and Oracle Database system. Therefore, I go to Oracle web page to download OC4J Application Server (oc4j_extended_101350) and Oracle Database 10g.
Installation of OC4J is simple. I just unzip it to a folder and set the JAVA_HOME and ORACLE_HOME. Then everything is fine.
But then, Oracle Database cannot be installed successfully and it stops at installation of Network Configuration Assistant.
Finally, I found out that OC4J Application Server and Oracle Database 10g need different ORACLE_HOME.
Anyone can suggest what is going on ? How can I put two things on Windows XP ?
The ORACLE_HOME variable is the software installation directory for EACH INDEPENDANT PRODUCT, so when you say, for example, that the OC4J Oracle Home is C:\oracle\oc4j10135, then you would install the Oracle Database at something like C:\oracle\ora10gdb. When starting and stopping the oc4j instance, I would recommend a batch script that sets the oracle_home environment variable manually so that you are explicit in your execution environment.
Specifically, in order to install both in your environment, UNSET the ORACLE_HOME environment variable that you or the software configured with the OC4J installation and make sure to install the Oracle Database software to an empty directory.

Resources