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
0 answers

How much should the minimum size difference between readbuffer and max_linesize while using UTL_FILE in SQL

What should be the minimum difference between the readbuffer variable size and the max_linesize(specified in UTL_FILE.FOPEN) so the code executes without ORA-29284 error. For example below is my code: set serveroutput on; Declare f…
Mighty God Loki
  • 135
  • 3
  • 10
0
votes
1 answer

Save to html using utf 8

I need to save a html file as utf 8. This is not about . Is this possible? In short my procedure is like this: CREATE OR REPLACE PROCEDURE MY_PROCEDURE IS vFil UTL_FILE.FILE_TYPE; vFilNavn varchar2(250); vLinje varchar2(32767); begin vFil :=…
Johnny Gunn
  • 51
  • 1
  • 1
  • 2
0
votes
1 answer

Reading file with PL / SQL ends with error

I work in a small procedure that should read a file and validate if the file is empty or does not exist. The validation works but I tried to implement the reading and it throws me the following error: ORA-29284: file read error ORA-06512: at…
Cesar Tepetla
  • 39
  • 1
  • 8
0
votes
2 answers

Writing too long lines to file with pl/sql causes linebreakes

I'm trying to write some data to a file from oracle using pl/SQL. I seams like the script can only handle very small line sizes. when the linesize gets too big line breakes are added to the file, and I can't figure out why. Please take a look. This…
Kresten
  • 810
  • 13
  • 36
0
votes
1 answer

Read file of any name by date with PL / SQL using UTL_FILE

I am working on a procedure to read files from PL / SQL I have managed to read a specific file but now I want to do it dynamic because I will have multiple files starting with the date for example: 20190218 111833_Worker.dat 20190218…
Cesar Tepetla
  • 39
  • 1
  • 8
0
votes
1 answer

Adding new directory to all_directories on oracle fails?

I'm trying to add a new directory to all_directories. This first part went well I think, but when I'm trying to create a file in that dir I get: ORA-29283: invalid file operation This is my code: DECLARE fHandle UTL_FILE.FILE_TYPE; BEGIN …
Kresten
  • 810
  • 13
  • 36
0
votes
0 answers

Manually Generate csv file form select statement PL/SQL

I'm actually having problem generating a CSV file from a select statement that output a lot of rows (close to 10 M). I need to export the result of this statement in a CSV file and since i only have a Citrix VM, i'm being disconnect every 2h, which…
0
votes
0 answers

utl_file.fopen failing Occasionally

Everyone, We have a set of 8 jobs which runs in parallel on Unix server. Those jobs calls Oracle stored procedure. All those procedures does a set of DB operations (on different tables) and at the end creates files in Unix server. (Each job creates…
Valli
  • 1,440
  • 1
  • 8
  • 13
0
votes
1 answer

CSV output displayed in a single row in Excel

I am generating a CSV file using the UTL_FILE package. When I open the file in Excel, all of the data is appearing in a single row. But values are in each column. I am not sure how to get the data in seperate rows. Here is my PL/SQL block: declare …
0
votes
0 answers

oracle pl/sql utl_file ORA-29280: invalid directory path

I work with UTL_FILE. I want to create a file in 'C:\pruebaoracle'. I create a directory with: create or replace directory test1 as 'C:\pruebaoracle'; grant read, write on test to public; The procedure is CREATE OR REPLACE PROCEDURE…
Carlota
  • 1,239
  • 3
  • 29
  • 59
0
votes
0 answers

Oracle database loading data from text file to database using UTL_file and dbms

I am trying to upload data from text file to my table using UTL_FILE from SQL PLUS. the text file name testb.txt contain data: 10,mike 20,bill 30,kim and in my the table in the database called mytable contain columns (empno, empname) I tried this…
C.Z
  • 1
  • 1
  • 3
0
votes
1 answer

How to generate files on the client file system using oracle UTL_FILE package

I'd like to know, if is it possible to generate and retrieve the file using UTL_FILE package in oracle on the client side?
Ram
  • 25
  • 2
  • 8
0
votes
2 answers

Need assistance in declaring the variable as rowtype without knowing the table name

Create table t1_Fact ( Cur_date Date, Name varchar2(10), Event varchar2(50), Price Number(10,0), TAX Number(10,0), Flag Number ); Create table App_Fact ( Application_ID Number, Application_Name varchar2(100), Application_Price Number, Appliation_Tax…
Ram
  • 25
  • 2
  • 8
0
votes
1 answer

Need assistance in creating a procedure to load the data into CSV file using plsql

I have a three tables as below. Create table t1_Fact ( Cur_date Date, Name varchar2(10), Event varchar2(50), Price Number(10,0), TAX Number(10,0), Flag Number ); Create table App_Fact ( Application_ID Number, Application_Name varchar2(100),…
Ram
  • 25
  • 2
  • 8
0
votes
1 answer

oracle utl_file encoding from utf8

I like to export large amount of text data from db to file. The characterset in db is UTF8. The excepted result in the file is ISO8859P2 or MSWIN1250. My db settings: SELECT * FROM v$nls_parameters; 1 NLS_LANGUAGE HUNGARIAN 0 2 …