While loading a file ORA-00906 : left parente
i'm trying to load a simple file with ODI, and using this loading to set a value for a Variable #vReadFile with reading line by line the file , and #vLineNumber specifie the number of the line to processes.
here is the code for loading the file :
select C1 C1_C1
from TABLE
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=files_namesSNP$CRLOAD_FILE=C:\stage\ODI_sources\files_names/files_names.txtSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=#vLineNumber SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=C1SNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRACTION_ON_ERROR=0SNP$CR$$SNPS_END_KEY*/
the error is : ORA-00906 missing left parenthesis
best reagrds
Hi Otmane ,
Once again get the code freshely from the operator and paste it in the variable and assign your odi variable to $CRFILE_FIRST_ROW and then test it once again.
Thanks
Similar Messages
-
ORA-22288:file or LOB operation FILEOPEN failed while loading XML file.
Hello all,
I am getting the following error messages while loading XML file to Oracle 9i table.
declare
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at "SYS.DBMS_LOB", line 504
ORA-06512: at line 10
The script I am using is all follows:-
1. Created a file ldxmldata.sh on unix server directory
dd conv=ucase if=$1|sed 's/<?XML/<?xml/'|sed 's/VERSION/version/'|sed 's
/RECORD/ROW/'|sed 's/DATE/TRANSDATE/'|sed 's/&/-/'|sed 's/\/DATE>// TRANSDATE>/'>$1.UCASE
sqlplus sales/sales@rac @upld.sql $1.UCASE
2. Created SQL file upld.sql on unix server
set serveroutput on
exec DBMS_JAVA.SET_OUTPUT(1000000);
@ldxml.sql bsl.xml.UCASE
commit;
exit
3. Created sql file ldxml.sql on unix server
declare
insCtx DBMS_XMLSave.ctxType;
rows number;
file bfile := bfilename('XML_DIR','&1');
charContent CLOB := ' ';
targetFile bfile;
warning number;
begin
targetFile := file;
DBMS_LOB.fileopen(targetFile, DBMS_LOB.file_readonly);
DBMS_LOB.loadfromFile(charContent,targetFile,DBMS_LOB.getLength(tar
getFile),1,1);
insCtx := DBMS_XMLSave.newContext('sales.s_price');
rows := DBMS_XMLSave.insertXML(insCtx,charContent);
DBMS_XMLSave.closeContext(insCtx);
DBMS_LOB.fileclose(targetFile);
end;
4. As Sys,
Created a directory XML_DIR and assigned it the path of Unix server directory
where the script files reside.
Granted read priviledge on XML_DIR to user sales.
I am getting the above error messages. Kindly help with some possible solution.
Arun Patodia
Bokaro Steel CityHi guys,
Sybrand, aplogoies, the second line of the error stack was on one line in the first post, full error stack below:
ORA-22288: file or LOB operation FILEOPEN failed
The program issued a command but the command length is incorrect.
ORA-06512: at "SYS.DBMS_LOB", line 716
ORA-06512: at "JLMS.LOAD_DATA_UTIL", line 417
ORA-06512: at line 2I have looked at that error code as you mentioned, but the second line here doesn't really help much.
Hoek, i took your advice and tried to replace FILEOPEN with OPEn but got the same error.
Just to clarify as well, I am not using UNC or relative file paths as I know that these can cause problems.
Rgds
Dan -
Error while loading WSDL File in Eclipse
Hi Experts
We are getting the following Error while Loading WSDL File in Eclipse.
IWAB0399E Error in generating Java from WSDL: WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
Please advice how to resolve it.
Regards
PrashantIt seems that your WSDL is not well defined, you need to test your wsdl via WS-I compliance in order to check if the wsdl is well created, you can do this via soapui, just create a new project, import the wsdl file or set the URL, left click in the project and select check WS-I compliance, this tool will test your wsdl and gives you a detailed report of what might be the problem.
-
Unknown issue while loading .dbf file by sql loader
Hi guys,
I am having a unknown issue while loading .dbf file by sql loader.
I need to load .dbf data into oracle table.for this I converted .dbf file by just changing its extension as .csv . file structure after changing .dbf to .csv --
C_N_NUMBER,COMP_CODE,CPT_CODE,C_N_AMT,CM_NUMBER
1810/4,LKM,30,45,683196
1810/5,LKM,30,45,683197
1810/6,LKM,30,45,683198
1810/7,LKM,30,135,683200
1810/8,LKM,30,90,683201
1810/9,LKM,1,45,683246
1810/9,LKM,2,90,683246
1810/10,LKF,1,90,683286
2810/13,LKJ,1,50.5,680313
2810/14,LKJ,1,50,680316
1910/1,LKQ,1,90,680344
3910/2,LKF,1,238.12,680368
3910/3,LKF,1,45,680382
3910/4,LKF,1,45,680395
7910/5,LKS,1,45,680397
7910/6,LKS,1,90,680400
7910/7,LKS,1,45,680401
7910/8,LKS,1,238.12,680414
7910/9,LKS,1,193.12,680415
7910/10,LKS,1,45,680490
then I am loading it by sql loader.but I am getting always error below ...
Record 1: Rejected - Error on table C_N_DETL_TAB, column CPT_CODE.
ORA-01438: value larger than specified precision allowed for this column
Record 2: Rejected - Error on table C_N_DETL_TAB, column CPT_CODE.
ORA-01438: value larger than specified precision allowed for this column
table structure-
create table C_N_DETL_tab
"C_N_NUMBER" VARCHAR2(13),
"COMP_CODE" VARCHAR2(3),
"CPT_CODE" NUMBER(4),
"C_N_AMT" NUMBER(20,18),
"CM_NUMBER" NUMBER(7)
control file-
options(skip=1)
load data
infile '/softdump/pc/C_N_DETL.csv'
badfile '/softdump/pc/C_N_DETL.bad'
discardfile '/softdump/pc/C_N_DETL.dsc'
into table C_N_DETL_tab
truncate
FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
C_N_NUMBER CHAR,
COMP_CODE CHAR,
CPT_CODE INTEGER,
C_N_AMT INTEGER,
CM_NUMBER INTEGER
but guys when I am increasing size of all columns of tabel upto its max value then data is loaded but when I am checking column max length after data loaded then its very less..
changed table structure-
create table C_N_DETL_tab
"C_N_NUMBER" VARCHAR2(130),
"COMP_CODE" VARCHAR2(30),
"CPT_CODE" NUMBER(32), ---- max value of number
"C_N_AMT" NUMBER(32,18), ---- max value of number
"CM_NUMBER" NUMBER(32) ---- max value of number
now i ma running ...
sqlldr express/express control=C_N_DETL.ctl log=C_N_DETL.log
o/p-
Table C_N_DETL_TAB, loaded from every logical record.
Insert option in effect for this table: TRUNCATE
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
---------- ---- ---- C_N_NUMBER FIRST * , O(") CHARACTER
COMP_CODE NEXT * , O(") CHARACTER
CPT_CODE NEXT 4 INTEGER
C_N_AMT NEXT 4 INTEGER
CM_NUMBER NEXT 4 INTEGER
Table C_N_DETL_TAB:
20 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
select max(length( CPT_CODE))from C_N_DETL_tab ---> 9
can u tell me why I need to increase size of table columns upto max value?although length of data is soo much less.
kindly check it..thnx in advance...
rgds,
pcNo database version of course. Unimportant.
If I recall correctly, it is 'integer external ' and you would best double quoting the alphanumerics (which you didn't ).
Try changing integer in integer external in the ctl file.
Sybrand Bakker
Senior Oracle DBA -
Getting error while loading Flat File
Hello All,
I am getting error while loading flat file. Flat file is a CSV file.
Value ',,,,,,,,' of characteristic 0DATE is not a number with 000008 spaces
Data seprator |
Escape sign ;
It has 23708 entries , it s loading successfully till 23 665 entries
Besides when checked in PSA
for record having entries >23667 has calender day as ,,,,,, where as rest entries are having date
Besides when i checked in Flat file ,the total number of rows is 23,667 is there but i wonder why it has got 23,708 in
RSMO
Could you please let me know how to correct.
regards
pathHi,
For date column you should maintain YYYYMMDD formate Eg: 20090601, kepp cursor on date column and right click and Formate >Custome>make it 00000000 then save teh file as .CSV . First type values on column and do like this formate and save it and without opening it load it. Once you open it you losw 00000000 formate you need to give again the same formate.
Settings in Infopackage:
Data Format = CSV
Data Separator = ,
Escape Sign = ;
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/01ed2fe3811a77e10000000a422035/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/80/1a6567e07211d2acb80000e829fbfe/content.htm
Thanks
Reddy -
Exception occurred while loading _WL_TIMESTAMP FILE
Hi all,
I have an application packaged in a EAR file, but when I deploy through the Weblogic Server Administration console, i get a strange error:
<Error> <EJB> <BEA-010003> <Exception occurred while loading WLTIMESTAMP FILE.
java.io.FileNotFoundException: /opt/bea/domains/bpm/servers/BPMServer/cache/EJBCompilerCache/1bscgreimm37w/_WL_GENERATED (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at weblogic.ejb.container.deployer.EJBDeployer.getFileHash(EJBDeployer.java:464)
at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:586)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1154)
Truncated. see log file for complete stacktrace
>
java.lang.NullPointerException
at weblogic.utils.FileUtils.remove(FileUtils.java:274)
Searching over the Oracle/BEA documentation i found this :
BEA-010003 Error: Exception occurred while loading WLTIMESTAMP FILE.
Description Exception occurred while loading WLTIMESTAMP FILE. Forcing recompilation: ioException
Cause The container generates WLGENERATED file, which stores the server version of the appc compiler. if the current server version is different from the version specified in WLGENERATED file, appc recompiles the beans. There was an error reading this file.
Action The container will automatically recompile the beans.
But if the container compiles the beans again, why in the deployments view, it doesn't work, and the application is never at Active state?
Any help is appreciated!
ThiagoLooking at your stack trace, I don't believe the issue is directly related to the WLTIMESTAMP file but rather it looks like you have hit the limit on the number of open file descriptors for your process (note that the stack trace says "Too many open files" immediately after reporting what file it failed to open). Looks like you either have an FD leak or your OS/shell limit on the number of open file descriptors allowed per process may be set too low for what you are trying to accomplish.
-
Risk factors while loading flat files
HI,
CAn anybody tell me what are risk factors while loading
flat files....
Thanks in advance,
regards,
RagsRisks:
1) If flat-file is created manually
- users may forget columns, specifically UNIT and
CURRENCY.
- Keyfigures my be presented in thousands one time
and in single dollars the other time.
- Flat-file may be delivered too late.
- Automatic scheduling is difficult if flat-file
comes from client station. You even can't do it
with a process chain.
- Naming conventions (capitals, leading zeroes,
trailing spaces, special characters)
- Master data conversion
2) If flat-file is created automatically (from legacy
system):
- Data may arrive too late
- Data file (if loaded from server) requires a
connection to the external disk - security risk.
- (Master) Data conversion
Note: In the past I had trouble with uploading flat-files from a network-drive. It sometimes happened that the flatfile was only partly imported and that no errors where reported. When loading data from my local C-drive I never had this problem.
My advise is to upload a flat-file into an ODS before using the data further in BW. In the ODS you can add a date to mark the loading data. If the loading to an ODS is ok then there is a much bigger change that you will not get problems further in the data-stream. Make sure that the key-user validates the data in the ODS before using it any further. It pays off to create one or two special queries on this ODS to enable testing of the data. -
FDF error while loading xml file onto PDF
Need some help here folks. Im getting a FDF error while loading some value into pdf form. It not happening all the time, 1 out of 60 times with the same xml file onto a new pdf form. Anyone know why this happening. Is there some technical support i can purchase to get this resolved.
9.1 and 9.3.4
Date: Fri, 5 Aug 2011 00:56:19 -0600
From: [email protected]
To: [email protected]
Subject: FDF error while loading xml file onto PDF
Could you let me know which version of Adobe Reader are you using?
> -
Error while loading Flat file to the table (ORA-00936: missing expression)
lat file Hi Gurus
Receiving the following error while trying to load of flat file to the database :
ODI-1228: Task test_file_load (Integration) fails on the target ORACLE connection DEMO_STAGE.
Caused By: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:662)
The file which I have tried to load is : SRC_SALES_PERSON and teh table structure is
CREATE table "TRG_SALES_PERSON"(
"SALES_PERSON_ID" NUMBER(8,0) NOT NULL,
"FIRST_NAME" VARCHAR2(80),
"LAST_NAME" VARCHAR2(80),
"DATE_HIRED" VARCHAR2(80),
"DATE_UPDATED" DATE NOT NULL)
Knowledge module used are
LKM File to SQL
IKM SQL Incremental Update
We rae using ODI 11g R2 ...
Thanks and reallty appreciate any help in thsi regard.HI there,
I am facing the same issue while loading data from SRC_SALES_PERSON(flat file) to TRG_CUSTOMER.
I dont see any errors in the steps however the data is not laoded finally. Here are the sql commands
**On source**
select ID C11_ID,
LASTNAME C9_LASTNAME
from TABLE
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=SRC_SALES_PERSONSNP$CRLOAD_FILE=D:\Pratima\Softwares\ODI\ofm_odi_companion_generic_11.1.1.5.1_disk1_1of1[1]\demo\oracledi-demo\oracledi\demo\file/SRC_SALES_PERSON.txtSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=IDSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=11SNP$CRPRECISION=11SNP$CRACTION_ON_ERROR=0SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=FIRSTNAMESNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=12SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=LASTNAMESNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=62SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=DATE1SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=112SNP$CRLENGTH=20SNP$CRPRECISION=20SNP$CR$$SNPS_END_KEY*/
On Target
insert into STAGING.C$_0TRG_CUSTOMER
C11_ID,
C9_LASTNAME
values
:C11_ID,
:C9_LASTNAME
The actual code at source fails however the step is in green.
Thanks in Advance,
Pratima -
Error while loading XML files into scott user
Hi All,
I'm new to xml files. I need to load xml files into database through OWB.
I have xml file in my local machine & am trying to load into table PO of Scott. Scott is registered as repository user.
Followed same steps as specified in userguide.
But, when executing the procedure ( in two ways one as just table name, and other as user.table name) it is showing the below error:
Procedure is:(1)--with username.tablename
begin
wb_xml_load(
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>&&SAMPLES_DIR.sample1.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target dateFormat="yyyy.MM.dd">scott.PO</target>'||
'</targets>'||
'</OWBXMLRuntime>'
end;
ERROR at line 1:
ORA-20006: Error occurred while truncating target database object SCOTT.PO.
Base exception: ORA-01031: insufficient privileges
ORA-06512: at "OWBSYS.WB_XML_LOAD_F", line 12
ORA-06512: at "OWBSYS.WB_XML_LOAD", line 4
ORA-06512: at "SCOTT.SAMPLE1", line 3
ORA-06512: at line 1
Procedure is:(2) with out username
begin
wb_xml_load(
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>&&SAMPLES_DIR.sample1.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target dateFormat="yyyy.MM.dd">PO</target>'||
'</targets>'||
'</OWBXMLRuntime>'
end;
ERROR at line 1:
ORA-20006: Error occurred while truncating target database object PO.
Base exception: ORA-00942: table or view does not exist
ORA-06512: at "OWBSYS.WB_XML_LOAD_F", line 12
ORA-06512: at "OWBSYS.WB_XML_LOAD", line 4
ORA-06512: at line 2
xml file:
<ROWSET>
<ROW>
<ID>100</ID>
<ORDER_DATE>2000.12.20</ORDER_DATE>
<SHIPTO_NAME>Adrian Howard</SHIPTO_NAME>
<SHIPTO_STREET>500 Marine World Parkway</SHIPTO_STREET>
<SHIPTO_CITY>Redwood City</SHIPTO_CITY>
<SHIPTO_STATE>CA</SHIPTO_STATE>
<SHIPTO_ZIP>94065</SHIPTO_ZIP>
</ROW>
</ROWSET>
Note: Everything works fine if I create PO table in OWBSYS user and execute the procedurein OWBSYS user. OWBSYS.PO table will be loaded.
What privileges are missing, what shouldI do if I want to execute the procedure from scott user and load the table of scott.
Thanks in advance for the help.
Regards,
JoshnaHi Joshna,
Please follow below steps to load xml file to oracle database.
1.First connect to owb (Design Center) through your repository owner user (ex : REP_OWNER).
2. Import WB_XML_LOAD procedure . and exit to repository owner.
3. connect to owb design center through your repository user (ex : REP_USER)
Create New mapping and drag one Constant Operator and create one attribute, paste / edit following code
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>E:\SOURCE\emp.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target truncateFirst = "FALSE" dateFormat="yyyy.MM.dd">rep_user.emp</target>'||
'</targets>'||
'</OWBXMLRuntime>'
4. Drag pre mapping operator and select WB_XML_LOAD procedure
5. Connect Constant Operator attribute to pre mapping operator.
6. Drag two dummy tables and connect source to target. (ex : drag t1 (table) tab two times and connect.
7. Validate and deploy the mapping.
8. grant necessary grant command to rep_owner user to rep_user user.
(Note : target truncateFirst = "FALSE" by default truncate the table. So you have to give grant privileges
To rep_user , select ,insert, delete privileges.
9. Execute the mapping , and check EMP table. (Note : before loading EMP table delete all records ).
10 . If you want more description please go through the below link
http://download.oracle.com/docs/html/A95931_01/apf.htm
Regards
Venkat -
I am getting error while loading the XML file. I have attached the jpg file which shows error details.....pls let em know the solution....
thanksWhat is the error message? Where is the jpeg?
-
Error while loading .app file in HFM Classic
Hi,
I am getting an error while loading a sample HFM .app file which I have generated using DRM Export for the Account hierarchies. The log file gives the following error
The file is attached.
Please help! Thanks!Hi there,
The issue is the question mark at the beginning of the sentence:
The correct format is:
Cheers,
Thanos -
Error while loading XML file to XML_type column
I am trying to load a huge xml file in table having xml_type column. I am getting an error
The following error has occurred:
ORA-20010: Error: ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00216: invalid character 140 (0x8C)
Error at line 2 at location: 10
Any suggestions why I might be getting this errors?
Is there any size restriction on the file that we can load with loadfromfile?
THis is the procedure I have written to load the file--
CREATE OR REPLACE procedure vsave_xml_file_to_table(
p_directory in varchar2,
p_filename in varchar2 )
AUTHID DEFINER
as
v_filelocator bfile;
v_cloblocator clob;
v_filelength number;
v_loc number :=10;
begin
dbms_lob.createtemporary(v_cloblocator,true);
v_filelocator := bfilename(p_directory, p_filename);
dbms_lob.fileopen(v_filelocator, dbms_lob.file_readonly);
dbms_lob.loadfromfile(v_cloblocator, v_filelocator,dbms_lob.getlength(v_filelocator));
v_filelength := dbms_lob.getlength(v_filelocator);
DBMS_OUTPUT.PUT_LINE('File is loaded and its size is :'|| v_filelength);
dbms_lob.fileclose(v_filelocator);
--insert into vxml values(1, XMLType.createXML(v_cloblocator));
insert into vxml values(1, XMLType(v_cloblocator,null,0,0));
DBMS_LOB.FREETEMPORARY(v_cloblocator);
exception
when others then
-- close the cursor and file, and reraise.
if dbms_lob.fileisopen(v_filelocator) = 1 then
dbms_lob.fileclose(v_filelocator);
end if;
rollback;
raise_application_error (-20010,'Error: '||sqlerrm|| ' at location: '||v_loc);
end vsave_xml_file_to_table;
The input file is of size 5K.
The procedure loads a file of size around 100 bytes with no problem.
I am on Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
Please help
Thanks!As you said, i have changed the Code, But still the same error,
CREATE OR REPLACE FUNCTION fn_Ins_CLOBDOCUMENT(FILENAME IN VARCHAR2,
CHARSET IN VARCHAR2 DEFAULT NULL)
RETURN CLOB DETERMINISTIC IS
FILE BFILE := BFILENAME('FXLMBAH', FILENAME);
CHARCONTENT CLOB := ' ';
TARGETFILE BFILE;
LANG_CTX NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
CHARSET_ID NUMBER := 0;
SRC_OFFSET NUMBER := 1;
DST_OFFSET NUMBER := 1;
WARNING NUMBER;
BEGIN
IF CHARSET IS NOT NULL THEN
CHARSET_ID := NLS_CHARSET_ID(CHARSET);
END IF;
TARGETFILE := FILE;
DBMS_LOB.FILEOPEN(TARGETFILE, DBMS_LOB.FILE_READONLY);
DBMS_LOB.LOADCLOBFROMFILE(CHARCONTENT,
TARGETFILE,
DBMS_LOB.GETLENGTH(TARGETFILE),
SRC_OFFSET,
DST_OFFSET,
CHARSET_ID,
LANG_CTX,
WARNING);
DBMS_LOB.FILECLOSE(TARGETFILE);
RETURN CHARCONTENT;
END;
INSERT INTO XMLTABLE
VALUES(XMLTYPE(fn_Ins_CLOBDOCUMENT('purchaseorder.xml')))
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at "SYS.DBMS_LOB", line 523
ORA-06512: at "LCC.FN_INS_CLOBDOCUMENT", line 17
ORA-06512: at line 1raja
Edited by: KrChowdary on Feb 18, 2009 3:36 PM -
Error while loading java file in Oracle
Hi,
I am facing error while loading java class into oracle . Can you please help
-bash-3.2$ cd /export/home/sacuser/
-bash-3.2$ loadjava -user sacuserdb/sacuserdb@BLM - resolve Oracle_Validator/src/com/nec/blm/oracle/validator/Validate.java
unrecognized or badly formed option -
loadjava: Usage: loadjava [-definer] [-encoding encoding] [-force] [-genmissing] [-genmissingjar jar] [-grant grant s] [-help] [-nousage] [-noverify] [-oci8] [-order] [-resolve] [-resolver resolver] [-schema schema] [-synonym] [-th in] [-tableschema schema] [-user user/password@database] [-verbose] classes..jars..resources..properties...
-bash-3.2$ loadjava -user sacuserdb/sacuserdb@BLM -resolve Oracle_Validator/src/com/nec/blm/oracle/validator/Validate.java
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at oracle.jdbc.driver.T2CConnection.t2cCreateState(Native Method)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:346)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:131)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:77)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
- locked <0xf5fdc448> (a java.lang.Class)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
- locked <0xf5fdc448> (a java.lang.Class)
at oracle.aurora.server.tools.loadjava.DatabaseOptions.getConnection(DatabaseOptions.java:180)
at oracle.aurora.server.tools.loadjava.DatabaseOptions.connect(DatabaseOptions.java:123)
at oracle.aurora.server.tools.loadjava.LoadJavaState.getConnection(LoadJavaState.java:409)
at oracle.aurora.server.tools.loadjava.LoadJavaState.getOldMD5(LoadJavaState.java:696)
at oracle.aurora.server.tools.loadjava.ClientSchemaObject.getOldMD5(ClientSchemaObject.java:52)
at oracle.aurora.server.tools.loadjava.SchemaObject.doCreate(SchemaObject.java:172)
at oracle.aurora.server.tools.loadjava.SchemaObject.process1(SchemaObject.java:215)
at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:532)
at oracle.aurora.server.tools.loadjava.LoadJava.addSource(LoadJava.java:574)
at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:439)
at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:380)
at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:349)
at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:652)
at oracle.aurora.server.tools.loadjava.LoadJava.processDeferredFiles(LoadJava.java:617)
at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:818)
at oracle.aurora.server.tools.loadjava.LoadJava.command(LoadJava.java:251)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.run(LoadJavaMain.java:103)
at oracle.aurora.server.tools.loadjava.LoadJavaMain.main(LoadJavaMain.java:28)
Dynamic libraries:
0x8050000 /opt/oracle/product/10g/jdk/jre/bin/java
0xfef80000 /lib/libthread.so.1
0xfef40000 /lib/libdl.so.1
0xfee10000 /lib/libc.so.1
0xfea00000 /opt/oracle/product/10g/jdk/jre/lib/i386/client/libjvm.so
0xfedd0000 /usr/lib/libCrun.so.1
0xfedb0000 /lib/libsocket.so.1
0xfe960000 /lib/libnsl.so.1
0xfed90000 /lib/libm.so.1
0xfedc0000 /usr/lib/libsched.so.1
0xfe900000 /lib/libm.so.2
0xfed40000 /lib/libscf.so.1
0xfe8e0000 /lib/libdoor.so.1
0xfe8b0000 /lib/libuutil.so.1
0xfe890000 /lib/libgen.so.1
0xfe870000 /lib/libmd.so.1
0xfe850000 /lib/libmp.so.2
0xfe830000 /opt/oracle/product/10g/jdk/jre/lib/i386/native_threads/libhpi.so
0xfe3d0000 /opt/oracle/product/10g/jdk/jre/lib/i386/libverify.so
0xfe3a0000 /opt/oracle/product/10g/jdk/jre/lib/i386/libjava.so
0xfe380000 /opt/oracle/product/10g/jdk/jre/lib/i386/libzip.so
0xf9e80000 /opt/oracle/product/10g/lib32/libocijdbc10.so
0xf0e00000 /opt/oracle/product/10g/lib32/libclntsh.so.10.1
0xf0c60000 /opt/oracle/product/10g/lib32/libnnz10.so
0xf9e60000 /lib/libkstat.so.1
0xf9e30000 /lib/libaio.so.1
0xf1b60000 /lib/librt.so.1
Heap at VM Abort:
Heap
def new generation total 576K, used 237K [0xf1e00000, 0xf1ea0000, 0xf22e0000)
eden space 512K, 45% used [0xf1e00000, 0xf1e3a058, 0xf1e80000)
from space 64K, 8% used [0xf1e90000, 0xf1e915c0, 0xf1ea0000)
to space 64K, 0% used [0xf1e80000, 0xf1e80000, 0xf1e90000)
tenured generation total 1408K, used 204K [0xf22e0000, 0xf2440000, 0xf5e00000)
the space 1408K, 14% used [0xf22e0000, 0xf23130f0, 0xf2313200, 0xf2440000)
compacting perm gen total 4096K, used 2662K [0xf5e00000, 0xf6200000, 0xf9e00000)
the space 4096K, 65% used [0xf5e00000, 0xf6099a38, 0xf6099c00, 0xf6200000)
Local Time = Mon Jun 17 16:29:08 2013
Elapsed Time = 0
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.4.2_05-b04 mixed mode)
# An error report file has been saved as hs_err_pid27805.log.
# Please refer to the file for further information.
Abort (core dumped)Please try to compile your java source file with jdk avaiable in ORACLE_HOME\jdk\bin\javac.
load the compiled class file in oracle DB using loadjava utility.
loadjava -user scott/tiger javafile.class -
Error while loading .sim file with sap tutor 2.2
Dear Gurus,
I had recorded a tutorial which is am attempting to edit now.
On opening the tutorial through the editor, I get the following message:
"The following error occured while opening the file:
error loading archive: no valid header or TOC found (80040002)"
I am able to edit other tutorials satisfactorily.
I seek guidance in resolving the error and opening the tutorial.
Note: I downloaded SAP Tutor from SWDC.
Regards,
AjayI was using the SAP Personal Player to play the tutorials. After I installed the licenced version from service.sap.com, I was able to open the .sim files.
Thanks!
Maybe you are looking for
-
How to set the width of DataGridColumn dynamically?
What I want to do is, load data from a text file and put into a DataGrid component, the fields of ech record in the text have fixed length, and are seperated by a space, like this: personal.txt 50 Uvwxyz Male 123456789 60 Hijklmn Male 6789012
-
Dragging a URL to the right side of the dock
I use to do this pretty elegantly when I wanted quick access instead of bookmarking it. Now dragging the URL works but it's dock independent and just stays on the desktop where as before I would just drag it to the dock and it would be clean and the
-
How to call a report in a form
dear sir I am new to form and report 9i I am calling a report from a form by using run_report_object I am not geting properly please help me
-
Insert a blank line between records
Hi, I am creating a sqlplus report and want to insert a blank line or some seperator to seperate the records between the start and end points of the loop to make it more readable. ex : The output currently look like this. ColumnA ColumnB 1
-
CRM Broadcast messaging in Servicepro
Hi, I'm on a Aeronautic project, on SAP CRM Service. We need to implement Broadcast Messaging in our SAP CRM but we want to install it in the "Service-pro" Business role. However, it seems that the functionality is only available in "WEB_IC Agent" an