I cannot understand the Oracle documentation. :-(
Does anybody have any pointers to an example how to fetch multiple rows of simple data from Oracle via OCI?
I currently use OCIDefineByPos to define single variables (I only need to do this for simple integers -- SQLT_INT/4-byte ints) and then fetch a single row at a time with OCIStmtEx...
On the latest Ubuntu, I have a functioning PHP 5.2.4 installation. I want to use a remote Oracle server from PHP using OCI. I've downloaded the "Instant Client Package - Basic Lite" from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html. I've unzipped the package containing the OCI libraries to a di...
Can I find out when the last INSERT, UPDATE or DELETE statement was performed on a table in an Oracle database and if so, how?
A little background: The Oracle version is 10g. I have a batch application that runs regularly, reads data from a single Oracle table and writes it into a file. I would like to skip this if the data hasn't chang...
I'm optimising a bespoke database layer in a messaging system to increase performance.
I'm using the ORACLE OCI OCIDescribeAny function to get meta-data about the columns in a database table.
How do I check the meta-data using an OCI call to see if a column has a default value set (in its schema definition).
...
Does anyone know the OCI connection string used for the dbname parameter in the function OCILogon() for the oracle 10g C API ?
I know you can specify the tnsnames.ora entry for the service, but does it have the ability to take something like: oci:connect:myserver.com:1521/myservicename ?
...
I have an ORACLE update statement that I call using the OCIStmtExecute function call.
Using an OCI function call I would like to know how many rows have been updated by the action, e.g. zero, one or more.
How do I do this ?
...
I can call an ORACLE stored procedure through OCI in a C program by constructing the SQL command for the command, here's a brief snippet from my code:
/* build sql statement calling stored procedure */
strcpy ( sql_stmt, "call get_tab_info(:x)" );
rc = OCIStmtPrepare(p_sql, p_err, sql_stmt,
(ub4) strlen (sql_...
I have three machines set up as follows:
CompA: Running Oracle server 10.2.0.3
CompB: Running Oracle server 10.2.0.4 and my client code
CompC: Running client code only
On the client code on both CompB and CompC, connecting to either Oracle DB works flawlessly using the Thin driver.
I am trying to connect to each Oracle DB from the c...
Hello,
I'm exploring a piece of software making use of Oracle API and as far as I can see often object methods expect as an argument a "OCCI context" or a "OCCI environment" values.
An example is a constructor of an Account object:
Account( oracle::occi::Environment* env );
later overloaded with
Account( void* oraCtx );
I can un...
Is there any way to set a timeout on Oracle OCI calls (OCIStmtExecute for example) ?
Thanks
...
Problem Statement:-
I am inserting a record into Oracle if that record is already present(duplicate==>primary key is present) in database
i want to update it with new one.
Currently to solve this while inserting the record if i get OCI_ERROR then i call
OCIErrorGet( (dvoid *)errhp, (ub4) 1, (text *) NULL, &errcode,errbuf, (ub4) size...
I've been searching for a good example of how to configure a Oracle OCI pool connection in tomcat's server.xml (defining a JNDI resource) and subsequently how to use it.
Here's what I have now in conf\server.xml:
<Context docBase="ips" path="/ips" reloadable="true">
<Resource name="jdbc/IPS_DB"
auth="Container"
...
In our server/client-setup we're experiencing some weird behaviour. The client is a C/C++-application which uses OCI to connect to an Oracle server (using the OTL library).
Every now and then the DB server dies in a way (yes this is the core issue, but from application-side we're unable to solve it but have to deal with it anyway), that...
This occurs when fetching values which have a max length of 50, to a buffer which could only hold 30 chars.
I've already looked up the error and found a possible solution, which is to expand the size of the buffer which the value is bound to.
The problem is, this occurs only in some of our systems and not in others. Does the Oracle ver...
Hi,
Can anybody help me in a OCI program. I need to insert multiple row in a table (bulk insertion i.e. multiple rows at a time) with one column with clob data type.
I am not getting any appropriate example for this.
...
Is a cursor created with oopen (from the Oracle 7.x OCI api) forward-only and read-only?
Thanks,
Eric
...
My goal is to execute a query (SELECT), fetch results and output them as text. Query is given as a parameter and can be e.g. select * from t.
I use OCIStmtPrepare and OCIStmtExecute, then I can describe columns of the query by OCIParamGet and series of OCIAttrGet. Suppose I get OCI_ATTR_DATA_TYPE = 12 (DATE) for one of the columns. Then...
I'm in charge of a Perl application that uses DBD::Oracle compiled against a 9.2.0.8 OCI client. This is on a sun4u box, albeit with 32-bit binaries. DBD::Oracle is linked against 32-bit OCI libs. We're currently running against a 9i server.
Our DBA team is planning to upgrade the server to 10g, namely 10.2.0.4. I'm faced with two optio...
Client compiled with OCI: 10.2.0.4.0
Server: Oracle9i Enterprise Edition Release 9.2.0.4.0
The problematic query is:
SELECT CODIGO FROM LOG WHERE TEL = :telnumber AND DATE_PROC = '05-JUL-08'
Table description:
SQL>describe LOG;
TEL NOT NULL VARCHAR2(15)
CODIGO NOT NULL VARCHAR2(20)
DATE_PROC NOT NULL DATE
As simple as it might loo...
Is there any way to create trigger using OCI API?
I need to perform the following actions programmatically:
CREATE OR REPLACE TRIGGER tbl_trigger BEFORE INSERT ON tbl FOR EACH ROW
WHEN (new.id IS NULL OR new.id = 0)
BEGIN
SELECT tbl_sq.nextval INTO :new.id FROM dual;
END;
/
...