If I have multiple Oracle clients installed on a given workstation (i.e. Oracle 9 and Oracle 10), how do I specify which one is used by ADO? Is there a way to swap between the two clients?
I am currently using the Oracle Provide - oraoledb, not the Microsoft provider.
Apparently, I asked a trick question...although you can indeed use multiple Oracle Homes, the Oraoledb driver does not support multiple homes. In fact, since the OraOLEDB component is based on COM, it can only be installed correctly to one location at a time...
The Microsoft provider depends upon the current Oracle Home (environment path). Now you can change this through the Oracle Home selector but the Microsoft provider does not support the ability to change the path programmatically.
Source
The first oracle home which is specified in the PATH environment variable is used. Be aware that this is user specific and if you change it in a process, it's local to that process.
In general you shouldn't switch homes inside software, though simply use the latest one. Unless you're targeting 8i, the 10g client can connect to 9i without problems.
Related
I want to connect Forms 6i with database 11g R2 but currently I am using Forms 10g with database 11g R2. I want to use both of these Forms. Can I connect Oracle Forms 6i and 10g with database 11g R2 both at a time? What is the solution?
You didn't mention which operating system you use. If it is a modern MS Windows, note that Forms 6i is an old piece of software which was never certified nor supported on Windows 10 (nor Windows 7). Although I've read that people managed to install it and made it work, there's no guarantee that you'll manage to do it as well. You'll have to Google a lot and read a lot, collect pieces of knowledge and hope for the best.
when you installed all those Oracle products onto your computer, you should have installed each of them into its own Oracle Home (i.e. directory); otherwise, you can expect problems (such as files being overwritten).
as each Forms installation uses its own TNSNAMES.ORA, both of them should contain an entry for your Oracle 11g database. If not, Forms that doesn't have it will fail to connect. Alternatively (which is what I'd suggest) is to create a TNS_ADMIN environment variable which points to a directory which will contain a single copy of the TNSNAMES.ORA file (for example, C:\ORALIB) - doing so, you'd have to maintain only one copy of the file, instead of two (or even more) of them .
apart from that, you should be able to run both Forms versions. What happened when you tried to run Forms 6i? Do you get any error? If so, which one?
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
Going through an installshield project and am wondering what is the best route to go to check if SQL Server is installed as well as Crystal Reports Viewer? I was thinking of checking the registry but not sure if Local_Machine or Current_User is the better option? Or maybe an alternate option altogether?
I tend to do a search based on what my actual physical dependency ie. For example, if I need Oracle Client I search for oci.dll. It's kind of a case by case basis:
Registry typically costs less.
Hard drive isn't too bad if you search one directory. Recursive searches are expensive.
SQL Server might not need a search per say. What exactly is your SQL dependency? Client Connectivity tools? A database instance? A certain version or any version? Same for instance name. A running database instance that you can actually connect to?
If you are executing SQL scripts against a SQL server, the SqlLogin dialog can be used to establish connectivity.
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.
I want our team to develop against local instances of an Oracle database. With MS SQL, I can use SQL Express Edition. What are my options?
Oracle has an express edition as well. I believe it is more limited though (IIRC, you can only have one database on an instance)
Oracle XE
I have had a lot of success using Oracle 10g Express Edition. It comes with Oracle Aplication Express which allows the simple admin and creation of software via a web interface. It is limited to 4Gb of Disk Space, 1Gb of Ram and will only use 1 processor.
It's free and in my experience has been 100% reliable. It can easily be hosted within a Virtual machine.
Also Oracle SQL Developer is a cross platform application that can be used with any version of Oracle and is also free. Oracle 10g is superb. Go for it :-)
I'm happy with Oracle XE for development purposes.
I do have this piece of wisdow to share; if you're having problems like ORA-12519: TNS:no appropriate service handler found or ORA-12560: TNS:protocol adapter error from time to time then try to change your PROCESSES parameter, logon to Oracle using sys as sysdba and execute the following:
ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;
After changing the PROCESSES parameter restart your Oracle service.
Oracle allows developers to download and use Oracle for free for the purpose of developing software (at least for the initial prototype, best to read the license terms). Downloads here.
We ended up using Oracle XE. Install client, install express, reboot, it just works.
I don't recommend Oracle XE. My co-workers and I have been doing a project in Oracle and got severely tripped up after trying to use XE for our local development instances. The database worked fine until we started running local stress tests, at which point it started dropping connections.
I don't know whether this is an intentional, documented limitation or if perhaps we each just hit a weird bug, but I strongly recommend that you stay away from XE. When we both switched over to the full version, our problems immediately went away.
Also, Oracle doesn't require any kind of licensing confirmation for the full server; you have to click something to say that you have indeed acquired a license, but it doesn't make you prove it. So if you indeed have a license to use Oracle, there's no reason why you can't just install the full version on your development machines.