Precompilers, OCI & OCCI :: Compile PC File With Created Make File - No Explicit Type Given
Jan 22, 2008
I am trying to compile a .pc file with the make file which I created. But when I try to give make command I am getting following error
>make testfile
cc -o testfile testfile.c
"testfile.c", line 117: warning: no explicit type given
"testfile.c", line 119: warning: no explicit type given
"testfile.c", line 121: warning: no explicit type given
"testfile.c", line 122: warning: no explicit type given
"testfile.c", line 123: warning: no explicit type given
Undefined first referenced
symbol in file
sqlcxt testfile.o
ld: fatal: Symbol referencing errors. No output written to testfile
I have written make files that compile .pc files in unix. This was for several projects that use an oralib source code directory.Just running proc on one target .pc file works fine on unix. I am trying to use proc - Oracle 10.2.0 - in windows and I keep getting:
Quote:unable to open include file #include <stdio.h> and other C library headers.
I am doing all development under cygwin, this way I can write a makefile just like under unix instead of using nmake.All C library headers are in /usr/include When I run proc on Solaris as that:
proc program.pc No problems, and I do get program.c.
However in windows I get the previous error message. I have tried to do proc include=/user/include program.pc and proc include=/user/include parse=full program.pc but I still get the same error message.
after precompiling the cmpre.pc file, i got cmpre.c file. when i try compiling this .c file, am facing the following error...
servername:/.../home/usr/compile-> cc -g cmpre.c ld: 0711-317 ERROR: Undefined symbol: .sqlorat ld: 0711-317 ERROR: Undefined symbol: .sqlcxt ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux...As you'll see I do not understand anything about PRO*C. I need to compile this PRO*C code to use it to retrieve DBMS PIPES being sent.
I'm trying to compile it using the following command: gcc -o IAPIPE IAPIPE.c
The code - file IAPIPE.c #include <stdio.h> #include <string.h>
EXEC SQL BEGIN DECLARE SECTION; VARCHAR username[20]; int status; int msg_length; char retval[2000]; EXEC SQL END DECLARE SECTION; [code]....
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.
I am trying to load a input flat file (french data in it) into the database using pro*c (not using sql loader because of some validations ). i am reading the line by line and populating it into the structure and then process it.
The input file is encoded in WE8ISO8895P1 , I want the records to be populated into a table. so i did set NLS_LANG=French_France.WE8ISO8895P1 and ran the pro*c program . i used character host variable in the insert query , i used data from the earlier read structure and set these character host variable.
The problem i am facing is , when i am printing the values before insert i could see correct data.
For example the printed data of variable is "pas de donné " and strlen is 14. the target table field is of varchar type ( name varchar(20 char) )
but after i insert i could see only the truncated value in the database i.e "pas de donn" in the table length is 11.
I have 3 code files written in ProC. I have precompiled, compiled, tested them in my local environment (Windows) & they work fine. But when I try in real environment, AIX 5.3, I can precompile them. But when I try to compile & link them with the libclntsh library I get errors. I am using a Makefile but just for testing this is the command -
xlc oraProcs oraProcs.c test_curva.c lib_util.c -I $ORACLE_HOME/precomp/public -L $LIBPATH -l libclntsh.a Error - ld: 0706-006 Cannot find or open library file: -l libclntsh.a ld: open(): A file or directory in the pathname does not exist
where LIBPATH = $ORACLE_HOME/lib
library libclntsh.a exists in $ORACLE_HOME/lib & has the right permissions
I also tried removing the library libclntsh.a & recreating it using the command - genclntsh When I run this command I get this warning more than once -ld: 0711-783 Warning TOC overflow TOC size: 66888 Max size: 65536 genclntsh creates the library libclntsh.a, just not sure if these warnings damage the library file and are related to my link erros in some way.
I want to insert XML data into my ( Oracle 11G Release 1 ) XMLType table using OCCI. I'm getting
ORA-01461: can bind a LONG value only for insert into a LONG column
My XML data size is around 1.5 to 2MB. I have also tried using setMaxParamSize before calling the setString method. But, still I'm getting the same exception.
I am trying to import data from a dmp file created using expdp. Running on oracle 11g Express and getting following error, and tried to fix but could not succeeded, I have tables exist in POI schema and trying to import them in ghi schema. Created dmp file from poi shcema with two tables= '''REL20_AU_POI'',''ARCHIVE_POI''' and these tables do not exist in ghi schema
Is this really true ?When executing orainstRoot.sh , It creates the inventory pointer file (/etc/oraInst.loc).In my case , " the file was created before executing orainstRoot.sh "
+ As far as I know , end of the installation only we are running orainstRoot.sh script .+ + before running that the orainstRoot.sh script , i checked here ..+ +[root@localhost oraInventory]# id+
c:> sqlplus Enter user-name: sys as sysdba Enter password:
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name,ts# from v$tablespace; NAME TS# ------------------------------ ---------- SYSTEM 0 SYSAUX 1 UNDOTBS1 2 USERS 4 TEMP 3
[code].....
why can't it create re-create the datafile even i dropped tablespace with its content and its datafiles?
During the last week, we faced many network issues that prevent our RMAN files to be copied completely. Backup team offer a temporary solution that we have to generate only one backup file to be transferred from source to destination (tape).
datapump on Windows 2003/R11.2 I have a batch file that creates a daily dump of a schema in the DATA_PUMP_DIR - However, it doesn't! The script is as follows: REM Script to perform data pump export of the user01 schema and move to the
For some reason when this is run from a remote server as a batch it fails to create a file although the output from the scripts has no errors apart from move statements and the expdp output is all good (it states that the file was created in the expected location).If the expdp command is run on the server itself it is all good.
I have a Bash script that counts the rows of a csv file, extracts the fields and makes inserts in a sql file. Then it logs into SqlPlus and calls the insert file. The sql file looks like this:
I rely on "WHENEVER SQLERROR EXIT" for things to go the right path. However sometimes because of the contents of the CVS files (which I can't control) some rows don't get inserted but SqlPlus doesn't see that as an error, doesn't exit and I end up with the wrong number of rows being informed in the second insert.Is there some kind of "if-then-else" construct in Sql? After all the inserts are made, do a "select count (*)" and compare that number to the one informed by the script. If they match, make the final insert and commit; else exit.
I have an SP which takes filename as input parameter and loads the data into table (using UTL_FILE package), it is working fine with flat file, but if it is anything other than flat file (xls, doc, docx, pdf) then in When Others exception I'm showing as UNKNOWN Error.
Requirement: Is there a way to check the type of file (txt, xls, doc or pdf) passed as input to the stored procedure using UTL_FILE package (Only file name is send as input parameter not with file extension)
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