ORA-03123 while using UTL_FILE package in oracle forms 10g

hi all,
i have created a directory 'REPORTS' as 'E:\EXCEL_TESTING_FORM\' and give grant read,write this directory to scott.
and also given grant execute on UTL_FILE to scott;
i have written this code in a button-pressed trigger and my file name is somename.xls file
After printing the first line like 7369SMITH3000 in a single cell when it is going to print the second employee record it is showing
ORA-03123 inside the loop.
CURSOR EMP_DATA IS
     SELECT * FROM SCOTT.EMP;
C_REF EMP_DATA%ROWTYPE;
L_FILE UTL_FILE.FILE_TYPE;
V_PATH VARCHAR2(200) := '';
BEGIN
     V_PATH := 'REPORTS';
L_FILE := UTL_FILE.FOPEN (V_PATH,P_FILE_NAME, 'W');
OPEN EMP_DATA;
LOOP
     FETCH EMP_DATA INTO C_REF;
     EXIT WHEN EMP_DATA%NOTFOUND;
          UTL_FILE.PUT_LINE(L_FILE, TO_CHAR(C_REF.EMPNO));
          UTL_FILE.PUT_LINE(L_FILE, C_REF.ENAME);
          UTL_FILE.PUT_LINE(L_FILE, TO_CHAR(C_REF.SAL));
END LOOP;
CLOSE EMP_DATA;
UTL_FILE.FFLUSH(L_FILE);
UTL_FILE.FCLOSE(L_FILE);
please guide me how to avoid that error and also how to print cell wise why because it is print in a single cell.
please reply...

hi Andreas Weiden,
No it is not a network-drive. i have total 0f 3 drives
one is of c drive for wind sp2 and in d i have loaded oracle database and i have created a directory on e drive i.e 'E:\EXCEL_TESTING_FORM\'
in that i have created a excel file i.e called taru.xls.
so i want to know where is the problem.
please reply...

