Please Help Me Out of The Error

Hello Everyone,
I am executing the following Syntax to create a procedure which will spool all the data of my employee table and dumped into a Text file. The Procedure is creating successfully, but problem is when I am Executing the Procedure I am getting an error.
The Syntax I am using to create the Procedure is:
CREATE OR REPLACE PROCEDURE dump_emp
IS
file_handle UTL_FILE.FILE_TYPE;
BEGIN
file_handle := UTL_FILE.FOPEN('c:\file_dir\','dump.txt','w');
FOR emp_rec IN (SELECT * FROM MANOJIT.EMPLOYEES) LOOP
UTL_FILE.PUT_LINE(file_handle, emp_rec.emp_id || ',' || emp_rec.ename || ',' || emp_rec.department_id || ',' || emp_rec.salary);
END LOOP;
UTL_FILE.FCLOSE(file_handle);
END dump_emp;
The Error I am Getting when I Execute the Procedure is:
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 98
ORA-06512: at "SYS.UTL_FILE", line 157
ORA-06512: at "SYS.DUMP_EMP", line 5
ORA-06512: at line 1
Please Help me in this matter.

One of the quirks of UTL_FILE is that its execptions are treated by Oracle as user defined - hence the cryptic message. In order to find which error you're getting you'll need to put in an EXCEPTION section and trap the UTL_FILE exceptions - see the docs for details.
I would guess that the problem you're getting is this: your database is on a server and you're trying to write to your client machine (i.e. your PC). You can't do this. PL/SQL is a server-side language and can only see the directories on the database machine. If you want to dump stuff to your local machine you have to use the SQL*Plus spool command, using DBMS_OUTPUT instead of UTL_FILE if you want complex assemblages.
cheers, APC

Similar Messages

  • Please help me out with the function code of print option in module pool

    please help me out with the function code of print option in module pool, along with CASE condition.
    regards,
    asif

    Hi
    you can use the Function module
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        destination            = 'LP01'                       "'Printer name
        list_name              = 'TEST'
        list_text              = 'SUBMIT ... TO SAP-SPOOL'
        immediately            = ' '
        line_size              = '2000'
        no_dialog              = 'X'             "pass space to Pop screen for Print option
      IMPORTING
        out_parameters         = wa_pri_params
        valid                  = w_valid.
    "next call below things
      NEW-PAGE PRINT ON NO DIALOG PARAMETERS wa_pri_params.
         "and try to Print the values inside the new-page
      NEW-PAGE PRINT OFF.
    Prabhudas

  • How to access the activities created by an enduser especially when the enduser has left the organization?Please help me out with the possible solution

    How to access the activities created by an end user especially when the end user has left the organization?Please help me out with the possible solution

    Hi Ramesh,
    In the web UI we have business role IC_manger where you can search the activities based on employee responsible and you can use business transaction assignment functionality to assign those activities to any  other end user or team.
    Else you can also use Agent inbox functionality if you have configure the agent inbox for those activity.
    Hope this helps solving your query

  • Please help me out with this error:Logical dimension table D_TARGET has a source D_TARGET that does not join to any fact source.

    I get the folowing error when I run the global consistency check
    WARNINGS:
    Business Model DAC_Measures:
    [39008] Logical dimension table D_TARGET has a source D_TARGET that does not join to any fact source.
    Can someone help me out please?
    Thank you!

    It seems your dimension is not joined to any facts. Did you check your BMM/physical joins?

  • Please help me out here-the Notes folder.

    Okay, the other day I decided to use the 'Notes' folder on my Apple iPod nano 4GB White English. I followed the instructions as given in the "iPod Features Guide."
    I dragged two text documents, "Why Does God Exist.doc" and "The Retrosexual Code.doc" into the folder.
    NOTE: This is not a storage capacity issue: text documents are in megabytes at the most, and I have at least 3GB left.
    Anyways, I unplugged my iPod and turned it on.
    I went to "Notes" and saw the three things, "Instructions" (obviously) and "Why Does God Exist.doc" and "The Retrosexual Code.doc". I open up "Why Does God Exist.doc" and lo and behold, only the following indecipherable meaningless (to me, at least) string of characters appears:
    Diaj+a, except each of them had the following weirdness:
    D -line through the straight part
    i - to dots
    a - tilly like this: \ over it
    + - it is sitting on top of a line
    a - tilly like this: / over it
    Anyways, if anyone knows what this means, how I can fix it, and how I can put the "Notes" folder to good use, please help.
    Thanks in advance!
    -Kevin_Ahab

    The iPod's Notes feature will only accept plain text files, which have an extension of .txt, not .doc. Use a program such as Notepad to create plain text documents. Only the first 4096 characters of any note will be recognized, and only 1000 notes will be displayed.
    (13729)

  • Can you please help me out with the answers

    u2022     Created a report to display details of the Open Picking Slip for a given Shipping Point and Delivery Date.
    u2022     Developed a report program for stock details in various storage locations. Which displays material number, material group, material description, quantity and plat based on selection screen fields material number and plant number. 
    u2022     Created a ALV to display the customer arrears report. 
    u2022     Developed a BDC program to upload Customer master data from legacy to sap system using Call transaction method.
    u2022     Modification of Standard Sap script layout set for Sales Order output and printed SAP Scripts using print programs.
    u2022     Using SAP Standard Report program RSTXLDMC to upload logo and display it as Standard text

    Mazhar,
    Maintain the hierarchy for the object and in the Hierarchy display properties of that info object you can maintain the levels.
    If the values are appearing in Unassigned then you need to check out the hierarchy definition once. Please check out that and revert back if you have the same issue repeats.
    Hope this helps...
    Regards
    Gattu

  • The computer has rebooted from a bugcheck. Please help to explain what the error is

    The computer has rebooted from a bugcheck.  The bugcheck was: 0x00000050 (0xfffff88803e62ff8, 0x0000000000000001, 0xfffff8800452dbf3, 0x0000000000000002). A dump was saved in: C:\WINDOWS\Minidump\041214-52484-01.dmp. Report Id: 041214-52484-01.

    We do need the actual DMP file as they contain the only record of the sequence of events leading up to the crash, what drivers were loaded, and what was responsible.  
    We prefer at least 2 DMP files to spot trends and confirm the cause.
    Please follow our instructions for finding and uploading the files we need to help you fix your computer. They can be found here
    If you have any questions about the procedure please ask
    If you are using Blue screen view, who crashed, or a similar application don't.  They are wrong at least as often as they are correct
    Wanikiya and Dyami--Team Zigzag

  • Please help me out for this error

    Hi all,
    I am facing one problem when I am running my appliction.
    Cannot find message resources under key org.apache.struts.action.MESSAGE
    jsp code:
    <logic:notEmpty name=+"usersList"+ scope=+"session"+>
    <bean:define id=+"records"+ name=+"usersList"+ scope=+"session"+ type=+"java.util.List"+/>
    <table border=+"1"+>
    <tr>
    <td>User Name</td>
    <td>Marks</td>
    <td>DOB</td>
    </tr>
    <logic:iterate id=+"record"+ name=+"records"+ type=+"com.irc.vo.UserVO"+>
    <tr>
    <td><bean:write name=+"record"+ property=+"userId"+/></td>
    <td><bean:write name=+"record"+ property=+"marks"+/></td>
    <td><bean:write name=+"record"+ property=+"DOB"+/></td>
    </tr>
    </logic:iterate>
    </table>
    </logic:notEmpty>But I am pretty sure that the problem is not with ApplicationResources properties file or something. Because 1) I am not implementing in such a way 2) it was running fine when I removing "center" and "DOB" in my jsp.
    My doubt of this problem is it is not able to render "marks" and "DOB" are not of string type of fields in UserVO.
    Any help in this regard is much appreciable.

    sureshkumargem wrote:
    My doubt of this problem is it is not able to render "marks" and "DOB" are not of string type of fields in UserVO.Even if marks and DOB are not of String types, that should not make any difference. Check whether you have proper getters and setters for them.
    Also check whether you have
    commons-digester.jar
    commons-beanutils.jar
    Along with struts.jar files into the "/WEB-INF/lib" folder of you context root.

  • Hi all, please help me out with the issue...

    Im getting this error ...what should i do to clear this ??
    ORA-12012: error on auto execute of job 5103
    > ORA-02149: Specified partition does not exist
    > ORA-06512: at "SYS.DBMS_SYS_SQL", line 826
    > ORA-06512: at "SYS.DBMS_SQL", line 39
    > ORA-06512: at "SYSTEM.PR_MODIFY_BUFFER_PARTITION", line 16
    > ORA-06512: at line 1

    Rookie#007 wrote:
    Im getting this error ...what should i do to clear this ??
    ORA-12012: error on auto execute of job 5103
    > ORA-02149: Specified partition does not exist
    > ORA-06512: at "SYS.DBMS_SYS_SQL", line 826
    > ORA-06512: at "SYS.DBMS_SQL", line 39
    > ORA-06512: at "SYSTEM.PR_MODIFY_BUFFER_PARTITION", line 16
    > ORA-06512: at line 1
    Did you bother to find any info about the bold text (emphasis is mine) ?
    Aman....

  • Re: Metrics error-Please help me to analyse the error

    Metric=Error Rate (%)
    Metric Value=9.09
    Timestamp=Aug 18, 2010 1:48:35 AM EDT
    Severity=Critical
    Message=The percentage of requests that resulted in errors is 9.09%
    We found errors in the weblogs. Does anyone have any idea of what this is about.
    orclas/esbprd01web01/Apache/Apache/htdocs/g6n4qvwp.htm
    [Tue Aug 17 22:57:11 2010] [error] [client 10.20.130.42] [ecid: 1282100231:10.95.85.44:5814:0:1980,0] File does not exist: /app/oracle/prod/Apache/Apache/htdocs/g6n4qvwp.idc
    [Tue Aug 17 22:57:12 2010] [error] [client 10.20.130.42] [ecid: 1282100232:10.95.85.44:5814:0:1981,0] File does not exist: /app/oracle/prod/Apache/Apache/htdocs/g6n4qvwp.idc
    [Tue Aug 17 22:57:12 2010] [error] [client 10.20.130.42] [ecid: 1282100232:10.95.85.44:5814:0:1982,0] File does not exist: /app/orclas/prod/Apache/Apache/htdocs/g6n4qvwp.x
    [Tue Aug 17 22:57:12 2010] [error] [client 10.20.130.42] [ecid: 1282100232:10.95.85.44:5814:0:1983,0] File does not exist: /app/orclas/prod/Apache/Apache/htdocs/g6n4qvwp.x
    [Tue Aug 17 22:57:12 2010] [error] [client 10.20.130.42] [ecid: 1282100232:10.95.85.44:5814:0:1984,0] File does not exist: /app/orclas/prod/Apache/Apache/htdocs/<script>document.cookie="testobxt=6838;"</script>
    [Tue Aug 17 22:57:12 2010] [error] [client 10.20.130.42] [ecid: 1282100232:10.95.85.44:5814:0:1985,0] mod_wchandshake: incorrect uri: <script>document.cookie="testobxt=6838;"</script> passed in.
    [Tue Aug 17 22:57:12 2010] [error] [client 10.20.130.42] [ecid: 1282100232:10.95.85.44:5814:0:1985,0] Invalid URI in request GET <script>document.cookie=%22testobxt=6838;%22</script> HTTP/1.1
    [Tue Aug 17 22:57:12 2010] [error] [client 10.20.130.42] [ecid: 1282100232:10.95.85.44:26886:0:10576,0] File does not exist: /app/orclas/esbprd01web01/Apache/Apache/htdocs/<meta http-equiv=Set-Cookie content="testobxt=6838">
    [Tue Aug 17 22:57:12 2010] [error] [client 10.20.130.42] [ecid: 1282100232:10.95.85.44:26886:0:10577,0] mod_wchandshake: incorrect uri: <meta http-equiv=Set-Cookie content="testobxt=6838"> passed in.
    [Tue Aug 17 22:57:12 2010] [error] [client 10.20.130.42] [ecid: 1282100232:10.95.85.44:26886:0:10577,0] Invalid URI in request GET <meta%20http-equiv=Set-Cookie%20content=%22testobxt=6838%22> HTTP/1.1

    You need to post this question in HTTP Server/Apache Forum

  • Please help me to fix the error pls-00103

    create or replace procedure proc_exp is
    declare
    v_ename emp.ename%type;
    v_sal emp.sal%type;
    cursror c1 is select ename,sal from emp;
    begin
    open c1;
    fetch c1 into v_ename,v_sal;
    exit when c1%notfound;
    dbms_output.put_line('ename:'||v_ename||'sal:'||v_sal);
    close c1;
    end proc_exp;

    A procedure need not have a DECLARE clause.
    You are opening the cursor but not looping.
    Try this
    CREATE OR REPLACE PROCEDURE proc_exp
    IS
       v_ename        emp.ename%TYPE;
       v_sal          emp.sal%TYPE;
       CURSOR c1
       IS
          SELECT ename, sal FROM emp;
    BEGIN
       OPEN c1;
       LOOP
          FETCH c1
          INTO v_ename, v_sal;
          EXIT WHEN c1%NOTFOUND;
          DBMS_OUTPUT.put_line ('ename:' || v_ename || 'sal:' || v_sal);
       END LOOP;
       CLOSE c1;
    END proc_exp;G.

  • When i burn a disk in Disk Utility, the burn completes but the verification process does not complete and my disk pops out. The error message i get is something like this "burn failed because disk cannot be verified," PLEASE HELP

    when i burn a disk in Disk Utility, the burn completes but the verification process does not complete and my disk pops out. The error message i get is something like this "burn failed because disk cannot be verified," PLEASE HELP.
    Also when i take the disk out it seems fine nd everything seems to be burned onto the disk. I am buring mac os x lion onto a disk.
    The disk i am using is nextech and i am burning at the slowest speed (4x).
    Also this is my 3rd time trying to do this and the verifying process keeps failing.... what do i do?

    see there
    http://www.techmixer.com/best-free-mac-burning-software-for-mac-osx/
    what you like most
    try different brand of CD/DVD

  • Why the modem deconncts frequently with this error message, "You were disconnected by the PPP server. Try reconnecting."? Please, help me out.

    Hello. I am using a ZTE 3G modem. Whenever I connect to internet, Sometimes during browsing or downloading it disconnects with the error message, "You were disconnected by the PPP server. Try reconnecting." There is no problem with the modem. Last few months, I have used it with Mac OS X Mavericks. There was no problem. Some days ago, I downgrade to Mac OS X 10.8.3, because I was fed up with different bugs in 10.9. Anyway, the first two days the connection were fine. But, after that, The problem began from no where. I tryed everything i could, but, It didn't help.
    Please, help me out. It's very disturbing frequanlty disconnection. I am mad at the PPP is like, if I found standing it in front of me, I would beat it with a bat, who gave this so called Mr. PPP permission to disconnect my connection as it's wish!

    Hi I'm having same issue since last week and now unable to reconnect. Not sure if it's an issue with the mobile company, modem or apple .
    Before was able to connect eventually now connects and drops connection after 3 seconds . Using macbookpro early 2014 mavericks all ipdate - modem 4G Huawei
    Haven't found any info to assist us
    Hope someone comes forward soon
    Thanks and good luck !

  • My osx version is 10.8.2. i was buying the facetime app for my mac. i got this error -"FaceTime can't be installed on "Macintosh HD" because the version of OS X is too new." so please help me out of this funny situation.

    my osx version is 10.8.2. i was buying the facetime app for my mac. i got this error -"FaceTime can’t be installed on “Macintosh HD” because the version of OS X is too new." so please help me out of this funny situation.

    https://www.apple.com/support/mac-apps/facetime/

  • Hi, someone please help me out... am Nelson and got an issue with my apple Qmaster... I got OSX maverix and on my system preferences the Apple Qmaster dosent load but only gives an error, someone please help.

    hi, someone please help me out... am Nelson and got an issue with my apple Qmaster... I got OSX maverix and on my system preferences the Apple Qmaster dosent load but only gives an error, someone please help.

    the error is like "Could not load Apple Qmaster preference pane"
    if there is a way around it please help me coz I cannot render my video projects on Compressor anymore...

Maybe you are looking for