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

utl_file.fopen without 'create directory ... as ...'

Hi, everybody. I am new to PL/SQL and Oracle Databases. I need to read/write file that exists on server so i'm using utl_file.fopen('/home/tmp/','text.txt','R') but Oracle shows error 'invalid directory path'. Main problem is that i have only user…
0
votes
0 answers

Oracle UTL_FILE issue from sql developer

I am facing a strange issue using my Oracle SQL developer as a client for a Oracle 11g database. I have a plsql procedure that writes some report files using UTL_FILE package. If I run it from SQL developer it fails, with the following…
LogLady
  • 11
  • 1
  • 4
0
votes
2 answers

Understanding Utl_file

So I am changing the procedure of this parse_file 'clean_files_up procedure'. I have coded the changes but after testing I realized I am actually having a hard time understanding what is going on. I have never worked with parsing a file or utl_file…
Weber
  • 27
  • 5
0
votes
1 answer

ORACLE how to print text in a new line

Basically its a letter printing in text I'm trying to do via an Oracle PL/SQL Procedure. My Code below: - DECLARE out_file UTL_FILE.file_type; lv_file VARCHAR2 (200) DEFAULT TO_CHAR (SYSDATE, 'yyyymmddhhmiss')||'.txt' ;LVSQL…
rocky
  • 11
  • 1
  • 4
0
votes
2 answers

How to output extended ascii characters using Oracle utl_file

I was writing files using l_file := utl_file.fopen('OUT', 'a.txt', 'w'); utl_file.put_line(l_file, 'Rosëttenville'); but I changed this to l_file := utl_file.fopen_nchar('OUT', 'a.txt', 'w', 32767); utl_file.put_line_nchar(l_file,…
Superdooperhero
  • 7,584
  • 19
  • 83
  • 138
0
votes
3 answers

Delimeter files issues

I do have a flat file with not a fixed structure like name,phone_num,Address bob,8888,2nd main,5th floor,avenue road Here the last column Address has the value 2nd main,5th floor,avenue road but since the same delimeter , is used for seperating…
Aspirant
  • 2,238
  • 9
  • 31
  • 43
0
votes
1 answer

UTL_FILE WITH %ROWTYPE .. ERROR

I want to create procedure that get rows from employees record whose salary more then input number. And then get that output to text file. I don’t understand where i am doing wrong. Please help me out. Thanks in advance. I have employees table as…
0
votes
1 answer

How to write hex FF symbols into file from CLOB-type field using UTL_FILE?

Do anybody know how to insert into table with fields type «clob» a data which after using utl_file will look in the result file like FF FF FF FF in hex-editor? I did the next (and a lot of other attempts): INSERT INTO DATA.FILE_TAB (A1 --CLOB type…
May12
  • 2,420
  • 12
  • 63
  • 99
0
votes
1 answer

Inserting data in NEWEMP table using UTL_FILE but it's able to display only one data

declare ENAME VARCHAR2(10); JOB VARCHAR2(10); MGR VARCHAR2(4); HIREDATE varchar2(11); SAL VARCHAR2(11); COMM VARCHAR2(9); DEPTNO number(2); EMPNO NUMBER(4); …
Girish R Acharya
  • 140
  • 5
  • 15
-1
votes
1 answer

Reading Text Document from PL/SQL stored procedure

CREATE OR REPLACE PROCEDURE file_trial IS V1 VARCHAR2(32767); F1 UTL_FILE.FILE_TYPE; BEGIN F1 := UTL_FILE.FOPEN('C:\TEMP','AVI','R',256); UTL_FILE.GET_LINE(F1,V1,32767); UTL_FILE.FCLOSE(F1); END file_trial; This code while executing gives…
Avi
  • 1,115
  • 8
  • 20
  • 30
-1
votes
2 answers

Pipe delimited instead of coma through utl_file

Is it possible to generate the .CSV file with pipe (|) delimiters instead of comma (,) through UTL_FILE package? Kindly share me how to do if it is possible. Thanks, Janardhan.
-1
votes
1 answer

I/O File Operations in Postgresql

I am brand new to PostgreSQL and I need someone to point me in the right direction on how to write the results of a function to a text file. Is it possible to do this within the PostgreSQL PL/pgSQL language? I have done this before in Oracle using…
User0123
  • 159
  • 2
  • 11
-1
votes
2 answers

How to include a huge SQL statement into UTL_FILE procedure?

I wrote a procedure using UTL_FILE: CREATE OR REPLACE PROCEDURE UTL_CREATE_FILE ( output_file in UTL_FILE.file_type, log_file in UTL_FILE.file_type, filename in VARCHAR2 (64), ddate in VARCHAR2 (19), …
May12
  • 2,420
  • 12
  • 63
  • 99
-2
votes
1 answer

Checksum different For Same file Created By Two process

I have one utility in VB which generates attached file(circle.14.mdn_range.properties_VB) & i have created other file(circle.14.mdn_range.properties_UTLFILE) having same contents with UTL_FILE(Oracle). But checksum is different for both the files…
Amit
  • 89
  • 11
1 2 3
10
11