Similar Messages

  • Error while using UTL_FILE package

    I am getting error while using UTL_FILE package in apex 3.0 version
    Pls help me out.

    ok, how are you using UTL_FILE and what is the error?

  • Error while importing java class into oracle forms 10g

    Hi
    I have generated a web service client using jdeveloper 10g. It consists of complex type methods. I am trying to import the class files using java importer in oracle form 10g. I am able import all of them successfully except one. That one is the main method. Please see the error and suggest me how to overcome this error.
    Exception occurred: java.lang.NoClassDefFoundError: oracle/jdeveloper/webservices/runtime/WrappedDocLiteralStub
    Thanks in advance

    Do you see oracle/jdeveloper listed in "Import Java Classes" when you try to import?
    If not, make sure you add C:\DevSuiteHome_1\jdev\lib\jdev.jar to FORMS_BUILDER_CLASSPATH in registry
    Also excetion indicates: oracle/jdeveloper/webservices/runtime/WrappedDocLiteralStub
    If you typing it - type: oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub

  • How to use Java Script in Oracle Forms 10g

    Hello,
    Appreciate if anyone could help me using Java Script in Oracle Forms 10g?
    Thanks
    GM

    Thank you for your reply. I was reading on the metalink that we could use the to call the java script from oracle Forms 10g (Doc ID 265863.1)
    Example:
    WEB.SHOW_DOCUMENT ('javascript:void(window.open("http://www.oracle.com","","location=no,toolbar=no,menubar=no,status=no,"));self.close()','_blank');
    I tried it but it did not open the any window as it claims. Am I missing anything? Is there any IE related setting which I need to modify for the above to work?
    Regards
    GM

  • How to use unicode fonts in Oracle forms 10g?

    Hi I am working in forms 10g for quite a long time, the software that I have developed so far are all in English language. Now I have requirements to use Bengali Fonts in Forms 10g. I am facing difficulties doing that. Please reply with help. Thanks
    Hasan Al Mamun

    Check this forum post (though that is for 6i, it would be of helpful for you)
    How to use unicode fonts in Oracle forms 10g?
    -Arun

  • ORA-02019 while using DBMS_FILE_TRANSFER Package.

    Hi,
    I am trying to transfer the datafiles from 10.2.0.3 database residing on File-system to 11gR2 database residing on ASM. Both the DBs are on Different machines across datacenters.
    I am trying to use Transportable Tablespace to move the data. As a part of it, I am trying to use DBMS_FILE_TRANSFER package to move the 10gR2 files to 11gR2 ASM.
    I am getting the below issue while doing so:
    SQL> exec sys.DBMS_FILE_TRANSFER.GET_FILE('sdir','data01.dbf','tdir','data01.dbf','RECDB');
    BEGIN sys.DBMS_FILE_TRANSFER.GET_FILE('sdir','data01.dbf','tdir','data01.dbf','RECDB'); END;
    ERROR at line 1:
    ORA-02019: connection description for remote database not found
    ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 37
    ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 132
    ORA-06512: at line 1
    Above SQL was executed from Target Host (11gR2) to GET file from 10gR2. The above directory objects point to correct locations on respective hosts.
    RECDB - it is the DB link which is owned by SYSTEM user and will connect to 10gR2 DB as SYSTEM user.
    Strange thing is when i am querying the source 10gR2 DB from Target DB using Db link, IT is WORKING fine
    SQL> select name from v$database@RECDB ;
    NAME
    POCREC01
    Elapsed: 00:00:00.15
    SQL> select * from dual@RECDB;
    D
    X
    Elapsed: 00:00:00.12
    I also have TNS entry in target tnsnames.ora as:
    POCREC01 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = pocserver.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = pocrec01)
    SQL> create database link RECDB connect to system identified by <password> using 'POCREC01';
    Database link created.
    SQL> select * from all_db_links;
    OWNER
    DB_LINK
    USERNAME
    HOST
    CREATED
    SYSTEM
    RECDB
    SYSTEM
    POCREC01
    05-JAN-11
    So, I want help on whether above issue is a BUG with Package (checked in Metalink and cannot find anything) OR am I doing something wrong??
    Thanks

    Can you please use "create public database link " to create the db link as a PUBLIC link and retry.

  • Using DBMS packages in Oracle forms 4.5

    Hi,
    Can DBMS_* packages be used in Oracle forms 4.5?
    If it can be used i would like to have some examples of the same?
    Thanks..

    If you want to display the *.txt file use ole object to do that and if you want to read the data from the text file and display in the text field then use textio package.
    Hope this helps you.
    Regards
    Gaurav

  • Error while using UTP_MAIL package in oracle 10g

    Hi,
    I am using the UTP_MAIL package to send a mail from oracle 10g.
    I hane connected to the database as sysdba,but while setting the SMTP_SERVER_OUTPUT parameter i get the following error.
    SQL> ALTER SYSTEM SET smtp_out_server='blrkecmbx02.ad.abc.com:25' scope=both;
    ERROR at line 1:
    ORA-02095: specified initialization parameter cannot be modified
    Pls help to figure out a solution.

    This parameter is not modifiable, check the Oracle Reference: SMTP_OUT_SERVER Initialization Parameter
    Try the scope=spfile instead of both.
    ~ Madrid

  • Problem while using UTL_FILE

    Hi I am using UTL_FILE package for the first time. Code goes as below
    Line:-----
    create directory test_utl_file as 'C:\ORA File';
    declare
    file_handler utl_file.file_type;
    v_newline varchar2(200);
    begin
    file_handler := utl_file.fopen('test_utl_file','TEST_UTL_FILE.txt','r');
    loop
    begin
    utl_file.GET_LINE(file_handler,v_new_line);
    dbms_output.put_line(v_new_line);
    exception
    when others then
    dbms_output.put_line('-----------------------------');
    dbms_output.put_line('End of line reached');
    exit;
    end;
    end loop;
    utl_file.fclose(file_handler);
    end;
    Line:-----
    Eorror I am getting is
    ORA-06550: line 2, column 14:
    PLS-00201: identifier 'UTL_FILE' must be declared
    But I can access the UTL_FILE package using DESC.
    I am not able to understand the cause of error.

    796298 wrote:
    I am connected to SYSTEM user. Does it still needs to be granted the privilege. If it needs should I connect to SYS and grant the privilege ?Generally it's not a good idea to be producing code in the SYSTEM or SYS schemas. You should only log into those to carry out admin tasks such as granting privileges.
    Once you've granted your use the appropriate privilege to access UTL_FILE package you'll also need to alter a line in your code...
    file_handler := utl_file.fopen('test_utl_file','TEST_UTL_FILE.txt','r');should be...
    file_handler := utl_file.fopen('TEST_UTL_FILE','TEST_UTL_FILE.txt','r');The name of the directory object must be specified in UPPER case as that is the default case for objects created in oracle, and because it's passed as a string parameter to the FOPEN function, the case does matter.

  • Error while using UTL_FILE

    I am getting the following error while using UTL_FILE procedure while using UTL_FILE.FOPEN procedure
    from system account. I am using Windows XP with NTFS.
    SQL> create or replace directory FILE_DIR as 'C:\'
    2 /
    Directory created.
    SQL> grant read on directory FILE_DIR to public;
    Grant succeeded.
    1 create or replace PROCEDURE file_upload IS
    2 v_file_name VARCHAR2(200);
    3 v_file_type UTL_FILE.FILE_TYPE;
    4 v_line VARCHAR2(1000);
    5 BEGIN
    6 v_file_name := 'customers_'||TO_CHAR(SYSDATE,'dd')||TO_CHAR(SYSDATE,'MON')||TO_CHAR(SYSDATE,'YYYY')||'.txt';
    7 v_file_type := UTL_FILE.FOPEN('FILE_DIR','V_FILE_NAME','r',1000);
    8 UTL_FILE.GET_LINE(v_file_type,V_LINE,1000);
    9 UTL_FILE.FCLOSE(v_file_type);
    10 DBMS_OUTPUT.PUT_LINE(V_LINE);
    11* END;
    SQL> exec file_upload;
    BEGIN file_upload; END;
    ERROR at line 1:
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 475
    ORA-29283: invalid file operation
    ORA-06512: at "SYSTEM.FILE_UPLOAD", line 7
    ORA-06512: at line 1
    I appreciate if someone can help me in this regard.
    Thanks in Advance.
    Regards
    Muhammad ALi

    Hello,
    What exactly are you trying to do? Here I got 2 examples for you , replace with your directory name and pick right option for 'a' (append) or 'w' (write) or 'R' (read).
    To read from a directory_ . This will read an existing file 'customer.txt" from the directory
    {code}
    CREATE OR REPLACE PROCEDURE .file_upload
    IS
    v_file_name VARCHAR2 (200);
    v_file_type UTL_FILE.file_type;
    v_line VARCHAR2 (1000);
    BEGIN
    v_file_name := 'customers.txt';
    v_file_type := UTL_FILE.fopen ('EXT_TABLES', v_file_name, 'R');
    UTL_FILE.get_line (v_file_type, v_line); -- Error was here
    DBMS_OUTPUT.put_line (v_line);
    UTL_FILE.fclose (v_file_type);
    END;
    {code}
    _*To open a file*_ This will create customer_XXXXX file under the directory
    {code}
    CREATE OR REPLACE PROCEDURE testme.file_upload
    IS
    v_file_name VARCHAR2 (200);
    v_file_type UTL_FILE.file_type;
    v_line VARCHAR2 (1000);
    BEGIN
    v_file_name := 'customers_'
    || TO_CHAR (SYSDATE, 'dd')
    || TO_CHAR (SYSDATE, 'MON')
    || TO_CHAR (SYSDATE, 'YYYY')
    || '.txt';
    v_file_type := UTL_FILE.fopen ('EXT_TABLES', v_file_name, 'a');
    UTL_FILE.put_line (v_file_type, v_line);
    DBMS_OUTPUT.put_line (v_line);
    UTL_FILE.fclose (v_file_type);
    END;
    {code}
    Regards
    Edited by: OrionNet on Jan 29, 2009 12:30 AM

  • Permissions on files created using UTL_FILE package

    The files created on unix using UTL_FILE package have permisisons rw- - - - - - -.(600). I want them to be created with permissions 640.(rw-r - - - - - ).i.e read access to the group also. The umask setting of the unix account of the oracle instance are 137. Is there any way to create the files with the required permissions.

    So SQL*Plus is on your PC? I'm assuming you mean 'call' as in the windows cmd.exe command?
    Sheesh this is like getting blood from a stone.
    In that case you must be connecting via the listener and not internally.
    In which case the umask comes from the umask that was set in the environment of the OS user who started the listener process.
    Thats not necessarily the same as the owner of the oracle software (normally 'oracle').
    If sysdamin joebloggs logs in and starts the listener manually in a shell, then the umask applied to all shadow processes started by the listener is whatever jobloggs umask was when he typed the command 'lsnrctl start'. The umask of the owner of the oracle software, or your umask, is utterly irrelevent.
    So if you don't like the umask for files created by processes spawned by the listener, stop and restart the listener in a shell where you have explicitly set the umask to what you want it to be.
    Really starting the listener should be scripted and the correct umask is put in the script just before the call to 'lsnrctl start'.

  • Archiving files generated by PL/SQL program using UTL_FILE package

    Dear All,
    We have on PL/SQL package that is generating some data files using UTL_FILE package in one specific directory.
    I am working on concurrent program of type host(unix script) to move generated file to some archive folder.
    Now the problem is owner of the files generated by PL/SQL is oracle and file permissions of the generated files are 644(Only read permission for group and others).
    Concurrent program is using an another os user applmgr to execute the script attached with concurrent program.
    Because applmgr is not having write permission on the files, hence mv command is failing.
    Please suggest me how to resolve this issue.
    Regards
    Devender Yadav

    Hi;
    I just think that, you can create one sh which is chancing permission of related path owner for applmgr user and put it on crontab and it can run every 1 min.
    Regard
    Helios

  • Create a file and store it in the database using UTL_FILE package

    Hello.
    I'm using UTL_FILE package to store data from a table into an excel file but I don't know how to store this file in a table with a BLOB field the database at the same time. I want do do this because I will use it in a Oracle Portal.
    Anybody has any idea how to do this?
    Thanks & Regards,
    Alexandra

    From Asktom
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:232814159006

  • Getting Error while using  LKM File to Oracle(SQLLDR) KM in ODI

    Hi All ,
    Could anyone please help me out on this error which i am getting while using LKM File to Oracle(SQLLDR)
    My Scenario :
    1. I have my CSV file created in one location with some records .
    2. Created a new interface having this CSV file as source(File Technology) and Table as target (Oracle technology)
    3. Here i want to get the contents from csv and store into the target table by using SQLLDR .For that i am using this KM- LKM File to Oracle(SQLLDR)
    4. By Executing the Interface i am getting following error at step 6 -call sqlldr
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
      File "<string>", line 22, in <module>
    Load Error: See E:\demo1\file/SALES.log for details
      at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
      at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
      at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
      at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
      at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
      at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)
      at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
      at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
      at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
      at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
      at java.lang.Thread.run(Thread.java:662)
    Caused by: Traceback (most recent call last):
      File "<string>", line 22, in <module>
    Load Error: See E:\demo1\file/SALES.log for details
      at org.python.core.PyException.fillInStackTrace(PyException.java:70)
      at java.lang.Throwable.<init>(Throwable.java:181)
      at java.lang.Exception.<init>(Exception.java:29)
      at java.lang.RuntimeException.<init>(RuntimeException.java:32)
      at org.python.core.PyException.<init>(PyException.java:46)
      at org.python.core.PyException.doRaise(PyException.java:219)
      at org.python.core.Py.makeException(Py.java:1166)
      at org.python.core.Py.makeException(Py.java:1170)
      at org.python.pycode._pyx2.f$0(<string>:59)
      at org.python.pycode._pyx2.call_function(<string>)
      at org.python.core.PyTableCode.call(PyTableCode.java:165)
      at org.python.core.PyCode.call(PyCode.java:18)
      at org.python.core.Py.runCode(Py.java:1204)
      at org.python.core.Py.exec(Py.java:1248)
      at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
      at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
      ... 19 more
    Here the sales.log file is not created in the above directory .I am not getting  where it is actually went wrong.
    I searched for the solution and i could not find any.Please help me out as it is high priority for me.
    I tried to run SQL*Loader through command prompt and i am able to generate the data in the target table and not getting it through ODI.
    Atleast is there any workaround .Please suggest me.
    Environment Details: ODI_11.1.1.7.0, Oracle DB 11g
    Thanks,
    keerthi

    Which agent are you using to execute?
    Standalone? If standalone, did you start it with OPMN?  I've seen such issues with standalone agent started with OPMN.
    Generally these kind of issues occur when you try to run with standalone agent started with OPMN.
    Because OPMN does not have access to the environment shell variables PATH or ORACLE_HOME and therefore the sqlldr.exe binary (or other Oracle product binary) is not found for execution.
    In this case, you need to specify PATH and ORACLE_HOME variables in opmn.xml file like below for your agent(say "MyStandaloneAgent" in this case)
    <ias-component id="MyStandaloneAgent">
    <process-type id="odiagent" module-id="CUSTOM">
      <environment>
         <variable id="ORACLE_HOME" value="C:\oracle\product\11.2.0\client_1"/>
          <variable id="PATH" value="C:\oracle\product\11.2.0\client_1\BIN;$PATH"/>
    After that, start and stop the agent and try the execution once again.

  • Need to generate the excel file with diffrent sheets using utl_file package

    Hi,
    Sorry for previous message in which I had missed the usage of " UTL_FILE " package
    I need to generate the excel file with diffrent sheets . Currently I am generating the data in three diffrent excel files using
    " UTL_File " package and my requirement is to generate this in a single excel file with diffrent sheets.
    Please help on this
    Thanks & Regards,
    Krishna Vyavahare

    Hello 10866107,
    at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the packages behind second and fourth link support more than one worksheet.
    Regards
    Marcus

