OCI vs. OCCI

What is the differance ???
What is better to use for a newbie ???

OCI is the programmatic interface for C applications. It can be used by C++ applications too, as C syntax is supported in C++. From 9i, Oracle has OCCI as the programmatic interface exclusively for C++ applications. It is a easy-to-use object-oriented interface.
Before you choose OCI or OCCI, you need to decide which language you are going to develop your application in. Look at the user guides for both, to understand the interfaces.

Similar Messages

  • What is the diffrence between OCI and OCCI?

    What is the diffrence between OCI and OCCI?

    Will Lee wrote:
    What is the diffrence between OCI and OCCI?Beside the other answers, there are a few additional points to consider:
    1) OCI is the "gold" standard API. New stuff is always available in OCI first, and only later trickles down to other APIs, like OCCI.
    2) OCI is a low-level API, harder to get started with, than OCCI. APIs in OCI are often "untyped", taking a void*, which opens the door for errors.
    3) In OCCI you set values, while in OCI you bind them. So OCCI takes a copy of your values, while OCI takes an address at which to later read the value. This opens the door to subtle bugs where you pass the address of a temporary in OCI, which later crashes in some mysterious ways. So OCCI is way safer in this regard.
    4) OCI is C code, which is very portable. Because OCCI is C++ code, and on Windows you can't easily mix and match libraries compiled with different versions of Visual C++ (VC6, 7, 8, 9), you have to wait for Oracle to make a new build with the latest MS compiler. Just see the number of questions on this OCI forum and the OCCI one.
    5) OCI is used internally by Oracle to write many of their own tools, it's the lingua franca between the Core DB group and the other groups. Since they use it themselves, it's much more stable that OCCI, which is mostly only used by outside customers.
    6) The way SQL objects are dealt with in OCI and OCCI is fundamentally different, to the point where you can't mix and match OCCI and OCI object calls.
    #1 above is one reason we had to abandon using OCCI, lacked support for the new in 11g BinaryXML, but that's just one example.
    IMHO OCI is the way to go, if you want the latest and greatest. Yes, it's more difficult to code against, so the learning curve is steeper, but once you've reached critical mass it's just fine. If you write code in C++ as opposed to C, you can easily make it a lot safer with a thin C++ layer on top which, unlike OCCI, still allows you access any OCI raw handle to do stuff the wrappers don't expose. My $0.02 ;-) --DD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Create a new oracle database from OCI or OCCI client

    Hi,
    How can we create a new oracle database from OCI or OCCI client?
    i am using the oracle 11gR2
    Thanks in Advance,
    Sreekanth Polaka

    Though I have not tried creating a database, try if its doable.
    You can use OCI to perform SYSDBA operations.
    So connect as OCI_SYSDBA and try executing the entire create database command.

  • Which is better ,oci or occi ?

    who can tell which way is better for developing ,oci or occi ?
    Regards.

    But you can only use OCCI with a C++ compiler, NOT a plain C compiler, right?
    However, with OCI you can use either c or c++.

  • Migrating from OCI to OCCI

    Hi everyone,
    I'm currently tasked with finding a way to migrate our code slowly from OCI to OCCI. The idea is the following:
    We have an application that creates an OCI environment and context, etc. and we'd like to reuse that existing connection in a surround C++ program. So essentially, create an OCCI environment from an OCI environment.
    So, I've found a documented way to get an OCI environment from an OCCI environment, however I couldn't find anything about the other way around.
    Is there maybe some undocumented constructor or something along those lines, that would allow to go this route? If there is an expert, who could give me a clear 'NO' to this, it would also be very helpful.
    Thanks for any advice!
    Peter

    Since OCCI is built as a interface over the OCI you can get hold of an OCIEnv from OCCI
    The other way is not possible as OCI does not know anything about OCCI.

  • Comparison: OCI or OCCI.

    Hi,
    I'll start a new project that requires low-level Oracle access. I want to use OCI or OCCI.
    I've searched and read some docs. But, I still have some questions on using OCI or OCCI.
    - I'm familiar with object-orientied programming. So, I consider OCCI. But, I'm not sure if I can do anything that I can do in OCI. does OCCI provide anything provided by OCI ?
    - Which one is faster (if other conditions are accepted as constant) ?
    - Which one is more popular in development ?
    - is there a comparison sheet between them ?
    - is there a URL that referres to OCI/OCCI papers (other than OCI/OCCI home pages at otn) ?
    thanks in advance...

    But you can only use OCCI with a C++ compiler, NOT a plain C compiler, right?
    However, with OCI you can use either c or c++.

  • Verbose mode for OCI or OCCI

    Does anyone now how to turn on any kind of verbose (i.e. logging) facility on in OCCI?
    Basically, i'll like to see logging information on my screen when i'm running my client program.
    I thought it would be as simple as me setting a debug variable and bam! i see it. but i've had no luck finding a way to do this.
    Any help would be appreciated.
    TIA,
    mike.

    But you can only use OCCI with a C++ compiler, NOT a plain C compiler, right?
    However, with OCI you can use either c or c++.

  • ODBC, OCI, OCCI

    Hi,
    Could anyone tell me whether I can access a Oracle Spatial instance through Oracle 9i AS Wireless using ODBC, OCI or OCCI. I want to interrogate the spatial database from a Compaq iPAQ running the familiar distribution of embedded Linux.
    Cheers,
    Sean

    iAS is an application server, which pretty much indicates that you'll be writing Java. ODBC, OCI, and OCCI are C or C++ API's. It's probably possible to set up a system that makes JNI calls in iAS to C or C++ libraries, but that hardly seems like the ideal architecture.
    If you want to use a Java application, JDBC is the Java API for database access. JDBC will certainly allow you to work with the Oracle Spatial datatypes.
    You can also use things like mod_plsql with iAS to do the vast majority of middle tier work in PL/SQL.
    If you want to use OCI or OCCI, you could certainly write a middle tier layer there, throw some ASP pages on top, and expose that through IIS (since you mentioned ODBC as an option, I'm assuming you're a Windows shop).
    The ODBC does not provide a particularly useful way to work with Oracle-specific data types like those in interMedia.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com

  • OCI OCCI performance

    Hi everyone,
    is there a difference between these two implementation?
    I 've got to develop a C++ program with more than 3 billion database entries, so every tuning would be helpful I guess :-)
    The biggest table would have 1,5 billion entries.
    Is OCCI only a warrper or has it more features? Is there a book or documention about the performance for C++ application with oracle.
    All I 've found about performance tuning is tuning the database itself.
    thx
    marc

    iAS is an application server, which pretty much indicates that you'll be writing Java. ODBC, OCI, and OCCI are C or C++ API's. It's probably possible to set up a system that makes JNI calls in iAS to C or C++ libraries, but that hardly seems like the ideal architecture.
    If you want to use a Java application, JDBC is the Java API for database access. JDBC will certainly allow you to work with the Oracle Spatial datatypes.
    You can also use things like mod_plsql with iAS to do the vast majority of middle tier work in PL/SQL.
    If you want to use OCI or OCCI, you could certainly write a middle tier layer there, throw some ASP pages on top, and expose that through IIS (since you mentioned ODBC as an option, I'm assuming you're a Windows shop).
    The ODBC does not provide a particularly useful way to work with Oracle-specific data types like those in interMedia.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com

  • Calling SQL*Loader from OCCI

    Hi All,
    I need to access SQL*Loader from C++.
    I know there is an interface for OCI to access SQL*Loader.
    I also know there is a gnu project of a c++ wrapper to the OCI-SQL*Loader interface (odpd).
    According to the OCCI documentation it is just a C++ facade of OCI (with some goodies like thread managing , etc.).
    I want to know the following:
    1. How can I operate OCI from OCCI?
    2. Are there are source samples of operating OCI from OCCI or even better operating OCI SQL*Loader interface from OCCI?
    3. Are there are any known (/unknown :-) ) problems with either OCCI access to OCI or OCI interface itself to the SQL*Loader?
    Thanks,
    Arik

    Hi,
    If you have a OCCI application and you want to interoperate with OCI, you can retrieve the underlying OCI handles from OCCI objects and write OCI code.
    e.g :-
    //with Environment env, Connection conn OCCI objects
    OCIEnv *ocienv = env->getOCIEnv();
    OCISvcCtx *ocisvc = conn->getOCISvcCtx();
    //use OCI calls
    OCIError *errhp;
    OCIHandleAlloc (ocienv, &errhp, OCI_HTYPE_ERROR,...);
    OCIHandleAlloc (ocienv, &dpctx, OCI_HTYPE_DIRPATH_CTX,..);
    err = OCIDirPathLoadStream(...);
    OCCI does not have a direct path API at present.
    Thanks.

  • Occi is too bad,so can't use in projiect!!

    Occi cann't get row number;
    Occi cann't move frond and move first,but oci can;
    Occi cann't get rowset value by column name and also can't get column name by column index.
    It's necessary to exist?

    The most valuble thing I think is that it's object oriented,more intuitionistic,are you working on Red Hat Linux AS 3 eith gcc 3.2.3 ?

  • OCCI and non-blocking

    I'd like to use the OCCI interface in a non-blocking mode. Does anyone have any experience with this? Looks like I need to use a combo of OCI and OCCI calls to set the OCI_HTYPE_SERVER handle with the OCI_ATTR_NONBLOCKING MODE. However, my stmt->executeQuery() method seems to be throwing an exceptions, which I would have though would have been the OCI_STILL_EXECUTING error, but it's not. The exeception is an "ORA-32103 error from OCI call". If I continue to do another stmt->executeQuery(), I eventually get an access exception.
    Anyone have any code snippets using OCCI in non-blocking mode?

    I use threads. ACE/TAO to be precise.
    I have singleton class that manages the Oracle environment and connection as well as being a statement
    factory.
    Just have a thread perform your stmt->executeXXX() method and you will not need to worry about non-blocking.
    That's how I do it and it works well.

  • Occi on non standard platform

    hi
    I'm currently working on a datalogging system, using a module that is able to take data from the serial port, either directly or through a program, pipe the data to the ethernet port.
    What I would like to do is to write a small program that fetches the data from the serial port and postes the data directly into our oracle9 database via the ethernet. Just the basic INSERT or UPDATE sql queries.
    The platform is intel compatible running DOS, and it is possible to make the programs using gcc on a standard i386. I dont succeed in making the programs with static linked libraries.
    With the OCI program, I have included ociw32.lib, oramts.lib, oraocci9.lib and oci.lib but still I get undefined reference to `OCIHandleAlloc' (and to a lot of other functions starting with 'OCI')
    With OCCI I have included oraocci9.lib and I get undefined reference to `oracle::occi::MetaData::~MetaData(void)' (and to a lot of other functions starting with 'oracle::occi')
    Does anyone have any experience with gcc and the oracle libraries? Is it a problem that I use the msvc libraries?
    Any pointers would be greatly appriciated.

    Hi,
    Yes this is possible.
    Just modify the port number listed in your dispatcher.cnf configuration file from 25 to something more appropriate.
    Then run ./imsimta cnbuild; ./imsimta restart for the change to take effect.
    To test, just run
    telnet <hostname> <new port>
    Regards,
    Shane.

  • Oracle Client Installation 11.2.0.2 with OCI libraries

    Hi All,
    I need to install Oracle Client 11.2.0.2 with OCI libraries. How to install the OCI libraries, where can I find the install files for OCI.
    Thank you

    Hi;
    Please see:
    Want  to download OCI libraries Oracle 9.2
    Also see:
    Master Note for Precompilers, OCI and OCCI [ID 1129588.1]
    Regard
    Helios

  • RAC OCCI connectString

    Dear all,
    Recently i have set up a 2-node RAC environment, and i will put the my application on the local host. The rac database global name: agdb.world, the 2 instances respectively are agdb1 and agdb2. i also use the DBCA to create a service name ag_db.
    tnsnames.ora:
    ag_db=
    (description =
    (address=(protocol=tcp)(host=myip1)(port=1521))
    (address=(protocol=tcp)(host=myip2)(port=1521))
    (load_balance=yes)
    (connect_data=
    (server = dedicated)
    (service_name = agdb.world)
    In my occi application, i use the connectString //localhost:1521/ag_db to connect to my RAC database, and i got the following error:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor.
    I also use the "tnsping ag_db", it is OK, even use the "sqlplus user/pass@ag_db", it is OK too. But when i input the "sqlplus user/pass@//localhost:1521/ag_db", i got the ORA-12514 too.
    Can anyone give me a hint?
    thanks

    Having looked into this matter myself there is a concern
    about fail over with OCI or OCCI. Isn't there suppose to be
    something in the tnsnames that specifies TAF failover. In
    other words if one node goes down there has to be something
    in the tnsnames that tells the OCCI app which node to route
    to. I just looked into this and there were some talk about OCCI
    & OCI and failover, which I would like some clarification on as
    well.

Maybe you are looking for

  • Dump while executing the query on MProvider on Stock and Billing

    Hi, I am getting this dump while executing a Query on Multiprovider. Here Multiprovider is on Billing cube(z-cube) and 0IC_C03 cubes. In the report , I have KF of both cubes. I am sure I never faced this type of problem in version 3.5. It seems we ar

  • Can't Display any item from PersonDetailsVO in SummaryRegion

    Using SSHR, OAF personalization I am trying to display some more fields in the summary region like 'DateOfBirth' & 'FullName' from 'PersonDetailsVO' I create the item with the below steps: 1) Click on the "Personalize "Summary Region"" link 2) Create

  • Remove entries from the "Open with" menu?

    I'm using openbox as a window manager and while trying to open some specific zip files I did the right click, open with, and then chose a few different programs. The problem is that now everytime I right click a file of the same extention the menu in

  • AddOn Manager ....Installed Addons

    Hello, I have problem after installing Addon. After installing AddOn, it shows the status as "Failed" in Installed Addons under Add-on Manager..... But my report runs successfully. I want to change the status from "Failed" to "Connected". To get the

  • Sandy Bridge processors in new iMacs issues.

    Hello Does anyone know if any of the faulty Sandy Bridge processors which were produced at the start of the year made it into this iMac refresh? Or did Apple wait until the updated versions were produced before using them in their macs? By updated ve