Unable to remove *.log files using utl_file.fremove

Hi,
I want to remove .log files using the below command
I want to remvoe all the *.log files but its remvoing only one .log file
utl_file.fremove(location => dir_name, filename => log_file_name);
Any help will be needful for me

In the documentation for your unknown version of oracle you can view the definition of utl_file.fremove.
Everywhere it states utl_file.fremove removes a file, not 1 or more, and the documentation doesn't discuss the use of wildcards.
It seems like the question could have been prevented by reading docs (which almost no one here does), and you need to use Java to address your requirement.
Personally I wouldn't misuse Oracle to perform O/S tasks.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Unable to read the file using UTL_FILE Dir

    I need to read/write a file from/to the operating system through PLSQL Package. I used UTL_FILE package to do the same. In the application server the utl_file_dir(/usr/tmp in my system) is created as a softlink to database server.
    oI want to run this package through the application server. However I am unable to read and write the file to the operating system.
    I just wondering it is not reading/opening the file from the server. Please suggest me how to modify my code.

    Hi,
    How to check if it is end of file or not? I have the following function which is working fine in my win2003 server std 32bit and Oracle10g Database R2 Standard Edition one 32bit. HOwever, when I deploy to production server which is 64bit OS and database, it gives error at UTL_FILE.GET_LINE(fptr, tmp);
    Any idea why it behaves like that?
         FUNCTION readFile (
              inHTML OUT CLOB,
              path IN VARCHAR2,
              htmlFile IN VARCHAR2
         ) RETURN BOOLEAN IS
         fptr utl_file.file_type;
         tmp VARCHAR2(5023);
         bufferlen BINARY_INTEGER;
         BEGIN
              fptr := UTL_FILE.FOPEN(path, htmlFile, 'r');
              DBMS_LOB.CREATETEMPORARY(inHTML, TRUE);
              DBMS_LOB.OPEN(inHTML, DBMS_LOB.LOB_READWRITE);
              LOOP
                   UTL_FILE.GET_LINE(fptr, tmp);
                   if tmp is not null then
                        tmp := tmp || CHR(10);
                        bufferlen := LENGTH(tmp);
                        DBMS_LOB.WRITEAPPEND(inHTML, bufferlen, tmp);
                   end if;
              END LOOP;
              WHEN NO_DATA_FOUND THEN
              DBMS_LOB.CLOSE(inHTML);
                   UTL_FILE.FCLOSE(fptr);
                   RETURN TRUE;
              WHEN OTHERS THEN
                   DBMS_LOB.CLOSE(inHTML);
                   DBMS_LOB.FREETEMPORARY(inHTML);
                   RETURN FALSE;
         END readFile;

  • 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

  • How to remove log file on maxdb

    Hi,
    I have installed IDES ECC 5.0 on MaxDB 7.5. I have 4 files size of 1 GB and I would like to remove it.
    Is it possible to remove log files without Complete Data Backup procedure in Database Manager?
    Is it helpfull to switch database in Overwrite Log Mode?
    We use a testing sistem without needs for recovery procedures.
    Regards,
    Aleksandar

    Hi,
    you should not delete the logvolumes.
    For your case it would suffice to switch on the auto-overwrite mode of the log.
    You can do this most conveniently by using the Database Manager GUI.
    1. Put the DB instance in state ADMIN
    2. Goto 'COnfiguration' -> 'Log Settings'.
    3. From the wizard select 'Overwrite Mode...' and follow the described follow-ups.
    Kind regards,
    Roland

  • About unable to initialize log file!

    Hi,
    I insatll the Sun Java communications suite 5 in one linux host.
    When I restart web server, I got the following error, would you please give me a hand ?
    Thank you in advance.
    *# /var/opt/sun/webserver7/https-comms.swabplus.com/bin/stopserv*
    server has been shutdown
    *# /var/opt/sun/webserver7/https-comms.swabplus.com/bin/startserv*
    Sun Java System Web Server 7.0 B12/04/2006 08:17
    warning: CORE3283: stderr: Java HotSpot(TM) Server VM warning: Can't detect initial thread stack location - find_vma failed+_
    info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_09] from [Sun Microsystems Inc.]
    info: WEB0100: Loading web module in virtual server [com5.my.com] at [amserver]
    warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    info: WEB0100: Loading web module in virtual server [com5.my.com] at [ampassword]
    warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    info: WEB0100: Loading web module in virtual server [com5.my.com] at [amcommon]
    warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    info: WEB0100: Loading web module in virtual server [com5.my.com] at [amconsole]
    warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    info: WEB0100: Loading web module in virtual server [com5.my.com] at [da]
    info: WEB0100: Loading web module in virtual server [com5.my.com] at [commcli]
    info: url: jar:file:/opt/sun/mfwk/share/lib/mfwk_instrum_tk.jar!/com/sun/mfwk/config/MfConfig.class
    info: url: jar:file:/opt/sun/mfwk/share/lib/mfwk_instrum_tk.jar!/com/sun/mfwk/config/MfConfig.class
    info: LogFile is: //var/opt/sun/mfwk/logs/instrum.%g_
    warning: Warning: unable to initialize log file!+_
    warning: Couldn't get lock for //var/opt/sun/mfwk/logs/instrum.%g+_
    info: group = 227.227.227.1, port = 54320
    info: Set Time-to-live to 0
    info: join Group /227.227.227.1
    info: Starting listening thread
    info: sends initial RESP message in SDK
    info: HTTP3072: http-listener-1: http://com5.my.com:80 ready to accept requests
    info: CORE3274: successful server startup

    This happens when you install web server as "non-root" and start the instance as "root".
    If you can avoid this, you can get around of
    warning: CORE3283: stderr: Java HotSpot(TM) Server VM warning: Can't detect initial thread stack location - findvma failed_*
    The cause for log file initialization problem appears to be some permission problem.
    Can you get back once you take care of what suggested above.

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • Concatenating file using utl_file pkg.

    Hi ,
    I have files generated every 10 mins. I have to concatenate all these files for every 5 hours and distribute that file to client locations.
    can u plz. tell me is it possible to concatenate small but huge number of files
    using utl_file package.
    Help needed !!
    Thanks in advance

    Hi Guido
    Thanks for the reply ..
    But can i call this shell script from oracle procedure ...
    As i have this files in DB server and i don't have my java there ...
    I have to invoke this shell script from oracle ...

  • Display data in log file using PL/SQL procedure

    Just as srw.message is used in Oracle RDF Reports to display data in log file in Oracle Apps, similarly how it is possible to display data in log file using PL/SQL procedure?
    Please also mention the syntax too.

    Pl post details of OS, database and EBS versions.
    You will need to invoke the seeded FND_LOG procedure - see previous discussions on this topic
    Enable debug for pl/sql
    https://forums.oracle.com/forums/search.jspa?threadID=&q=FND_LOG&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    HTH
    Srini

  • How to write to log files using java files from JSP

    Anybody knows different options in writing to log files using JSP?

    Do you have an example?in the init() method of the servlet put the following
            FileOutputStream out = new FileOutputStream("your-log-file");
            PrintStream ps = new PrintStream(out);
            System.setOut(ps);
            System.setErr(ps);load the servlet on startup using <load-on-startup> in web.xml

  • Unable to check-in file using CHECKIN_UNIVERSAL in UCM11g through SOA

    Hello all,
    I am unable to checkin/uploading files using CHECKIN_UNIVERSAL in UCM 11g through SOA. I am getting below error:
    error">Error: java.lang.NullPointerException
    Below are invoke operation that I am using:
    <messages>
    <Invoke_Generic_Soap_Port_Ref_GenericSoapOperation_InputVariable>
    <part  name="GenericRequest">
    <GenericRequest  webKey="cs">
    <tns:Service  IdcService="CHECKIN_UNIVERSAL">
    <tns:Document>
    <tns:File  name="primaryFile"  href="/u01/app/oracle/ftp/test/Test_UCM_Upload.txt"/> 
    </tns:Document>
    </tns:Service>
    </GenericRequest>
    </part>
    </Invoke_Generic_Soap_Port_Ref_GenericSoapOperation_InputVariable>
    <Invoke_Generic_Soap_Port_Ref_GenericSoapOperation_OutputVariable>
    <part  name="GenericResponse">
    <ns2:GenericResponse  webKey="cs">
    <ns2:Service  IdcService="CHECKIN_UNIVERSAL">
    <ns2:Document>
    <ns2:Field  name="error">Error: java.lang.NullPointerException</ns2:Field> 
    </ns2:Document>
    </ns2:Service>
    </ns2:GenericResponse>
    </part>
    </Invoke_Generic_Soap_Port_Ref_GenericSoapOperation_OutputVariable>
    </messages>
    Can anyone help me out please.
    -Ayan

    Hi TDN,  
    Thanks for your post.
    You’re using TFS 2013 Update 4 and VS 2013 Update 4?
    According the error message, it seems TFS Server think this file is not changed.
    After step 8, if there’s the edited icon shows on your testfile1.txt in Source Control Explorer?
    Please click Refresh button in your Source Control Explorer, then re-edit your testfile1.txt file and try check-in again.
    And try to reproduce this scenario on your another client(VS 2013 installed), check if this issue can be reproduce on another client or not.
    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.

  • How to read HTML files using UTL_FILE

    Hello Friends,
    How to read HTML files using UTL_FILE package ? According
    to Oracle documentation UTL_FILE can read or write OS Text Files.
    Thanx in advance..
    Adi

    HI Hareesh,
    i have gone through that blog.
    i tried it...but i am getting mapping error  no receiver determination fond because there are so  many excel files.
    my data is available on sharedString.xml but also it is in not same order.
    i have no clue how to handle this part form the blog.
    "This way our mapping will receive all data from the sheet in an XML format. The only thing that's left is to create an XSD file from the XML file we received in order to be able to use it in the mapping and as our Service Interface and we can proceed with mapping. As you can see from the sheet.xml files all the data is placed with column name and row number so it's not that difficult to map it to an table type format using the Message Mapping only (no java, abap mapping required)."

  • KUP-04063: unable to open log file.. (while selecting from External table)

    Hi
    I am trying to craete an external table and then select the data from the table. However I am getting error while trying to select the data from external table.
    SQL>CREATE OR REPLACE DIRECTORY my_dir as 'C:\arun';
    Directory created.
    SQL>GRANT ALL ON DIRECTORY my_dir TO PUBLIC;
    Grant succeeded.
    SQL>DROP TABLE proj_checklists_external;
    Table dropped.
    SQL>CREATE TABLE proj_checklists_external
    2 ( checklist_submission_id NUMBER
    3 ,Lead_reviewer_name VARCHAR2(30)
    4 ,Lead_reviewer_corp_id VARCHAR2(10)
    5 ,creation_date VARCHAR2(10)
    6 ,submitted_dater VARCHAR2(10)
    7 ,approved_date VARCHAR2(10)
    8 ,status VARCHAR2(50)
    9 )
    10 ORGANIZATION EXTERNAL
    11 (
    12 TYPE ORACLE_LOADER
    13 DEFAULT DIRECTORY my_dir
    14 ACCESS PARAMETERS
    15 (
    16 RECORDS DELIMITED BY NEWLINE
    17 FIELDS TERMINATED BY ','
    18 )
    19 LOCATION ('Book1.txt')
    20 )
    21 PARALLEL 5
    22 REJECT LIMIT 200;
    Table created.
    SQL>SELECT * FROM proj_checklists_external;
    SELECT * FROM proj_checklists_external
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: unable to open log file PROJ_CHECKLISTS_EXTERNAL_28484.log
    OS error No such file or directory
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    I craeted an file PROJ_CHECKLISTS_EXTERNAL_28484.log also in C:\arun and then tried to select but still got same error.
    Any idea how to overcome this error.
    Regards
    Arun

    here you go:
    SQL> CREATE OR REPLACE DIRECTORY GRATIS_LOAD as 'D:\AdvSourceData\Membership\';
    Directory created
    SQL> GRANT ALL ON DIRECTORY GRATIS_LOAD to ADVROLE;
    Grant succeeded
    SQL>
    SQL> DROP TABLE MEMB_BATCH_LOAD_ID;
    Table dropped
    SQL> CREATE TABLE MEMB_BATCH_LOAD_ID (
    2 ID_NUMBER VARCHAR2(10),
    3 STATUS CHAR(1)
    4 )
    5 ORGANIZATION EXTERNAL
    6 ( TYPE ORACLE_LOADER
    7 DEFAULT DIRECTORY GRATIS_LOAD
    8 ACCESS PARAMETERS
    9 ( records delimited by NEWLINE
    10 fields (
    11 ID_NUMBER POSITION (1:10) CHAR,
    12 STATUS POSITION (11:1) CHAR
    13 )
    14 )
    15 LOCATION
    16 ( 'GRATISID.TXT'
    17 )
    18 );
    Table created
    SQL> select * from memb_batch_load_id;
    select * from memb_batch_load_id
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: unable to open log file MEMB_BATCH_LOAD_ID_1388_5552.log
    OS error The system cannot find the file specified.
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    SQL>

  • How can I log BT device IDs names in a log file using Toshiba BT stack

    Hi,
    without Microsoft stack I can't use a lot of freeware programs (BluetoothView.exe, BluetoothCL.exe, BTScanner for Windows) to "catch" bluetooth devices in a log file.
    How can I log bt device ids/description names in a log file using Toshiba Bluetooth stack?
    Thank you

    I've just contacted Toshiba here:
    http://aps2.toshiba-tro.de/bluetooth/?page=faq/sdk
    There are other solutions for Windows XP or Toshiba SDK is the only one?

  • Unable to print PDF files using Acrobat 8.

    I had to uninstall and then reinstall Office for Mac 2011.  I don't know if it's related or not,  but since doing so I have been unable to print PDF files using Adobe Acrobat 8. After opening a PDF file and hitting print, Adobe Acrobat 8 crashes. Any suggestions?  I already uninstalled and reinstalled Adobe Acrobat 8, but it still won't print PDF files. O

    While you are having difficulty in printing a PDF file, you may try the  subsequent steps. If you are in a rush and would like to print a simple  document such as a letter, a form, or a calendar, you may print it as an  image. Next option is that you may need to update your printer driver   if the PDF does not print, the PDF prints as a blank page or with  unreadable text or if you get an error message when you print.  Sometimes, when you print a file that is on a thumb drive or a network,  the file gets damaged. Then you have to open the copy on your hard drive  and print again. At last, you can try printing the PDF using another  printer and check your printer connection too if the PDF does not get  printed. get more help to fix unable to printer PDF file hope this helps you.
    Good Luck!

  • I am  unable to load GRAPHIC files using the transaction SFP.

    I am  unable to load GRAPHIC files using the transaction SFP.
    The error message says that there is no connection to the below given url.
       http://<hostname:8000>/sap/bc/fp/
    is it something like i have to activate this service in transaction sicf ?

    Try http://<hostname:8000>/sap/bc/fp/!
    ! at the end ..
    Regards
    Juan

Maybe you are looking for

  • TS1406 I have followed all instructions to try and fix the "not a Win32 app"

    but I still get the error. Anything else I should try?

  • Drop-Down Menu in a Component Page

    I'm creating a website in GoLive, using a component page for the menu, which will appear on every page. There will be at least 50 pages. So when the menu needs editing, making changes to each page separately is not an option. Creating and customizing

  • WAD 7: Hide Web Item depending on variable value

    Hi, I have two enterprise reports in a web template. The underlying queries have the same variable (calendar month). I want to achieve the following: In case the variable is < 4: Show report A, Hide report B In case the variable is >=4: Show report B

  • Business area in MM

    Hi all, I have an issue and hope your helps. How to have the system determine business area via Sales organization in MM? We can not use the relation between plant and business area in our case. Because 1 plant can include one or more business area.

  • Need help with Free case program in Canada

    hi, I just recently brought 2 iPhones unlocked from Canadian apple store I do have apple ID but my billing is in Thailand, not Canada, so when I logged on to app store(Thailand), i could NOT find the free case App. Unless I signed out and search, i w