473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

error in code UTL_FILE

hello

I have got this error.
ORA-06550: line 2, column 5:
PLS-00201: identifier 'UTL_FILE' must be declared
ORA-06550: line 2, column 5:
PL/SQL: Item ignored
ORA-06550: line 5, column 4:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 5, column 4:
PL/SQL: Statement ignored
ORA-06550: line 6, column 22:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 6, column 4:
PL/SQL: Statement ignored
ORA-06550: line 7, column 20:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 7, column 4:
PL/SQL: Statement ignored
..................................................


I am writting this code

Please tell me what mistake I have made

Expand|Select|Wrap|Line Numbers
  1.  
  2. DECLARE
  3.   f UTL_FILE.FILE_TYPE;
  4.   s VARCHAR2(200);
  5. BEGIN
  6.    f := UTL_FILE.FOPEN('c:\Documents and Settings\joshipr\Desktop\New Folder','data.txt','R');
  7.    UTL_FILE.GET_LINE(f,s);
  8.    UTL_FILE.FCLOSE(f);
  9.    DBMS_OUTPUT.PUT_LINE(s);
  10. END;
  11.  
Please help me urgent guys.
Dec 12 '12 #1

✓ answered by helparod

Hi,
First try checking if you user which you're executing the query has permission to execute utl_file:

select *
from dba_tab_privs
where table_name like 'UTL_FILE';

if your user doesnt appear, you have to grant permission in this way:

grant execute on sys.utl_file to <user/public>;

Let me know if it works for you.

Helen.

1 7965
Hi,
First try checking if you user which you're executing the query has permission to execute utl_file:

select *
from dba_tab_privs
where table_name like 'UTL_FILE';

if your user doesnt appear, you have to grant permission in this way:

grant execute on sys.utl_file to <user/public>;

Let me know if it works for you.

Helen.
Dec 12 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike Fisher | last post by:
I'm seeing an error when I try to run/debug a web service. Although it doesn't happen every time, it does occur more than half of the times I hit F5. It appears to be returned by the the JIT...
1
by: timVerizon | last post by:
Hoping someone can help here.. Our application (C#.Net) was receiving IBM.Data.DB2.DB2Exceptions ERROR SQL0904N Unsuccessful execution caused by an unavailable resource. Reason code: '', type...
3
by: Antoine | last post by:
Hello, I'm writing a program to send requests to my wlan pocket pc device (UIO1: driver) in C#. Here how I import CreateFile functions from coredll.dll with DllImport: public static extern...
5
by: frazer | last post by:
hi i want to get the error code when an error occurs. is catch(Exception ex) { ex.GetHashCode() //will this return a unique number for every error? }
1
by: Razzie | last post by:
Hi all, I was working on a little project, worked fine, but now all of a sudden I get: The compiler failed with error code -1073741502 as an error message (when running the site, not...
2
by: Roger Wang | last post by:
HELP!!!! We have got a W2k server running IIS5 with .NET framework 1.1 and .NET framework SP1. All ASP.NET applications cannot run on this box. It all returned with the same error: ...
2
by: mike_li | last post by:
On Window 2000 Professional Server DB2 UDB Level: DB2 code release "SQL07029" with level identifie "030A0105" and informational tokens "DB2 v7.1.0.98", "n040510" and "WR21337". In the...
1
by: delusion7 | last post by:
Trying to create a table and insert records from a webform and I keep getting this message: "Successfully created the registration table. Unable to execute the query. Error code...
4
by: Pool | last post by:
I tried to connect DB2 (Sitting in Unix server at my client location) using Db2 connect V8. I am getting the following error message. I tried all the possible options BUt the error is same.. See each...
2
by: sareena | last post by:
There is a problem with accessing an ASP appln hosted on a dedicated Win '03 load balanced server running IIS 6.0 in worker process isolation mode. When the user types in the URl of the appln and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.