I am running a job that is using Pro C code. I am running it on an Oracle 10g database with an Oracle 9 client on a UNIX platform. The code compiled fine. The job runs fine sometimes but other times it fails with a Segmentation Fault error.
I have the same job running in an Oracle 8i environment with no problems.
I got another error after applying 2012Q2CPU patch.We have five databases sharing the same home in one server. The database version is 11.2.0.2. After applying the latest CPU patch, I got an error while brought up the last database stating that segmentation fault(core dumped).
My OS is Linux and I installed Oracle 10.2. Everything is fine.I can use sqlplus, exp, imp etc with no problem.Now I have created another linux user test in /home/test. I unzipped basic-10.2xxxxxx.zip (/home/test/instantclient_10_2) and exported LD_LIBRARY_PATH.I guess I have installed instant client in this way.
My testOra.cpp:
#include <occi.h> int main() { return 0; }
This test.cpp would not compile. It cannot find occi.
I am using the following piece of code to close the connection to the oracle database, I am using the context created in the previous step and passing it to the below code(connection.context)to release the connection.
if (connection.context == 0 || connection.ca == 0) return true; // Multithreading: get the communication area of the context struct sqlca & sqlca = *(connection.ca); EXEC SQL BEGIN DECLARE SECTION;
[code].....
When the above code is executed there is no exception thrown but the connection is not getting close. I am using the V$SESSION system views to monitor the connection created.
I there anything I am missing in my code for the connection closing to fail.
I looked for a Precompiler for Fortran, could not find one. Does a precompiler for Fortran exist for Oracle 10i ? If no, would the precompiler for prior versions of Oracle work with Version 10i ?
I'm a beginner in the PRO*C and I have this issue/I have to maintain a multithreaded C++ PRO*C application and has the following structure
1) Application runs waiting for requirements 2) When detects a requirement it creates a Thread to work 3) The thread connects to Oracle with a EXEC SQL CONNECT :uid IDENTIFIED BY :pwd; instruction 4) Calls some anonymous calls to execute a stored procedure
EXEC SQL EXECUTE BEGIN commit; :Status:=stored_procedure(:param1, :param2); commit; END; END-EXEC;
5) If anything went wrong then issues a EXEC SQL ROLLBACK WORK RELEASE; then reconnects and the thread die 6) If everything was OK then the thread dies, but never called a EXEC SQL COMMIT WORK RELEASE; to disconnect from Oracle
I don't know why never the application disconnects from Oracle, maybe is for performance. Sometimes the application crashes and I believe that maybe the error is for never freeing the connections, the PROC compile line is this
Which is the way to implement the connections?, connect and disconnect when done? or just keep the connection alive? Which way has better performance, connect and disconnect or just keep the opened connection?
We are considering upgrading our current system from Oracle 9i to 11g. The current operating system is SUSE Enterprise 9.
The 11g requirements say an update to SUSE Enterprise 10 is required to support the Oracle 11g installation.
Will I need to recompile my existing application programs which use pro C precompiler to create code that accesses the Oracle database when I upgrade the operating system and database?
I was asked to find the C struct that Oracle uses to create a logFile, or at least the C struct of a reg in that file,I've read a lot of material from many "know-at-all" who don't know anything.
I want write a program using oci to login into oracle database.Advance security option for the oracle server is set to kerberos authentication. Is it possible to login to the oracle database through olog() function.
Initial ticket is required in kerberos authentication. So is it also needed durinfg the login from my programme.
I am trying to compile a .pc file. I am working with Oracle 11gR1 and windows env. I am able to create .c file from .pc file. I am able to produce .o file from .obj file. But i am not able to link it and produce .exe. My installation does not contain / precomp /demo folder.
connecting to an oracle db with the instant client 11.01.06. I can connect to the db via other tools like sqldbx or SqlTools 1.5 which are also using oci. So now I tried it with c++ using Visual Studio 2005 SP1.
where tnsservice-name is the name I specified in the tnsnams.ora, and which I used with the other tools working fine -> same error.My username is only 4 long, so I thought it might have something to do with the string. So I tried:
now it returned the error "TNS:connect descriptor too long". Can't have anything to do with the .ora file, since it worked fine for the other tools. Plus it didn't matter if I renamed the .ora file or removed it from the TNS_ADMIN directory..So I searched a little more for a solution and so an example, where the the last argument is missing. So I tried
It returns: "TNS: protocol Adapter error" which I somehow can understand, since the adapter doesn't know to wich db to connect.I also tried to use some frameworks like soci or otl but was never able to compile them... (link errors, unknown data types etc...).
my Multithread-Program hangs in an oracle library while passing a prepare statement (also if i try an EXEC SQL SELECT statement...). Something seems to be wrong in the Program, but i cant's find the Error.The Program is build with:
Previously we had 32 bit C++. Now, we have migrated it to 64 bit. And our C++ programs interact with Oracle 10g DB.Our C++ program was working fine with 32 bit. But once after we migrate to 64 bit we are facing problem with one program which does FETCH(EXEC SQL FETCH SUBP1 INTO :new TabRec;) from Oracle DB. ie, We exit from a for loop in the C++ program when we get NOT FOUND(sqlca.sqlcode=1403) on executing the FETCH statement.
The sqlcode generated for NOT FOUND scenario is 1403. But, once after moving to 64 bit C++, we do not see the sqlcode 1403 instead we are seeing a different code 7124089117159473.
As the sqlcode is not 1403, our program does not exit from the for loop and goes on an infinite loop.Am I missing anything that makes me to not get the exact sqlcode?
Now from Pro*C function I want to pass a similar array of structure to this procedure and return it via the out parameter of the procedure back to Pro*C. How do I do it?
I am using the attached program but its giving me compiler error as follows..
Error at line 31, column 1 in file sample.pc proc_modify_tdefs (:in_tdefs,:out_tdefs); 1 PLS-S-00306, wrong number or types of arguments in call to 'PROC_MODIFY_TDEFS' Error at line 31, column 1 in file sample.pc proc_modify_tdefs (:in_tdefs,:out_tdefs);
I am trying to give back data from a stored procedure written in C. I registered the functions as follows:create or replace procedure version(versioninfo OUT clob) as external name "version" library myLib language c with context parameters (context, versioninfo, versioninfo INDICATOR SB4); It compiles fine. The function being called look like this:
If I execute the procedure with SQLDeveloper by pressing "play" it is getting executed but there is no result. If I try to execute it from an anonymous block it results in ORA-22275 instead of doing anything.
declare res clob; begin -- the following doesn't work much --dbms_lob.createtemporary(res,true); version(res); dbms_output.put_line(res); end;
Actually I have to questions: 1.) Why does Oracle give me the error? In my opinion all requirements mentioned by the error description are met. 2.) Why is there no output when executing the function via SQL Developer? Is the usage of OCILobWrite wrong?
I am trying to describe an STP in a package, but it gives me an error.
e.g. In package ABC suppose there is an STP XYZ, I am trying to describe ABC.XYZ function but it gives me an error code 4043 and error message object XYZ.ABC does not exist.
i need to compile a proc program, say prog.pc.have oracle 10g in my system. Since i am new to proc programming, me on the steps to compile the proc program in oracle proc compiler.
in my oci applications,if i get a column of number that is in the scope of int,i can use value = *(int *)field.data; get the value,but if the column size is larger than 10,the code can't be available,how can i get the value.
I am trying to call procedure from PRO C Procedure has many parameters and I do not need to put all of them when I call procedure. Is there way to make the same way as in PL/SQL
I declare a cursor for a table with 8000 records, when I fetch the cursor this message appear ORA-03113: end-of-file on communication channels when the fetch reach the 6500 element, What is the problem here?. All data are ok, not null fields.
other problem
How I can reuse a cursor, I declare a cursor for a table where code_part = 300, then I fetch all elements until end cursor, then I close the cursor, Then I declare the same cursor again for the same table where code_part = 359, but it is not successful, when I tried to fetch the cursor again the cobol program show me the last record for the first code, How I can restart the cursor or delete it or freed the cursor position?
I am inserting empno in a table1 and updating another table2 using table1 empno and getting ora-01427 error. I want to print empno for whis this error is coming. How to print that value?
how to integrate SQLnet & c and I'm quite losted at the moment.
Searching with google gives some random stuff, which does seems to be irrelevant.some oracle db somewhere and need for good way to use that remote db (one solution seems to be using SQLnet).
If doing an insert into DATE type fields like below... how do I employ null indicator values with the TO_DATE sql to cope with NULL values for the End Date? I can test the NULLness of the pServiceRecord->itemTo value and set the indicator ind_dbToDate to -1 but I don't know how to incorporate this with the to_date syntax (if I can)?
EXEC SQL BEGIN DECLARE SECTION; char dbFromDate[MAX_DATE_LEN]; char dbToDate[MAX_DATE_LEN]; short ind_dbToDate; [code]...