Reg UTL_FILE error
hi all,
iam using utl_file in my procedure.while executing the script its showing error as
ERROR at line 1:
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
ORA-06512: at line 1
ORA-06512: at "DBUSER.INPUT_AS", line 60
ORA-06512: at line 1
but i have created directory as output and granted permission to the user also.
but still its showing error .can anybody pls help me out...
thanks in advance,
Ratheesh
Have you assigned that value in the parameter file of
your database. If not this will give you error.
In your parameter file UTL_FILE_DIRECTORY should be
set to that directory path or as * .
I have to keep saying this, but NO IT SHOULD NOT!!!!
UTL_FILE_DIR parameter is the "old" way of doing things and leaves your operating system open to security issues. You should not use this parameter and more importantly, you should NEVER set that parameter to "*" otherwise someone may gain access to your whole operating system.
The correct way of using UTL_FILE is to create Directory Objects on the database and grant the relevant permissions to the users who require access.
Similar Messages
-
We need to export a large amount of data from some Oracle tables to be uploaded into a Sybase database using BCP. I had no issues exporting the data using the PUT_LINE command using the open command below.
l_file := utl_file.fopen( l_dir, l_name, 'W',32767);
The problem is, we do not want to use system's default line terminators because our data may contain embedded line terminators; We want to defined our own line terminators. But when we changed from UTL_FILE.PUT_LINE to UTL_FILE.PUT the application will run for a few seconds and then produce the following errors:
ORA-29285: file write error
ORA-06512: at "SYS.UTL_FILE", line 77
ORA-06512: at "SYS.UTL_FILE", line 690
ORA-06512: at "ADVCONV.P_WRITE", line 244
ORA-06512: at line 2.
If I use UTL_FILE.PUT to export smaller tables these errors do not occur so it looks like our data is larger then some limit. Does anyone have any suggestions/solutions? Thanks893730 wrote:
We need to export a large amount of data from some Oracle tables to be uploaded into a Sybase database using BCP. I had no issues exporting the data using the PUT_LINE command using the open command below.
l_file := utl_file.fopen( l_dir, l_name, 'W',32767);
The problem is, we do not want to use system's default line terminators because our data may contain embedded line terminators; We want to defined our own line terminators. But when we changed from UTL_FILE.PUT_LINE to UTL_FILE.PUT the application will run for a few seconds and then produce the following errors:
ORA-29285: file write error
ORA-06512: at "SYS.UTL_FILE", line 77
ORA-06512: at "SYS.UTL_FILE", line 690
ORA-06512: at "ADVCONV.P_WRITE", line 244
ORA-06512: at line 2.
If I use UTL_FILE.PUT to export smaller tables these errors do not occur so it looks like our data is larger then some limit. Does anyone have any suggestions/solutions? Thanks
>We need to export a large amount of data from some Oracle tables to be uploaded into a Sybase database using BCP. I had no issues exporting the data using the PUT_LINE command using the open command below.
l_file := utl_file.fopen( l_dir, l_name, 'W',32767);
The problem is, we do not want to use system's default line terminators because our data may contain embedded line terminators; We want to defined our own line terminators. But when we changed from UTL_FILE.PUT_LINE to UTL_FILE.PUT the application will run for a few seconds and then produce the following errors:
ORA-29285: file write error
ORA-06512: at "SYS.UTL_FILE", line 77
ORA-06512: at "SYS.UTL_FILE", line 690
ORA-06512: at "ADVCONV.P_WRITE", line 244
ORA-06512: at line 2.
If I use UTL_FILE.PUT to export smaller tables these errors do not occur so it looks like our data is larger then some limit. Does anyone have any suggestions/solutions? Thanks
consider using PUT_RAW instead of PUT_LINE -
"mapping null reg" compiler error LV2009
Opens fine in LV 8.6, but gives "Compiler error. mapping null reg" error in LV 2009.
If you get rid of the 2D transpose, the code compiles fine.
Attachments:
Bitmap to Graphic Block v1.0.vi 17 KBThanks for reporting this. The issue has actually already been addressed in LabVIEW 2010.
Regards,
Will
Certified LabVIEW Architect, Certified Professional Instructor
Choose Movement Consulting
choose-mc.com -
UTL_FILE errors, invalid directory path ???
Hi All,
I am trying to create a csv output file through pl/sql.
However i am having some issues since its my first time.
Please have a look at the following code:
create or replace
PROCEDURE amer_main_proc (start_sent_date date,
end_sent_date date,
senttype number) IS
CURSOR main_cur IS
SELECT
s.sent_id,
s.ussc_id,
s.sent_upd_date,
s.alt_docket,
s.amend_year,
s.def_num,
s.dep_status_code,
s.var_status_code,
s.disp_type_code,
s.docket,
s.oth_sent_code,
substr(s.oth_text,1,100) oth_text,
s.po_code,
ind.prim_offn_code,
s.prob_mons
FROM sentences s,
submission sub,
ind_sent ind,
defendants def,judges j
WHERE s.sent_id = sub.sent_id
AND s.sent_id = ind.sent_id
AND ((sub.case_type_code in (10,11)
AND trunc(sent_vio_date) between start_sent_date and end_sent_date) or
(sub.case_type_code in (10) AND trunc(sent_vio_date) between start_sent_date and end_sent_date) or
(sub.case_type_code in (11) AND trunc(sent_vio_date) between start_sent_date and end_sent_date) or
(sub.case_type_code in (11) and s.amend_code = 10 AND trunc(sub.create_date) between start_sent_date and end_sent_date))
AND s.def_id=def.def_id
AND s.ao_judge_id = j.ao_judge_id
AND sent_creator_id is not null
AND dist_id != 99
ORDER BY s.ussc_id, s.sent_id;
--Define output file variables
out_file UTL_FILE.FILE_TYPE; /* file type */
path_name VARCHAR2(50); /* file path */
file_name VARCHAR2(50); /* file name */
line_buffer VARCHAR2(2000); /* store all the elements that make up one line in the output file */
BEGIN
path_name := 'C:\SQL'; // this folder does exist in my C drive
file_name := 'main.txt';
out_file := UTL_FILE.FOPEN(path_name, file_name, 'W');
line_buffer := 'data main;';
UTL_FILE.PUT_LINE (out_file, line_buffer);
line_buffer := 'infile cards delimiter='','';';
UTL_FILE.PUT_LINE (out_file, line_buffer);
line_buffer := 'input ' ||
'USSCIDN ' ||
'ALT1DOC $ ' ||
'DEPART ' ||
'VARIAN ' ||
'DISPOSIT ' ||
'DOCKETID $ ' ||
'TYPEOTHS ' ||
'TYPEOTTX $ ' ||
'POOFFICE $ ' ||
'MONOFFTP ' ||
'PROBATN ';
UTL_FILE.PUT_LINE (out_file, line_buffer);
FOR main_cur_rec IN main_cur LOOP
--Writes to file
line_buffer := main_cur_rec.ussc_id ||
',' || nvl(main_cur_rec.alt_docket,' ') ||
',' || nvl(to_char(main_cur_rec.dep_status_code),' ') ||
',' || nvl(to_char(main_cur_rec.var_status_code),' ') ||
',' || nvl(to_char(main_cur_rec.disp_type_code),' ') ||
',' || nvl(main_cur_rec.docket,' ') ||
',' || nvl(to_char(main_cur_rec.oth_sent_code),' ') ||
',' || nvl(main_cur_rec.oth_text,' ') ||
',' || nvl(to_char(main_cur_rec.po_code),' ') ||
',' || nvl(to_char(main_cur_rec.prim_offn_code),' ') ||
',' || nvl(to_char(main_cur_rec.prob_mons),' ');
UTL_FILE.PUT_LINE (out_file, line_buffer);
END LOOP;
--Write SAS footer
line_buffer := ';';
UTL_FILE.PUT_LINE (out_file, line_buffer);
line_buffer := 'run;';
UTL_FILE.PUT_LINE (out_file, line_buffer);
--Close file
UTL_FILE.FCLOSE(out_file);
EXCEPTION
-- Write error messages to the screen and file
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SUBSTR(SQLERRM,1,50)); // this is line 106
UTL_FILE.PUT_LINE(out_file, SUBSTR(SQLERRM,1,50));
UTL_FILE.FCLOSE(out_file);
END amer_main_proc;I know I am having issues regarding the path, please have a look at the ERRORS below:
Error starting at line 1 in command:
DECLARE
START_SENT_DATE DATE;
END_SENT_DATE DATE;
SENTTYPE NUMBER;
BEGIN
START_SENT_DATE := '01-JAN-2001';
END_SENT_DATE := '01-MAR-2001';
SENTTYPE := 10;
AMER_MAIN_PROC(
START_SENT_DATE => START_SENT_DATE,
END_SENT_DATE => END_SENT_DATE,
SENTTYPE => SENTTYPE
END;
Error report:
ORA-29282: invalid file ID
ORA-06512: at "SYS.UTL_FILE", line 878
ORA-06512: at "USSC_CASES.AMER_MAIN_PROC", line 106
ORA-29280: invalid directory path
ORA-06512: at line 10
29282. 00000 - "invalid file ID"
*Cause: A file ID handle was specified for which no corresponding
open file exists.
*Action: Verify that the file ID handle is a value returned from a
call to UTL_FILE.FOPEN.thanks guys.
Edited by: Rooney on Feb 20, 2012 12:29 PMYou'll need to create an Oracle Directory object that contains 'C:\SQL' and use that in your UTL_FILE call if you are using a 10g+ version of the database and the UTL_FILE_DIR parameter does not include your path.
CREATE DIRECTORY my_dir AS 'C:\SQL';
GRANT READ WRITE ON DIRECTORY my_dir TO <user>;You can then use the directory object name in the path of your UTL_FILE call.
ORA-29280: invalid directory path Cause: A corresponding directory object does not exist.
Action: Correct the directory object parameter, or create a corresponding directory object with the CREATE DIRECTORY command.>
Hope this helps! -
create or replace procedure load_student
(pdir varchar2, pfile varchar2) is
vfile utl_file.file_type;
vtext varchar2(200);
vname varchar2(20);
vcourse varchar2(20);
vfee number(5);
fcomma number(3);
scomma number(3);
begin
vfile := utl_file.fopen(pdir,pfile,'r');
Loop
BEGIN
utl_file.get_line(vfile,vtext);
EXCEPTION
when no_data_found then
exit;
END;
fcomma := instr(vtext,',',1,1); -- 5
scomma := instr(vtext,',',1,2); -- 14
vname := substr(vtext,1,fcomma-1);
vcourse := substr(vtext,fcomma+1,scomma-fcomma-1);
vfee := substr(vtext,scomma+1);
insert into student values(student_sq.nextval,vname,vcourse,vfee);
end loop;
commit;
exception
when utl_file.read_error then
dbms_output.put_line(' Unable to read the file...... ');
end load_student;
when i am executing i get following error
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
ORA-06512: at "SYS.LOAD_STUDENT", line 11
ORA-06512: at line 3
View program sources of error stack?
please help me when you know the answer,immidiatlyCan you show the directory path. I think issue is there only. Anyways, i would repeat my prev replies for your help.
If your file is located on the client system, you dnt have to give ip address and exact path. You have to give machine name along with shared address. Suppose the file a.txt is located in C:\Files\. And you have put this folder on shared.
Grant R/W access to the server for the folder.
Create directory MYDIR as '\\Client_Name\Files\'Now Grant access priveleges to the user using UTL_FILE utility.
For server file location, you can specify the exact path in the directory path.
Hope my points helps you out. -
Hi Guys,
I am running Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production on RHEL 5.
I have procedure that uses utl_file package, but now the procedure fails with the error:
ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at "my_package.my_procedure", line 804
ORA-06512: at line 1
My directory object is pointing to the NS shared filesystem.
But if I try it several times it works perfect.
What might be the problem here:
Please help!!!!!!!!!
Thanks in advance...Thanks Helios,
I went through the document and I don't find anything that is related to my issue.
I can write at some point then I can't at some point. This looks like the permissions changes now and then.
Can this be the O/S related issue where the NFS can't be accessed as some point?
Please Help !!!!!!!! -
Reg:Getting error text from a channel into a file or into a variable
Hi,
Can we get the error text such as u201Cjava.lang.NegativeArraySizeExceptionu201D from a communication channel into a variable or in the form of an xml message so that based on kind of error further processing can be done.
Regards,
RahulYou can decide further processing based on the data available in the mapping. If the value comes in the source field for a list element as you expected do UDF and return error as string and decide the mapping as per business need. I talk about something like enhanced interface determination. That's one way. Reading the error message from the communication channel and decide does not seem to be better option.
-
Reg.SMTP Error while using UTL_MAIL in Oracle 10g
Hi,
I am getting the following SMTP error while trying to use the UTL.MAIL package of Oracle 10g. The query is as follows.
begin
utl_mail.send(
sender => 'NAVEEN',
recipients => '[email protected]',
subject => 'Testing utl_mail',
message => 'The receipt of this email means'|| ' that UTL_MAIL works'
end;
UTL_MAIL package is installesd and the port 25 is configured and firewall is changed.
The same block was working fine before 5 days and now is giving the error as
ORA-29279: SMTP permanent error: 501 badly formatted MAIL FROM user - no "<"
ORA-06512: at "SYS.UTL_SMTP", line 21
ORA-06512: at "SYS.UTL_SMTP", line 99
ORA-06512: at "SYS.UTL_SMTP", line 222
ORA-06512: at "SYS.UTL_MAIL", line 407
ORA-06512: at "SYS.UTL_MAIL", line 594
ORA-06512: at line 2
Could you please help me out how to proceed???
Regards,
Naveen Kumar.Can you back that statement about an Oracle UTL_SMTP bug up with an actual bug number??
From what you have posted, this is not a bug!! but expected and documented (RFC'ed) SMTP server behaviour.
My proof:
/home/billy> telnet mail 25
Trying 165.143.128.26...
Connected to mail
Escape character is '^]'.
220 CNTRRA20-GTW01 [CNTRRA20-GTW01] Thu, 06 Mar 2008 14:26:26 +0200
HELO 10.251.93.58
250 CNTRRA20-GTW01 Hello [10.251.93.58]
MAIL FROM: naveen <[email protected]>
501 naveen <[email protected]> : illegal character(s) in domain string
MAIL FROM: NAVEEN
501 NAVEEN : domain string is NULL.
quit
221 CNTRRA20-GTW01 closing connection. Goodbye!
Connection closed by foreign host.
/home/billy>
As you can clearly see, the SMTP server expects a DOMAIN name as part of the MAIL FROM address. It also does not accept the alternative format suggested.
Yes, not all SMTP servers are equal and some support additional formatting.
But to imply that because the SMTP server does not accept your address formatted as string NAVEEN, it is a UTL_SMTP problem, sounds like a smelly one to me. -
Reg. Error in MIGO transaction
Hi friends,
When I run standard transaction MIGO it is giving dump. Just after entering the Tcode it is giving dump. The following is the error we are getting.
*Syntax error in program "SAPLVBDOCUBATCH_DM ".*
Detail description:
Error in the ABAP Application Program
The current ABAP program "SAPLMIGO" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
The following syntax error occurred in program "SAPLVBDOCUBATCH_DM " in include
"LVBDOCUBATCH_DMU25 " in
line 139:
"You can only use the COLLECT command in a table if all of its non-key "
"fields are numeric (type I, P, or F) . . . . . . . ."
The include has been created and last changed by:
Created by: "SAP "
Last changed by: "SAP "
Error in the ABAP Application Program
The current ABAP program "SAPLMIGO" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Please look into this and give me your suggestions, Thanks in advance.
Regards,
Chandu.Hi Venkat,
My BASIS people solved the issue, they applied some patches to the system. Then it got set. You please check with your BASIS team.
Regards,
Chandu. -
Reg : Getting error while approving leave request
Hello Experts,
Manger is getting and error message u2018Work item 000000000000 cannot be readu2019 while
Approving the leave request of one his reportee. This error is triggering for only one
Reportee.
Experts please kindly help us.
Regards,
RajHi Raj,
There are a number of issues that could cause this. Can you share your scenario (where is manager approving the request - via SAPGUI, ESS, MSS?) Are you using an SAP standard workflow?
Plus, there are lots of threads in SCN on this topic. Have you checked any of these?
Good luck,
Sue -
Reg. Error while Full load - process chain
Hi,
I am running a process chain, which is a full load. In Manage screen it is in RED status whereas, While i chekced in Monitor screen it is showing as "Missing messages" . While I checked in the error and warning messages, I found that the data packet should be run manually. So I tried Manual update option by killing the job manually. After doing this i tried to run the same process with "Back to Technical Status" option. While performin this again i got an error saying "REQUXXXX terminated, as data packet 0000XX could not be locked"
How this error can be rectified.
Please advice.
Thanks in advance!!!
Regards,
MelissaHi Melissa.....
While i chekced in Monitor screen it is showing as "Missing messages"........where did u got the message.............in the data packet.......right...........?..........
I found that the data packet should be run manually. So I tried Manual update option by killing the job manually..................which job u hav killed........? Extraction Job?If u hav killed the Extraction job........then Manual update is not possible..............Manual update is only possible when the Extraction job will get completed successfully........
Due to this u r getting the Error Message error saying "REQUXXXX terminated, as data packet 0000XX could not be locked"....................When the request itself does'nt exist............how could u do Manual update for that deletedrequuest........
Then only option is..............make the QM status red.............delete the request from the target and repeat the load.........
Hope this helps.......
Regards,
Debjani........ -
Reg: webservices error in xi
Hi ,
Iam new to xi and had developed a http to web service scenario and the response i got an error
Result:
<SAP:Error><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code>MESSAGE.GENERAL</SAP:Code><SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML</SAP:AdditionalText></SAP:Error>
so in the receiver soap adapter in module tab i have given
Module name - localejbs/AF_Modules/MessageTranspormationBean
Type - Local Enterprise Bean Module - This is defined by the user, but the same name should be given in the module configuration for passing the parameters. In this case transform In the module configuration ,
Module key - In this case transform
Parameter name - TransformContenType
Parameter Value - text/xml;charset=utf-8
I got an error
Result:
<SAP:Error><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code>MESSAGE.GENERAL</SAP:Code><SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: local bean not found: localejbs/AF_Modules/MessageTranspormationBean</SAP:AdditionalText></SAP:Error>
the websevice is
http://www.webservicex.net/SendSMS.asmx?op=SendSMSToIndia
Could any one help me out.
Thanks & Regards,
Gangadhar.SHi Gangadhar
If you are new to SAP XI , then its better to read TIBIT. Below are the links of TIBIT which are very helpful in understanding the End-to-end process of XI. And you can even do some exercies here which are very helpful.
TBIT40:
https://websmp109.sap-ag.de/~form/ehandler?_APP=00200682500000001337&_EVENT=DISPLAY&COURSE=TBIT40
TBIT41:
https://websmp201.sap-ag.de/~form/ehandler?_APP=00200682500000001337&_EVENT=DISPLAY&COURSE=TBIT41&LANGUAGE=
TBIT42:
https://websmp206.sap-ag.de/~form/ehandler?_APP=00200682500000001337&_EVENT=DISPLAY&COURSE=TBIT42&LANGUAGE=
TBIT43:
http://www50.sap.com/useducation/curriculum/course.asp?cid=60161651
TBIT44:
https://websmp102.sap-ag.de/~form/ehandler?_APP=00200682500000001337&_EVENT=DISPLAY&COURSE=TBIT44
later you can follow this link which contains step by step blogs for http to webservices
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_weblog&query=httptoweb+service&adv=false&sortby=cm_rnd_rankvalue
Thanks
sandeep
PS: if helpful plz reward points -
Reg: Proxy error while fetching data from RFC's
Hi All,
I am fetching data from RFC's. When the data is in bulk I am getting an error like:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /webdynpro/dispatcher/sap.com/pb/PageBuilder.
Reason: Error reading from remote server
When the data is samll only I am not getting any error and am able to fetch it easily. Please suggest me something in this regard.
Thanks in advance,
GauravHi Detlef / Gowtham,
Now I am able to fetch data from flat files from OWB Server as well as OWB Client.
One way I have achieved as suggested by you
1) Creating location on the OWB Client
2) Samples the files at client
3) Created & Configured external table
4) Copy all flat files on OWB Server
5) Updated the location which I created at the client.
Other way
1) Creating location on the OWB Client
2) Samples the files at client
3) Created & Configured external table
4) Copied flat files on the sever in same drive & directory . like if my all flat files are on C:\data at OWB Client then I copied flat file C:\data on the OWB Server. But this is feasible for Non-Windows.
Hence my problem solved.
Thanks a lot.
Regards,
Manmohan -
Reg. Error message during Purchase order more than PR.
Dear Sir
After putting Purchase order for a Purchase requisition we can able to rise Purchase order for a PR. We a error message. Kindly give the solution this problem.
How to set error message in this case.
Thanks
Rajj.Hi
If u want to restrict PO creation with more than PR Qty u can set error message in OME0 or path as follows
SPRO>Materials Management>Purchasing>Environment Data>Define Attributes of System Messages-->system message
06 076
Set the message no : 06 076 as error messages.
Then when All The PR qty already convert to PO,then system will not allow another PO to created for this PR.
Vishal... -
Reg. Error in material BRICKS order 10003000 item 0000
Dear Experts
When I do confirmation in CO11N i am getting the following error
Error in material BRICKS order 10003000 item 0000
Message no. RU119
Diagnosis
The data necessary for automatic goods movements in a confirmation is incomplete or contains errors.
System Response
Automatic goods movements were not carried out. Instead, the system wrote error records.
Procedure
Process the error records in one of the following transactions: If the variable parameters are appropriately set then once the confirmation has been created the system asks you whether you want to process the error records. If you answer is "yes" then the system branches to the material overview where you can carry out processing. You branch to the transaction for reprocessing error records from automatic goods movements.
Pls help me
Thanks in advance
Rajakumar.KQuantity and Value update tick is made in OMS2 - MATERIAL TYPE then this problem is solved.
by myself
Edited by: Raja Kumar on Aug 26, 2009 2:48 PM
Maybe you are looking for
-
With my iPhone 5s, can I record a long voice memo to the cloud and not worry about storage space on phone?
-
If I change my Apple ID on my mac?
I have a macbook pro and I want to change my Apple ID to a new one. However, I bought a program for my mac, which cost me money, it was Pages. So my question is, if i change my Apple ID to a new one, is the program going to be erased? or when I am go
-
Java aplication not able to detect card reader sometimes
Hi We have a Java application (jre1.6.0_05.) which runs as window service under "Local System". It tries to detect card reader after every one minute. Normally it is working fine. However on some machines (which can be Windows XP, 2003 Server etc) so
-
Procedure don't work in a package
Hi, I created a procedure that lists files from a directory, this procedure works separately, and list those files , but when i add the procedure to a package and execute the package, it don't work & don't return any error , seems that the package ig
-
Oracle 11g certification for People tools 8.46 & 8.45??
Are the above people tools Oracle 11g certified??