Instant Client 11.1 and Visual C++ 2005

Hi..
I'm trying to develop a simple program in c++ using OCCI in MS VC++ 2005 but I can't seem to link the right files.
Can someone help me out with some steps to how to make things work? I'm not used to Visual studio and even less to Oracle libraries.
Since I wanted to not use a lot of space I've downloaded the Instant Client 11.1 and the Instant Clien SDK from the same version. I've been palying with the PATH variable and some extra linking libraries in Visual Studio but I'm still getting some errors.
Are those the only things I have to download and how can I put it to work with Visual C++?
Thanks..

ligacao = env->createConnection (user, passwd, db);
where db is a string in the form of: dblocation:1521/apexMy db string is either:
"//host:port/SID" where SID is of the form DBNAME.DOMAIN, i.e. the full database name as entered in dbca;
or
"SID", where SID is just the DBNAME "alias" (I guess) configured in tnsnames.ora, $ORACLE_HOME/NETWORK/ADMIN.
Note that I'm no expert in these things. I figured out the first form from the doc, and was shown the second by an Oracle Consultant who did the listener.ora and tnsnames.ora himself. See http://download.oracle.com/docs/cd/B28359_01/network.111/b28316/naming.htm#NETAG255
--DD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Oracle 10g express, Windows Vista and Visual Studio 2005

    Hello,
    I have Oracel 10g express and Visual Studio 2005 professional, all installed on Windows Vista and working fine.
    I want to use the .net tools but I have had problems to install the wright version for this environment. Has anybody have this same configuration working? What are the downloads I need to have and the steps to have the .net oracle tools working ?

    It can be done:
    1) Download and install XE. Don't download the special "ODT for XE"
    2) Download and install ODAC 11g with ODT into a different directory than XE
    3) Copy over the TNSNAMES.ORA from the XE install into the new Oracle home.

  • Instant Client for Win32 and ODBC Application

    Hi.
    I just want to know how will Instant Client handle an ODBC Data Source in Windows 9X/2000/XP.
    Will it be a new ODBC Driver?, Can developers like me ship that "driver" with the application so that the end user could just open the application and use it without any other installation?.
    How many disk space will Instant Client need?, do we need to set up the Instant Client to connect to the source, as we need to do with the current client software, or will it be enough to set the Connection String?
    Thank for your help, I am developping a little application for my company that need to access an Oracle Database and need to be installed for many users on Windows XP Desktop Machines.

    I noticed your reply to this topic and I am
    having the same problem with OLE DB or ODBC.
    I posted the following on another message and
    nobody has answered. There are also no examples
    in the Oracle web site on how to connect to a
    remote client using ADO. Any help will be
    appreciated, Tony.
    I am trying to create an installation package
    from Visual Basic (version 6.0) that will let
    me connect to a remote Oracle database. Does
    anyone know what needs to be installed on the
    client machine? I created a standard package
    and it does not work on the client.
    My connection string is as follows:
    Dim adoCn As New ADODB.Connection
    adoCn.Provider = "OraOLEDB.Oracle"
    adoCn.ConnectionString = "Data Source=PSYTEST" _
    & ";User ID=SYSTEM" _
    & ";Password=Ciao" _
    & ";PLSQLRSet=1;" _
    & ";Remote Server=xxx.xxx.xxx.xxx"
    adoCn.Open
    The xxx.xxx.xxx.xxx is the IP address of the
    server. The program works when I use it on
    the local machine, but it does not work when
    I create an installation package and I install
    it on a remote client machine.

  • Instant Client for ARMv7 and ARMv8?

    I don't see Instant Client binaries being available for any of ARM architectures (arm-linux). Considering that ARMv7 is already available on server market and ARMv8 is coming soon enough, will there be any binaries compiled for such architectures (soft and hard fp versions)?
    I would prefer not to use any kind of gateway (x64-84 machine) to access the database.

    I noticed your reply to this topic and I am
    having the same problem with OLE DB or ODBC.
    I posted the following on another message and
    nobody has answered. There are also no examples
    in the Oracle web site on how to connect to a
    remote client using ADO. Any help will be
    appreciated, Tony.
    I am trying to create an installation package
    from Visual Basic (version 6.0) that will let
    me connect to a remote Oracle database. Does
    anyone know what needs to be installed on the
    client machine? I created a standard package
    and it does not work on the client.
    My connection string is as follows:
    Dim adoCn As New ADODB.Connection
    adoCn.Provider = "OraOLEDB.Oracle"
    adoCn.ConnectionString = "Data Source=PSYTEST" _
    & ";User ID=SYSTEM" _
    & ";Password=Ciao" _
    & ";PLSQLRSet=1;" _
    & ";Remote Server=xxx.xxx.xxx.xxx"
    adoCn.Open
    The xxx.xxx.xxx.xxx is the IP address of the
    server. The program works when I use it on
    the local machine, but it does not work when
    I create an installation package and I install
    it on a remote client machine.

  • XML in InDesign CS2 and Visual Studio 2005

    Hello!
    A year ago I made a plug in to InDesign CS1 with the purpose of importing an XML file and create a lay outed table of its contents. The reason I choose to make a plug in was because I didn't find InDesign very dynamic in its XML support.
    Now I'm being asked to do a similar but more complex solution for InDesign CS2, which I never used before, and I understand a lot has happened since CS1.
    How is the XML support in CS2 now a days?
    And by the way, is there any problems with Visual Studio 2005 and the InDesign SDK that you know of?
    Best Regards
    Kristoffer

    I'm sorry, I posted this thread in the wrong area. I will repost in the InDesign SDK area. My bad.
    Best Regards
    Kristoffer

  • BR*Tools 7.x, Oracle 10.x, instant client 10.x and Kernel 6.4

    All,
    Please keep in mind I am running Kernel 6.4
    When upgrading a 9.2 database to 10.2, the documentation indicates you should upgrade BR*Tools to 7 and the instant client to 10.
    Can I have the following configuration running and working:
    Oracle 10.2.0.4
    BR*Tools 7
    InstantClient 10.2
    Kernel 6.4
    I ask - b/c I don't believe the 10.2 instant client supports the 6.40 Kernel - but I could be wrong (and I hope that I am).
    Any help on this is appreciated.
    Thanks,
    Sean

    Hi Sean,
    Please go through the following sap notes also:
    948294 - AIX JFS2: mount options to use with Oracle 10g
    830576 - Parameter recommendations for Oracle 10g
    since we have upgraded from 9.2 to 10.2 and
    we have tested  successfully BRTOOLS 7.00 (39) on Dev server,
    also BRTOOLS 6.40 (40) is successfully running on Production server server
    -Gokul
    Edited by: Gokul Chitode on Dec 8, 2008 8:07 PM

  • Installa error for visual studio 2005 and Visual C++ 2005 on windows server 2003 SP@

    Not able to install visual studio 2005 I am getting error “The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch” and for visual C++ 2005 after clicking the setup file nothing is displayed on the desktop. please guide. All the above software I am installing on windows server 2003 service pack2
    Dear Gurus Please help me

    You might want to try : MS Visual Studio 2008 and Visual C++ 2008 Express instead as this version is supported as well.
    See:
    For R12: Note 1070674.1 - MS Visual Studio 2008 and Visual C++ 2008 Express for Oracle E-Business Suite Release 12 on Windows
    For 11i : Note 1095124.1 - Microsoft Visual Studio 2008 and Visual C++ 2008 Express for Oracle E-Business Suite Release 11i on Windows
    Regards,
    Ronald

  • Change database name - Crystal10 and Visual Studio 2005

    <p>Hi there,</p>
    <p>
    I have about 150 crystal reports in my development environment. I need to move them into the testing environment. Every environment has its own database and every database is names '[client name]_[environment]' so I get things like client1_dev, client1_test, client1_prod, etc. The reports are very, very unhappy when moving from dev to test. I have googled this a fair bit and have attempted the stuff on:
    </p>
    http://www.codeproject.com/KB/aspnet/crystalwithaspdotnet.aspx
    <br/>
    http://www.tek-tips.com/faqs.cfm?fid=5374
    <br/>
    <p>
    and a few others and have gotten no where. I spent a couple of days working on this and am now over budget and late. I need a fix and fast.
    </p>
    <p>
    I have two ideas I have been working on and both have failed out right.<br/>
    Idea 1 - during run time:<br/>
      - loop through everything thing in sight and set the database information on it<br/>
      - that one looks like:<br/>
    <br/>
    <pre>
    using CrystalDecisions.Shared;
    using CDCRE = CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Web;
    public abstract class ReportBase : Page
         ...snip....
        protected virtual void DoLoad(CrystalReportViewer ReportViewer)
            ReportDocument reportDocument = new ReportDocument();
            SetReportInfo(reportDocument);
            SetParameters(reportDocument);
            DumpParameters(reportDocument);
        protected virtual void SetReportInfo(ReportDocument reportDocument)<br/>
            db_Reports.Reports reportInfo = new ReportsClass();
            CriteriaID = reportInfo.InsertCriteria(CommonUtils.GetLanguagePrefix(), CurrentForm["criteria"].Trim() +
    CurrentForm["extracriteria"].Trim(), CSecuritySession.UserSessionInfo.iUserId, string.Empty, CurrentForm["param1"]);
            ADODB._Recordset rs = reportInfo.GetReportInfo(CommonUtils.GetLanguagePrefix(), ModuleName, ReportID, CSecuritySession.UserSessionInfo.iUserId);
            // report to load
            HttpContext.Current.Trace.Warn("Loading the report", rs.Fields["vReportName"].Value as string);
            reportDocument.Load(rs.Fields["vReportName"].Value as string);
            // connection info
            reportDocument.DataSourceConnections[0].SetConnection(rs.Fields["vSQLServer"].Value as string, rs.Fields["vDatabase"].Value as string, false);
            HttpContext.Current.Trace.Warn("Setting connection information",
                string.Format("Server Name:[{0}] Database Name:[{1}]", reportDocument.DataSourceConnections[0].ServerName, reportDocument.DataSourceConnections[0].DatabaseName));
            // logon info
            reportDocument.DataSourceConnections[0].SetLogon(rs.Fields["vUsername"].Value as string, rs.Fields["vPassword"].Value as string);
            HttpContext.Current.Trace.Warn("Setting Logon Information",
                string.Format("Username: [{0}] Password: [{1}]", reportDocument.DataSourceConnections[0].UserID, reportDocument.DataSourceConnections[0].Password));
            DumpConnInfo(reportDocument);
            DumpSubReportConnInfo(reportDocument);
            // reportname / page title
            ReportName = rs.Fields["vDescription"].Value as string;               
        private void DumpSubReportConnInfo(ReportDocument reportDocument)
            foreach (Section sec in reportDocument.ReportDefinition.Sections)
                foreach (ReportObject ro in sec.ReportObjects)
                    if (ro is SubreportObject)
                        SubreportObject sro = (ro as SubreportObject);
                        DumpConnInfo(sro.OpenSubreport(sro.SubreportName));
        protected virtual void DumpConnInfo(ReportDocument reportDocument)
            foreach(CDCRE.Table table in reportDocument.Database.Tables)
                Trace.Warn(string.Format("Connection info[{0}]", table.Name),
                    string.Format("database: {0} Server: {1} User ID: {2} Pwd: {3}",
                    table.LogOnInfo.ConnectionInfo.DatabaseName,
                    table.LogOnInfo.ConnectionInfo.ServerName,
                    table.LogOnInfo.ConnectionInfo.UserID,
                    table.LogOnInfo.ConnectionInfo.Password));
                foreach(NameValuePair2 nvp in table.LogOnInfo.ConnectionInfo.Attributes.Collection)
                    Trace.Warn("connection attributes", string.Format("{0} = {1}", nvp.Name, nvp.Value));
                    if (string.Compare(nvp.Name as string, "QE_LogonProperties", true) == 0)
                        DbConnectionAttributes dca = nvp.Value as DbConnectionAttributes;
                        Trace.Warn("connection attributes - QE_LogonProperties", "processing the 'QE_LogonProperties'. Is null [" + (null == dca).ToString() + "]" );                   
                        foreach (NameValuePair2 nvp1 in dca.Collection)
                            Trace.Warn("connection attributes - QE_LogonProperties", string.Format("{0} = {1}", nvp1.Name, nvp1.Value));
                Trace.Warn("----------------------");           
        protected virtual void DumpParameters(ReportDocument reportDocument)
            HttpContext.Current.Trace.Write("--------------------------");
            HttpContext.Current.Trace.Write(" Dumping Parameters ");
            HttpContext.Current.Trace.Write("--------------------------");
            for (int i = 0; i < reportDocument.ParameterFields.Count; i++)
                if (string.IsNullOrEmpty(reportDocument.ParameterFields<i>.ReportName))
                    HttpContext.Current.Trace.Write(string.Format("[{0}] {1}", i, reportDocument.ParameterFields<i>.Name), GetParamValue(reportDocument.ParameterFields<i>));
                else
                    HttpContext.Current.Trace.Warn(string.Format("SubReport Parameter [{0}] {1}", i, reportDocument.ParameterFields<i>.Name), GetParamValue(reportDocument.ParameterFields<i>));
            HttpContext.Current.Trace.Write("--------------------------");
    </pre>
    <br/>
      - this one always errors out with a can't find database type connection and spits out the old database message.<br/>
      - as you can see there is a stack of tracing in there. all of the trace messages make it look like it is hitting the right database. I have no clue why this isn't working.<br/>
    <br/>
    Idea 2 - fix up reports before moving to the other environments:<br/>
      - I figured I would write a little app that would crawl through the directories of reports and fix them up<br/>
      - I read a few examples of this online and none of them seem to work with Crystal 10. They work with some of our legacy Crystal 8 reports (I have been testing this all over the place) but not with 10.<br/>
      - the last function is the interesting one.<br/>
      - that one looks like:<br/><br/>
    <pre>
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Text;
    using System.IO;
    using System.Reflection;
    using System.Diagnostics;
    namespace crystal_10_switch
        public class Changer
            protected CRAXDDRT.Application app;
            protected object missing = Missing.Value;
            protected string currentFolder = string.Empty;
            protected string OdbcName;
            protected string DBName;
            protected ICollection Folders;
            public Changer(string OdbcName, string DBName, ICollection Folders)
                this.OdbcName = OdbcName;
                this.DBName = DBName;
                this.Folders = Folders;
                app = new CRAXDDRT.Application();
                string junk = Console.ReadLine();
            public virtual void Switch()
                foreach (string dir in Folders)
                    SwitchDir(dir);
            protected virtual void SwitchDir(string dir)
                DirectoryInfo di = new DirectoryInfo(dir);
                FileInfo[] files = di.GetFiles("*.rpt", SearchOption.AllDirectories);
                currentFolder = di.FullName;
                foreach (FileInfo file in files)
                    Trace.WriteLine("Processing the report: " + file.FullName);
                    Trace.Indent();               
                    SwitchFile(file);
                    Trace.Unindent();
            protected virtual void SwitchFile(FileInfo file)
                CRAXDDRT.Report rpt = app.OpenReport(file.FullName, missing);
                SwitchTable(rpt);
                SwitchSubreports(rpt);
                SaveReport(rpt, file);
            protected virtual void SwitchSubreports(CRAXDDRT.Report rpt)
                Trace.Indent();
                foreach (CRAXDDRT.Section section in rpt.Sections)
                    foreach (CRAXDDRT.IReportObject robj in section.ReportObjects)
                        if (robj is CRAXDDRT.ISubreportObject)
                            CRAXDDRT.ISubreportObject sub = (robj as CRAXDDRT.ISubreportObject);
                            Trace.WriteLine("Processing sub report: " + sub.Name);                       
                            SwitchTable(sub.OpenSubreport());                       
                Trace.Unindent();
            protected virtual void SwitchTable(CRAXDDRT.Report rpt)
                Trace.Indent();
                foreach (CRAXDDRT.IDatabaseTable table in rpt.Database.Tables)
                    Trace.WriteLine(" Processing table: " + table.Name);
                    // this one line should do it
                    (table.ConnectionProperties["Database"] as CRAXDDRT.IConnectionProperty).Value = DBName;
                    // but it didn't so try this
                    (table.ConnectionProperties["UseDSNProperties"] as CRAXDDRT.IConnectionProperty).Value = "1";
                    // read that this 'might' work
                    table.SetLogOnInfo(OdbcName, DBName, missing, missing);
                    // but it didn't so I tried this with the user anme and password set
                    table.SetLogOnInfo(OdbcName, DBName, "XXXXX", "XXXXX");
                    // read that this is requiried, but it does nothing
                    table.Name = table.Name;
                    // this causes issues - the map fields thing pops up which is way not cool
                    //table.Location = table.Name;              
                Trace.Unindent();
        }//class
    }//namespace
    </pre>
    <br/>
    At this point I really don't care which one will work the best, I am just desperate for a working solution. Any help, any at all would be greatly appreciated.<br/>
    <br/>
    Thanks<br/>
    <br/>
    -Cam<br/><br/>

    This is a typical requirement of most application and is relatively trivial to implement. There are a lot of samples and documentation on our support site (links below). Also, search these forums for code snippets that will help you. BTW., do not use the craxDDrt.dll as you are not licensed to use it.
    To look for downloads:
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm
    Articles:
    https://www.sdn.sap.com/irj/sdn/businessobjects-articles
    Notes:
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
    Samples:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    Dev. Library and API reference:
    http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm
    http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_apiRef_12_en.chm
    My recommendations:
    https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23&overridelayout=true
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/208edbbf-671e-2b10-d7b5-9b57a832e427
    https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/702ab443-6a64-2b10-3683-88eb1c3744bc&overridelayout=true
    Ludek
    Edited by: Ludek Uher on Jul 21, 2009 8:38 AM

  • RDB Odbc drivers and Visual Express 2005 !!!

    hi,
    i'm having troubles with MS Web Developper Express 2005 and RDB database ODBC driver 3102.
    When i try to declare a link to a dsn previously delared in ODBC manager (win xp sp2), i click the "test connection" then it's succesfull, but when i want to browse thru the tables within the rdb db, i receive the error : [HYC00][Oracle][ODBC] Optional feature not implemented...
    I tried to use the same dsn with MS Access and it works correctly.
    Any idea ?
    Thanks

    hi,
    i'm having troubles with MS Web Developper Express 2005 and RDB database ODBC driver 3102.
    When i try to declare a link to a dsn previously delared in ODBC manager (win xp sp2), i click the "test connection" then it's succesfull, but when i want to browse thru the tables within the rdb db, i receive the error : [HYC00][Oracle][ODBC] Optional feature not implemented...
    I tried to use the same dsn with MS Access and it works correctly.
    Any idea ?
    Thanks

  • Instant client and jdbc bug 6362104

    I am having a problem with the latest version of the instant client for Linux and tomcat. The error message I get is: "Error while registering Oracle JDBC Diagnosability MBean" which has been determined to be bug 6362104. It looks like there is a patch for the jdbc but I was wondering if there will be a patch for the instant client to correct this?
    I ran the check java -jar ojdbc6.jar and it is definitely the unpatched version as the plus sign does not show up on the word Production. Is it as simple as getting the patched jar file and copying it in?

    Hi:
    I had already downloaded and installed the base package, the SQLPlus package and the ODBC packages from Oracle. I unzipped all 3 into a common directory, and ran the .exe that installs the Oracle ODBC dlls etc so that the Windows ODBC Data Source Administrator knows about them. ( Before that, the Oracle ODBC choice wasn't in the admin pulldown). My problem is in trying to now create an ODBC data source using those Oracle drivers. The Windows admin tool still seems confused in that I can't select the ORCL service I know to be out there.
    What am I trying to achieve?: I have a perfectly fine Oracle 10gR2 database running and I have connected to it with some Java based web services and isqlplus etc. to do what I need to do. Other users are creating a C++ application on Windows XP that needs a database, and would like to use my database via ODBC connections.
    What application?: A custom C++ application that merely wants to store some data in very simple tables in the 10g database.
    Why ODBC?: Well, other than the PITA driver installation, it's a fairly good way for a C++ program to connect to Oracle. I'd rather not have to have them worry about OCI or Pro*C or whatever it is.
    Why have I chosen Instant Client?: I was under the impression (as I think I stated in the initial message?) that it was the way to give access to these C++ coders to the database with the smallest Oracle footprint on their machines. I know I could load the entire Oracle Client and I may have too, but Instant Client's raison d'etre is so that one does not HAVE to load a big fat Oracle client, is it not?
    Thanks

  • Oracle 10.2.0.4 Instant Client x86 and Win 32 is available

    The 10.2.0.4 Instant Client for x86 and Win 32 is now available from http://www.oracle.com/technology/tech/oci/instantclient/index.html

    The 10.2.0.4 Instant Client for x86 and Win 32 is now available from http://www.oracle.com/technology/tech/oci/instantclient/index.html

  • Linux ODBC Instant Client and Web access?

    Hi,
    I have downloaded instant client 10.2 and the corresponding ODBC RPM, installed them on a CentOS 4.7 (32 bits) Linux machine. I have also installed UnixODBC on this machine. After a lot of experiments and searches on Internet, I have finally obtained a working state. I.e. using DataManager to test the connection, I access to the Oracle Server that is on another computer.
    Now, I am in the second step of my tests. I have to access to the database through Internet. The scheme is the following:
    1- a web client is connected, to my web server (server is HTTPD),
    2- the web server has to access to the Oracle server by using the ODBC Instant Client.
    But this does not work yet. When I try this configuration, I see the error "*can't find the lib libsqora.so.10.1. libcintch.so.10.1 cannot open shared object library*". To solve this problem, I have to tried to define (and export) LD_LIBRARY_PATH in the /etc/sysconfg/httpd file. But this does not work.
    Does anyone has a solution?
    Thanks in advance.

    here, the trace from the log file:
    [ODBC][8089][SQLConnect.c][3549]
              Entry:
                   Connection = 0x81db4a0
                   Server Name = [GTModus][length = 7 (SQL_NTS)]
                   User Name = [GTModus][length = 7 (SQL_NTS)]
                   Authentication = [*******][length = 7 (SQL_NTS)]
              UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
    [ODBC][8089][SQLConnect.c][1012]Can't open lib '/usr/lib/oracle/10.2.0.4/client/lib/libsqora.so.10.1' : libclntsh.so.10.1: cannot open shared object file: No such file or directory
    Concerning exporting LD_LIBRARY_PATH I did as explained in one of the few posts found on internet. I have also tested by modifying the httpd.conf file by adding SetEnv directives. But whatever the changes I did, it seems that, through internet, the environment is lost.

  • Instant Client to connect to Oracle 8i

    Does anyone know where I can download a version of Instant Client that is compatible with Oracle Server 8i (8.1.7.0). The only download I can find is for 11.1 and that's not compatible.
    All I'm trying to do is setup some OLE DB data sources in SSIS to pull Oracle 8i data into sql server 2005, but getting a little bit more than I bargined for...
    Thanks

    Here
    http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
    you can find Instant Client 10.1 and 10.2 for Windows.
    These can be used to access Oracle 8.1.7.4, but they do not include an OLE DB provider.
    If you want to use OLE DB to access an Oracle 8 server, you'll have to install the regular client (10.2 optimally).
    Yours,
    Laurenz Albe

  • Problem using Instant Client 10g with PHP4.3.10-16 on Debian Sarge

    Hello,
    My current email is [email protected]
    I am trying to use PHP on Debian box using Oracle 10gR2 on a RH 4 server. Everything works fine individually, but I cannot get PHP4 to use InstantClient to connect to the Oracle Server. This is what I've done:
    Oracle 10gR2 works fine on the RH 4 server. Listener is running and all required OS security is in place and works (TCP_wrappers, etc.).
    Client machine runs Debian 3.1 (Sarge). It works fine and SSH connectivity to RH4 server works.
    Instant Client 10gR2 installed on Debian client and works fine. Tested SQL*Plus connection to the RH server. I installed Instant Client from the zip file.
    I did have to add libclntsh.so to /etc/ld.so.conf and run ldconfig to get Debian to use it, though.
    Apache2.0.54-5 on Debian client works fine. Web pages on it can be opened in browsers from other machines.
    Installed PHP4.3.10-16 on Debian client using following:
    ./configure --with-oci8-instant-client=<dir of my choice>
    --enable-sigchild
    I first checked ./configure help and the option with-oci8-instant-client was there.
    Configure went well. Log showed checking for Instant Client files.
    Ran make. Saw numerous Instant Client message as words scrolled.
    Ran make install. Successful.
    Restarted Apache2 with following env variables:
    LD_LIBRARY_PATH=<my Instant Client directory)
    TNS_ADMIN=<same directory where I put my sqlnet.ora and tnsnames.ora files).
    SQLPATH=<same directory>
    I know this is correct because Instant Client SQL*Plus can connect.
    Browsers on other machines can view simple php scripts run from the Debian box.
    BUT, phpinfo does NOT show an OCI8 section.
    phpinfo does show the correct extension directory, though.
    Somehow, my PHP4 configure and make is not using the --with-oci8-instant-client option.
    I checked $PHP4HOME/ext/oci8/config.m4 file and the verbiage IS in there to use the --with-oci8-instant-client option, either with the default location or the extension_dir location.
    I tried using the new ZendCore product, even though it is not certified for Debian. It installed okay but I could not get PHP5 to work. I uninstalled it successfully and redid all of the above.
    So, any ideas as to what else I can do here? Other than not use Debian (which is probably the wisest thing to do). And I suppose I could install a thick Oracle client, assuming that Debian would take it. But I prefer the Instant Client.
    I tried the PHP ./configure syntax I've seen several places on this forum.
    ./configure --with-oci8=instantclient,<directory>
    This syntax may work on Red Hat machines but it throws a syntax error on Debian and aborts the configure.
    Thanks for any help.

    Thanks, but that did not work. Configure aborts because it cannot find the required OCI8 libraries. The --with-oci8 option is for the Oracle "thick" client.  I have only the Instant Client...and am not interested in loading the older client.
    I may have my own solution next week, though. I will be loading RH4 on a new server and will then install ZendCore and forget all about using Oracle with Debian.
    Update on trying ZendCore on Debian Sarge:
    I tried installing it again yesterday. The install seemed go to well, and said it was successful.
    It did NOT load PHP5, however. Nor did it load the Instant Client. My previously installed PHP4 and Instant Client remained in my original directories.

  • Instant client with ODBC driver

    Hi, I have problem with the instant client version 10.2 with ODBC driver. I have the instant client base package and ODBC package installed in my computer. the Oracle ODBC driver did appear in the ODBC driver list, when I test the connection with driver, it gives error "Unable to connect, SQLState=08004 [ORACLE] [ODBC] ORA-12154 TNS could not resolve the connect identifier specified" I have another computer which has Oracle 8i client installed and works fine. I copied sqlnet.ora and tnsnames.ora to the instantclient installation folder, same error appears. here is the contents of sqlnet.ora:
    # SQLNET.ORA Network Configuration File: c:\oracle8i\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES)
    here is the contents of tnsname.ora:
    # TNSNAMES.ORA Network Configuration File: c:\oracle8i\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    barkeep =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521))
    (CONNECT_DATA =
    (SID = barkeep)
    I test the host connection with telnet, it works.
    can anybody out there walk me through how to set up instant client?
    thanks.

    Thanks Sanjay - I had this problem and your suggestion fixed it: setting the TNS_ADMIN did the trick.
    Note: This was on a development PC which already had the Oracle Client drivers installed (so I already had a different TNS_NAMES.ORA in that installation).
    It is worth noting that on my target deployment machine which DOESN'T have the Oracle Client drivers (just the InstantClient + Instant-ODBC) I didn't need to set TNS_ADMIN
    I'm using the 11g InstantClient (11.1.0.6.0 32 bit)
    Hope this helps someone, and thanks again Sanjay for posting :o)

Maybe you are looking for