Solved

oci_connect and oracle 9i

Posted on 2014-11-12
17
237 Views
Last Modified: 2014-11-14
Hi,

I am using oci_connect to connect to an oracle 11 without problems, but oci_connect don't work with 9i, what i can do and how i can solve this problem?
0
Comment
Question by:joyacv2
  • 9
  • 8
17 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40438293
I don't think it is oci_connect.  Likely the version of the client you have installed.

To connect to a 9i database, you'll need a pretty old Oracle client version.  Sorry but I don't know the exact version.
0
 
LVL 1

Author Comment

by:joyacv2
ID: 40438394
The oci_connect in php docs indicates that requires 10 and over
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40438405
Version 10g should connect to a 9i database.  I would expect 11g and higher to have problems.

What version do you have installed?

Finding a 10g client version is going to be problematic if you don't have it in-house somewhere.  Oracle has removed the 10g software from their site.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:joyacv2
ID: 40438482
i have the oracle 11 client on an ubuntu server and use php to connect to databases, so what i can do?
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40438493
I'm trying to find information on if the 11g client will connect to a 9i database.

While I look, what error message are you getting?
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40438519
Check out this document on Oracle Support:
Client / Server Interoperability Support Matrix for Different Oracle Versions (Doc ID 207303.1)

I cannot post any of the information if you don't have access to Oracle Support.
0
 
LVL 1

Author Comment

by:joyacv2
ID: 40438555
couldn't found driver
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40438574
Now that I've re-read the question, I might have misunderstood the problem.

Just to make sure I understand the problem:
You have an 11g client installed and are trying to talk to a 9i database using oci connect?
or
You have a 9i client installed trying to connect to a 9i database?
0
 
LVL 1

Author Comment

by:joyacv2
ID: 40438710
the first one, 11 client trying to talk to 9i database using oci_connect
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40438773
Since it states it cannot find the driver, I wonder if there is an issue with the install.

Was this a new install or the same machine doing connections to both an 11g and 9i database and the 11g works?
0
 
LVL 1

Author Comment

by:joyacv2
ID: 40438946
the connection always is to an 11 oracle database, this is the first time that I try to 9i, but which alternative i have if oci_connect cannot be used?
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40438963
I'm not a PHP person.

If the same app on the same server can connect to an 11g database and all you change is the database you are connecting to, I would not expect a "couldn't found driver" type error.

I would expect a version incompatibility type error.

I see some posts stating that you need 10g or above for EZConnect.  I see other posts stating oci_connect will work against 9i.

Are you using EZConnect?  If so, try the old tnsnames.ora method.

If it still doesn't work, please provide the exact error.
0
 
LVL 1

Author Comment

by:joyacv2
ID: 40438967
yes, I already try that, but don't found any tsnames explanation for ubuntu server 12.04 lts, do you know how to do that?
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 40438983
tnsnames is an Oracle thing not an OS thing.

What is the connect string you are trying to use?

If you are using tnsnames there should be a file named tnsnames.ora on your server.  This is typically in $ORACLE_HOME/network/admin.  Where $ORACLE_HOME is the base folder where you installed the Oracle client.  You 'can' change the default but don't want to confuse the issue unless I have to.

Still not sure about your setup:
You have one server that can connect to 11g and you are trying to use that exact same server to connect to 9i and all you are doing is changing the connect strings?
0
 
LVL 1

Author Comment

by:joyacv2
ID: 40439048
i have an ubuntu server 12.04 lts, with php, 11 oracle client, pci8 that connects to another server that have 11 oracle database, and i am trying to connect to another server that have a 9i oracle database
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40439055
OK, then the same server that works connecting to 1g database is failing when trying to connect to a 9i database.

That tells me that the client is installed correctly.

Still waiting for your connect string.
Still waiting for the exact error message.
0
 
LVL 1

Author Comment

by:joyacv2
ID: 40439073
i am out of office right now, i will give you the info as soon as i can, thank you very much!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question