Maybe you are looking for

  • Error: sync audio & midi

    Hi, I've searched the forum and it seems that a lot of people are having this problem - although I haven't found a solution. I am getting the following error message: "Error while trying to sync audio and midi. Sample rate 42572 recognized. Check con

  • Use Applescript to have Quicktime record audio

    I need to record and store an audio file of approximately 20 minutes in length in Filemaker Pro 13. I thought I could use Applescript to Launch Quicktime to do the recording, then tell Quicktime what folder to store it in as an MP3 file. I can't seem

  • VL10B delivery creation

    Hi While creating delivery with reference to Stock transport order with TCode Vl10B the delivery is created without any line items and no error is thrown. Stock is also available in mb52 for the supplying plant and storage location. We are creating S

  • EO line in the city can I move to a pcp?if so how?

    Hi,I live in portsmouth in the east of the city and am connected ug to a EO line.My broadband speeds are around 2/4mbps as I'm some distance from the exchange.Im a aware of 3 pcps within 200m of my house that are FTTC ready with spare ports.Is it pos

  • Instance status "BLOCKED" and ora-12528

    Oralce 10.2.0.1 -- SUN SPARC 10 64bit instance is in nomount state, can connect using "sys/passwd@string as sysdba" on node 1 but unable to connect from 2nd node. following error received. Node:2 connect sys/passwd@string as sysdba; ERROR: ORA-12528: