Unable to write files in different m/c in LAN using utl_file package

I need to dump some files generated by utl_file package in a separate m/c not in the db server.For that I tried using utl_file_dir='*' and mapped the specified directory in the db server. but its failing as show below..
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 449
ORA-29283: invalid file operation
ORA-06512: at "ANIRBAN.WRITE_IN_FILE", line 9
ORA-06512: at line 1
The prototype sp is given below..
CREATE OR REPLACE PROCEDURE write_in_file(pInDir IN VARCHAR2,
pInFileName IN VARCHAR2,
pInFileContent IN VARCHAR2) IS
vFile UTL_FILE.FILE_TYPE;
vFileName VARCHAR2(20) := pInFileName;
BEGIN
dbms_output.enable(1000000);
vFile := UTL_FILE.FOPEN(pInDir, vFileName, 'w', 32000);
UTL_FILE.PUT_LINE(vFile, pInFileContent);
UTL_FILE.FCLOSE(vFile);
END write_in_file;
With this sp i'm able to write in genuine drives but not in mapped one.What shall be done to be able to write in a separate m/c freely.Plz guide me

And make sure you specify the full path name of the server/directory path rather than using substituted drive names as is can sometimes be funny about that sort of thing.

Similar Messages

  • 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

  • Error Log entry Unable to write file with XML Saver

    Hi all,
    I have just encountered the following problem. I am saving a XML file using the XML Saver. Another BLT reads the file, changes something, and saves it again with the same name.
    The file is saved, but the NetWeaver SAP Log gives the error
    "Unable to write file /usr/sap/<SID>/JC00/j2ee/cluster/server0/apps/sap.com/xappsxmiiear/servlet_jsp/XMII/root/CM/<folder>/file.xml"
    Is it a problem with the new storage mechanism in MII 12? Even if I delete the file first and then save it again with the same name, the error is displayed (though the file is saved).
    Michael

    Hi Mike,
    no, the Debug only says "Begin Action XML Saver" and "End Action XML Saver".
    The action however writes the file, the contents has changed after the BLT has run.
    Well, I have just tried the Text Saver with the same file (name and contents). It also gives the error. I now wanted to delete the folder. The folder disappered from the workbench view, and the Netweaver log says "Unable to process service message".
    I then clicked "publish" on the parent folder and tried to create the folder again, but although the folder was not displayed, the workbench said "the folder already exists". When I start my BLT, it could write the file into the folder which then reappeared in the workbench.
    Hm, maybe our installation has some problems? Feels like missing authorizations...
    Michael

  • XMII 12.0: Unable to write file...

    Hi all,
    lately we are facing some problems using xMII. One point is that you can easily move file or folder inside the xMII 12.0 workbench because there is no confirmation popup when clicking on a folder and move it by chance.
    Apparently I have moved a folder, and it seems that I produced a Catalog Server Error according to the log. Now xMII seems to be confused, because we are now getting lots of error of the kind "Unable to wirte file..." like this:
    Unable to write file D:\usr\sap\MES\JC00\j2ee\cluster\server0\apps\sap.com\XMIIEnterpriseApplication\servlet_jsp\XMII\root\CM/Development/USER/xml/treestructure.xml
    Have you already encountered such an error? Is it because of the "/" and "\" signs that are mixed inside the URL? Or could it be the Catalog Error mentioned above?
    Thanks for a hint!
    Best regards
    Michael

    Jeremy,
    we are using xMII in combination with Adobe Flex. So xMII is going to talk to the database, and Flex as the presentation layer is calling xMII transactions to get the data.
    The HTML wrapper that Flex creates and the SWF-Files are stored in the CM folder of xMII so that we can include it in the xMII Portal using the navigation wizard of xMII.
    In xMII we have set up a sandbox project, so the file structure in xMII is "xMII-Root\Sandbox\Data" (Catalog) and "xMII-Root\Sandbox\WEB\Data" (Web).
    When using the xMII workbench we are importing the SWF-Files into "xMII-Root\Sandbox\WEB\Data". In Flex-Builder we have set up an ant-file that deploys the SWF-Files directly into the "xMII-Root\CM\Sandbox\Data" folder after changing them. However, when only using the ant file, the copied files are gone the next day, when the WebAS restores the contents, I guess.
    Using the ant files of course is much easier than using the import feature of the workbench. Maybe you can recommend a better way of deploying?
    Best Regards
    Michael

  • 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

  • Creating Error log files using UTL_FILE package on a remote machine

    Database Version: 10g Release2
    OS Platform: Sun Solaris
    I have been asked to log errors to OS files rather than tables. So, i wanted to use UTL_FILE package. But the client doesn't want to store these files on the same server where the database is running(as specified in UTL_FILE_DIR). Is there a way i could get these files created on a remote machine(client).

    I believe what others are suggesting is that your stored procedure continues to log to a table and a separate process be created that runs on the machine you want the file to be created on which reads the log table and writes to a log file.
    If that is not an option, can you expose the directory on the remote machine you want to write the file to as a file share that can be mounted by the database server? If you can, you could write errors there using UTL_FILE. However, it would probably be a bad idea. If you're logging an error already, that implies that something has gone wrong. Making an error logging process dependent on a remote server being available and properly mounted with appropriate privileges at the instant the error occurs just creates more sources of failure that would prevent you from logging an error, which would prevent you from being able to debug the problem or even know it existed without a report from a user.
    Justin

  • 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

  • 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'.

  • Writing files using UTL_FILE package

    Greetings:
    I'm attempting to write simple text files on the server side using the UTL_FILE package.I can get it to write the file to a local drive on the Oracle server with no problems, but not a network drive. When trying to write to a network drive, the FOPEN function raises the UTL_FILE.INVALID_OPERATION exception. This is even with my UTL_FILE_DIR parameter set the * for all directories and I have "Full Control" permission on the directory. I am running in a NT Server/Wkstn environment. Anyone have any ideas why I can't write a file to a network drive?
    Thanks a lot,
    Chris Scopp

    Thanks for your response...
    I have set the UTL_FILE_DIR parameter... I've tried setting it to the * for all directories and also mapping a drive letter from the server to where I want to write the file and then explicitly naming this path in the UTL_FILE_DIR parameter. Neither works, I still get the INVALID_OPERATION exception raised on the FOPEN function. I'm convinced now that it does have something to do with NT because I have been able to do the same operation writing to a Win95/98 box and it works fine. I have "Full Control" to all places I'm trying to write to, any other ideas?
    Thanks a lot,
    Chris Scopp

  • Having problem in recognising file using utl_file package..

    Hi,
    I am using utl_file utility to read the CSV file, utl_file.fopen function is useed to open file. This fopen function has three input parameters, second parameter is file name. My problem is that, i have to read file on daily basis. File name will be like:- DDMMYYYYHHMISS. Last six characters are for hour minute second of the file generation time. If the name has only DDMMYYYY then I can give the file name like TO_CHAR(SYADATE,'DDMMYYYY'), because on a particular date its same for the whole day. But hours, minutes and seconds will be of the time when the file is generated, it may be different for different days. In this condition how can I standardize the value for file name parameter in fopen function.
    Thanks in advance.

    Bharat Kaushik wrote:
    Actually.....
    I am gettting file from some other place..... And those people are not agreed to send file without exact time.JAVA solution is here
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7506780031005
    Or if you want PL/SQL .. (May Be kiddy)
    --Please Note: SYSDATE is 26th in our DB.
    SQL> declare
      2   fp utl_file.file_type;
      3   dt date := trunc(sysdate);
      4  begin
      5   while (dt <= sysdate) loop
      6    begin
      7      fp := utl_file.fopen('OGL_REPORT_ACCESS','TEST'||to_char(dt,'ddmmyyyyhh24miss')||'.csv','r');
      8      dbms_output.put_line('TEST'||to_char(dt,'ddmmyyyyhh24miss'));
      9      utl_file.fclose(fp);
    10      exit;
    11    exception
    12     when utl_file.INVALID_OPERATION then
    13      null;
    14    end;
    15    dt := dt + 1/24/60/60;
    16   end loop;
    17  end;
    18  /
    TEST26042009010102
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:03.45
    SQL> select sysdate from dual;
    SYSDATE
    26-APR-09

  • Reading all files on directory using "utl_file" package...

    I need to read all files in directory via PL/SQL. I don't know
    name files (are data dynamics create for automation system),
    only I know your extensions.
    Can I do this using the package "utl_file" or I need to create
    program in another language (C, C++, for example)?
    Any ideas...
    Thanks.

    Hi,
    you can't do that with the UTL_FILE package (it can't retrieve
    file names).
    A very simple solution would be, if you created on OS-level a
    file which contains the filenames of directory and then read this
    file using UTL_FILE. With the information on all file names you
    can enter a loop which opens and reads all files again using
    UTL_FILE.
    A more mundane solution could be to use the features on the iFS.
    Cheers
    Gerald

  • Write file in different fonts

    how can i write a text file using more than one fonts or can i write some text in bold and some text in normal font.

    is it to open with word? or just in your java
    application?
    cuz you could use html to save the file and view it
    as a html file?yes, the file has to be opened in word and the end user will edit that file and my application will use it again later on.

  • Unable to delete file from trash because it's "in use" not locked.

    I'm unable to delete a file from trash. I keep getting the following message: "The operation can’t be completed because the item is in use."  I've confirmed the file isn't locked and I've tried renaming it but still no luck. I'm running OSX 10.8.4. Any thoughts?

    Check the 'More Like This' discussions on the right hand column.  I suspect you may find the answer there.
    Ciao.

  • How to achieve Incremental deployment of Code Files to different environments of windows azure using TFS and Visual Studio ?

    Hi
    We are new to Windows azure and are developing a web application. In the beginning of the project , we have deployed complete code using Sitefinity Thunder to different environments which actually publish complete code. But now as we are in the middle of development
    , we are just required to upload any new files created which can be quite less in numbers (1 or 2 or maybe few). Now if we deploy with thunder , it publishes all files and then deploys complete code which takes good amount of time. Hence we are thinking to
    attach each Azure Cloud Service which is actually a different environment like staging, UAT to a TFS branch and then just check in code from local development machine to TFS and then deploy only checked in files to azure environment linked to TFS.
    I hope this possible but if you can help send some links where I can see how to achieve this , that will be helpful. 
    Also I would like to know whether a single cloud service can be linked to a single TFS branch or multiple cloud service can be linked to a single TFS repository? Why I am asking is – because we want to deploy a checked in files revision number to a staging
    cloud service and then will test there and then if everything works well then will be required to deploy these revision files to the next cloud UAT cloud service and then production cloud service. Please help.

    Hi,
    We can use TFS to manage our azure cloud service application code, refer to the following to get more information about how to deploy sitefinity to azure.
    #http://www.sitefinity.com/documentation/documentationarticles/manually-deploying-your-project-to-windows-azure
    #http://www.youtube.com/watch?v=E2aZ7lE1JUA
    #http://www.sitefinity.com/documentation/documentationarticles/sitefinity-azure-configuration
    If any question about sitefinity, please redirect to sitefinity forum:
    http://www.sitefinity.com/developer-network/forums if the issue was related with azure, welcome to post again.
    Best Regards
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unable to send file in binary mode to ftp server using AIR application

    Hi,  Can any one help me. i am trying to send local files to ftp server  in binary mode from AIR application using sockets.
    I cant use PASV mode for this FTP server because security restrictions. when i am trying to send Binary command i am always getting
    error code 500 which is unrecognized command. I googled for solutions but i cant find any one using Binary mode to send data every example is using PASV mode to send
    file.
    code example:
    private function upload():void{
    sendCommand("binary ");
    private function sendCommand(arg:String):void {
                                            arg +="\n";
                                            s.writeUTFBytes(arg);
                                            s.flush();
    in response i am getting unrecognized command.

    I'm successfully using an ftp example from http://http://projects.maliboo.pl/FlexFTP/
    that I converted to spark and uses a popup progress window.
    If you don't need to use sockets I can post a sample project.
    I believe I still connect with PASV, but have no problems sending Binary files.
    I don't think they're commands that are dependent on each other

Maybe you are looking for

  • CASH VOUCHER

    Hi All I am using a PLD to make a cash/Bank Voucher  report.If the payment is made in cash i need to show the cash account but when i ma pulling the value from cashAcct column under cash tab in payment means  its showing me 161000  i.e G/L Code inste

  • 11.1.5.5 cd import crashing

    Hello, I just updated iTunes to 11.1.5.5 and wish now I didn't.  I am trying to import a CD (Queen:  Greatest Hits I,II and III).  It will import may two to three songs, then crashes.  I open up in safe mode, put cd in tray, iTunes crashes.  I have d

  • Burning a DVD with interactive content

    I know parts of my question have been answered in previous posts, but there are parts I can't find the answer to. So here goes... I'm creating a traditional DVD. I want to add content that is accessible from a PC/Mac. The interface will be HTML so th

  • Help! Power-off Recovery

    Brand new to iMac and I screwed up already. I put my iMac to sleep with a number of items still open, specifically a Numbers doc and my iTunes. I then unplugged my iMac to move it (without shutting down) and then it froze when I turned it back on and

  • Duplicate photo removal

    how can i find and remove duplicate photos from iPad AIR on ios8?