Questions tagged [utl-file]

An Oracle package to enable reading and writing of text files on the operating system.

utl_file is an Oracle package that offers a limited version of standard operating system file I/O to read and write text files outside of the database.

Access to files is possible through a directory object but is also restricted by any operating system privileges.

Questions tagged should also be tagged .

Further reading:

164 questions
0
votes
1 answer

Oracle UTL_FILE.fremove (or frename) permission denied

We have a oracle 12.1.0.2 installation on Linux, we have a procedure that read files from a folder, process data and writes file to another folder, and we have all permission required on the folder, so it works up to this point. The problem arise…
Federico
  • 3
  • 4
0
votes
1 answer

How do I print number of rows inserted in a table using UTL_FILE in Oracle 10g?

I have a table TEST_TABLE in DB and I want to insert some values in it using a stored procedure. How do i print the number of rows that are inserted in TEST_TABLE after the SP has completed ??...I want to do this using UTL_FILE package and want a…
0
votes
0 answers

Handling headers using utl_file upload procedure in oracle

I am trying to upload a csv file having headers into a table using UTL_FILE, but I am facing an issue. With normal upload using utl_file, the headers are also included and the data results to be recorded in double quotes(which I don't require). If I…
0
votes
0 answers

oracle utl_file different encoding

I have a stored procedure that reads a table then exports those records in a file These files must be encoded in UTF-8 (without BOM) and Line feed.. not CR but sometimes are encoded in ASCII, so I get warnings.. Here's the procedure BEGIN …
John Michael
  • 67
  • 3
  • 14
0
votes
1 answer

Clob data don't want to save (Oracle, XML, Clob, PL/SQL, UTL_FILE)

I want to take data from table (xmltype) and save to the file on disc. set serveroutput on; declare p_directory varchar2(10) := 'DMP_XML'; p_fileName varchar2(10) := 'test.xml'; file_handle UTL_FILE.FILE_TYPE; clob_part…
4est
  • 3,010
  • 6
  • 41
  • 63
0
votes
1 answer

Load data from directory files

Below is my code to take files from a directory and insert them into a table using UTL file handler, files are successfully loaded in DIR_LIST2 using GET_DIR_LIST2( '/path' ); but when it comes to load them in my table using specified mapping in the…
KeenLearner
  • 685
  • 1
  • 8
  • 25
0
votes
1 answer

Remove last blank line from file

I have a code that gets data from a file, file contains last empty/blank line, for example if a file contains 4 records then the 5th line is blank one, how can I remove that blank line because when the code executes it rolled back the whole…
KeenLearner
  • 685
  • 1
  • 8
  • 25
0
votes
1 answer

Replacement of fnd_file with utl_file for logging in plsql

My package code contains fnd_file.put_line for logging purpose. I need to replace this with utl_file.put_line what will be the minimum lines of code I should write. there are 100+ occurences of fnd_file.put_line in my code for 14 procedures. Please…
Mahi
  • 1
  • 1
  • 7
0
votes
1 answer

Can Oracle UTL_FILE have multiple files open at the same time?

Is it possible to use Oracle UTL_FILE to have multiple files open at the same time? Currently, I'm not able to test this myself as I don't have permissions, and unable to GRANT them to myself, to be able to open and write to files with UTL_FILE.
derekj
  • 47
  • 2
  • 8
0
votes
1 answer

utl file oracle with buffer

I've read this article about Tuning UTL_FILE Technically the approach is to concatenate records while the size is less than maximum length of the buffer and write the entire buffer when the length is greater Excerpt from site (code): IF…
John Michael
  • 67
  • 3
  • 14
0
votes
0 answers

How to read an excel file from local disk into plsql?

Is it possible to read an xlsx or csv file from local disk and display its contents in plsql? I have been seeing examples of UTL_FILE to do the same, but it looks like it is only for files located on the server. I'm working on a Windows machine.
0
votes
1 answer

migration from oracle procedure to postgresql function UTL_FIle

As shown in image i'm facing this issue . Please help me out as i'm new to postgresql.
Sunil Harak
  • 229
  • 1
  • 2
  • 9
0
votes
1 answer

utl file rename operation failed

I have a mounted directory as follow: etc/fstab 10.100.52.12:/ftp /ftp nfs rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,vers=3,timeo=60,actimeo=0 0 0 # ll drwxr-xr-x 6 root 1000 62 Mar 29 13:48 ftp So I have to 'move' a file…
Mike John
  • 75
  • 2
  • 8
0
votes
1 answer

Cannot open file from oracle

I am trying to select bytes from oracle database and convert them to image file. When I wrote the oracle procedure it stops in UTL_FILE.fopen and returns a ORA-29280 error. Oracle community says that this error is caused because OS level user may…
Mlle 116
  • 1,149
  • 4
  • 20
  • 53
0
votes
1 answer

Flat file data export - fixed column length if numeric field is null

I have a temporary table holding application data I wish to export into a flat file with fixed positions. What I am struggelig with is that some of the values in numeric column account_numbers is null. During export the null value rows are not…
MrM
  • 389
  • 1
  • 8
  • 23