Need to create file in unix (oracle directory path)

Is it possible to create a file in oracle directory path (in unix folder).
I am using a dynamic procedure to create the External Tables, when the given pattern file is present the procedure will create the External table, if the file is not present then it should create an empty file so that the corresponding External table would return zero(0) records. It should not fail.
It has to be through plsql not using unix script.
UTL_FILE.FGETATTR(V_DIR_NAME, V_FILE_NAME, V_EXISTS, V_FILE_LENGTH, V_BLOCKSIZE);
IF v_exists=FALSE THEN
--------create an empty file
v_file_name:=empty_file;
end if;
--Create table script which will dynamically create the external table
v_sql := 'CREATE TABLE '||V_RX_NAME||' ( '||RTRIM(v_cols,', ')||' )' ||
' ORGANIZATION EXTERNAL '||
' ( TYPE ORACLE_LOADER '||
' DEFAULT DIRECTORY "'|| v_dir_name || '"'||
' ACCESS PARAMETERS '||
' ( RECORDS DELIMITED BY NEWLINE '||
' LOAD WHEN ( '||RTRIM(v_null_cols,'and ')||')'||
' BADFILE '''||rec_mkt_name.SUBJECT_AREA_NAME||'_'||rec_mkt_name.PARAM_NAME||'.BAD''' ||
' DISCARDFILE '''||rec_mkt_name.SUBJECT_AREA_NAME||'_'||rec_mkt_name.PARAM_NAME||'.DISCARD''' ||
' LOGFILE '''||rec_mkt_name.SUBJECT_AREA_NAME||'_'||rec_mkt_name.PARAM_NAME||'.LOG'''||
' FIELDS TERMINATED BY ''~'' OPTIONALLY ENCLOSED BY ''"'' '||
' MISSING FIELD VALUES ARE NULL ' ||
' ) LOCATION ('''||V_FILE_NAME||''') ) REJECT LIMIT UNLIMITED';
GV_CURR_STEP := v_sql;
dbms_output.put_line(V_FILE_NAME) ;
EXECUTE IMMEDIATE v_sql;
...........

Saubhik wrote:
Try to use utl_file.fopen with 'W'.Or maybe even with "A", and then close it. If you use "W" it will overwrite the file if it already exists. ;)

Similar Messages

  • Copying a BLOB to a File in an Oracle Directory

    Is there a straightforward way to copy a BLOB into a file in an Oracle Directory?
    The BLOB contains a binary (pdf) file.
    Thanks in advance

    Assuming you're on 9i or later, you can loop over the BLOB and use the UTL_FILE.PUT_RAW method to write out 32k chunks of the PDF at a time.
    Justin
    Forgot the link to Dan's blob2file
    http://psoug.org/reference/utl_file.html
    Message was edited by:
    Justin Cave

  • Urgent Need for creating 100 tables in Oracle.

    Hello All,
    I need to create 100 tables in oracle using a loop.
    Please suggest . Advance thanks for your efforts.
    ANto

    I am getting the foll error at run time when executing the procedure ..
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "ORAUSER.CREATE_100_TABLE", line 9
    ORA-06512: at line 1
    The script goes here ...
    create or replace procedure create_100_table
    is
    v_sql_string varchar2(200);
    begin
    for i in 1..100
    loop
    v_sql_string := 'create table ajames' || i || ' as select * from emp';
    execute immediate v_sql_string;
    end loop;
    end;
    ------------------------

  • Help needed in creating File Directory if not exist

    hi, All
    I am thinking about wite files to directories based on year, month, day. if the directory for that year or month or day exists already, do not create the directory, but write the file to that directory.
    For example: 2003/02/22/file.txt --2003/02/22 exist, just write file.txt
    If the directory does not exist, the program will create the direcotry and write the file into the right directory.
    For example 2003/02/22/file.txt, ---2003/02/22/ does not exist, the program will create the directoies and write file file.txt
    If anyone can provide any example or suggestion, I really appreciate!
    Thanks
    Steve

    Hi!
    Just have a look at the class "File"
    and it's method "exists()".
    Hope, that helps.
    Thoto

  • How to find the number of files in an oracle directory through a storedproc

    hi
    i have an oracle directory or a directory in an ftp server
    is there any way.......through which..
    i can know the number of files in the directory ...?
    and whats the metadatacolumn that will indicate the name of the file?
    and is it possible to loop through each of the entries within oracle
    regards
    raj

    ops$tkyte@8i> GRANT JAVAUSERPRIV to ops$tkyte
      2  /
    Grant succeeded.
    That grant must be given to the owner of the procedure..  Allows them to read
    directories.
    ops$tkyte@8i> create global temporary table DIR_LIST
      2  ( filename varchar2(255) )
      3  on commit delete rows
      4  /
    Table created.
    ops$tkyte@8i> create or replace
      2     and compile java source named "DirList"
      3  as
      4  import java.io.*;
      5  import java.sql.*;
      6 
      7  public class DirList
      8  {
      9  public static void getList(String directory)
    10                     throws SQLException
    11  {
    12      File path = new File( directory );
    13      String[] list = path.list();
    14      String element;
    15 
    16      for(int i = 0; i < list.length; i++)
    17      {
    18          element = list;
    19 #sql { INSERT INTO DIR_LIST (FILENAME)
    20 VALUES (:element) };
    21 }
    22 }
    23
    24 }
    25 /
    Java created.
    ops$tkyte@8i>
    ops$tkyte@8i> create or replace
    2 procedure get_dir_list( p_directory in varchar2 )
    3 as language java
    4 name 'DirList.getList( java.lang.String )';
    5 /
    Procedure created.
    ops$tkyte@8i>
    ops$tkyte@8i> exec get_dir_list( '/tmp' );
    PL/SQL procedure successfully completed.
    ops$tkyte@8i> select * from dir_list where rownum < 5;
    FILENAME
    data.dat
    .rpc_door
    .pcmcia
    ps_data
    http://asktom.oracle.com/pls/asktom/f?p=100:11:4403621974400865::::P11_QUESTION_ID:439619916584
    Edited by: Salim Chelabi on 2009-04-21 10:37

  • Processing OS Files in an Oracle Directory

    I have an application that gets XML files and stores them in a directory. I'd like to write a PL/SQL program that I can schedule to process all files in the directory. I won't know at run time what the file names are, so I need a way to somehow loop through all files in the directory, do my processing, and exit when I've run out of files.
    I've been reviewing documentation and it doesn't look like fileGetName or fileExists will work for this type of processing, since they either assume a known file name or return the directory name, which I'll need to specify since there are multiple directories used by this process.
    In pseudo-code, here's what I have in mind:
    declare
    cursor all_files is
    select filename from xml_in; --xml_in is my Oracle directory where the files will live.
    eachFile all_files%ROWTYPE;
    begin
    open all_files;
    loop
    fetch all_files into eachFile;
    exit when all_files%NOTFOUND;
    --Do my XML processing here
    end loop;
    close all_files;
    end;
    Is it possible to do this kind of processing on external files? If so, how can I get something that would function like the cursor described above to work?

    The files are unknown to Oracle, I'm using an Oracle directory just as a save point for processing. I've got an external application written that will process the xml (actually, it calls an already-completed PL/SQL stored procedure) but I'd like to have portability between the different OS's.
    Short answer to your question...No.

  • Help needed . Creating DSN in Unix

    Hi The Oracle server is running on Unix platform. I need to connect the server from my client application which recoganises the DB using its DSN. Please help me in creating the DSN in the Unix environment.
    Any help will be Apreciated.
    Regards,
    Badhri([email protected])

    I'm a bit confused. You need to have an ODBC DSN on your client machine, not on your server machine. ODBC is generally a Windows-only technology-- at least the Oracle ODBC driver is available only on Windows. There are some third-parties that have created various Unix ODBC drivers, however.
    If you need to create a DSN on a Unix box, you must not be using the Oracle driver or the standard DSN configuration dialogs. You'd have to contact whatever third-party driver provider you're using to find out how they handle things.
    Justin

  • I need to create file on disk for a print shop.

    My four page newsletter is complete. It prints out fine as single 8 1/2 x 11 sheets. Now I need to create a file I can take to a print shop to be printed on an 11 x 17 sheet front and back. I can get my file to the 2 up configuration, but how do I position pages 4 and 1 on one side of the sheet and 2 and 3 on the other side so the newsletter will read correctly? Thanks.

    TH Leeds,
    welcome to Pages discussions.
    The easiest way is probably to create a PDF file and then use CocoaBooklet.

  • Writing a file to an Oracle Directory

    Hello,
    I'd like to use a database trigger or PL/SQL to write a text file to to a directory on my database server. Is that possible? I know I could write a daemon that runs on the OS, but I'd lie to run it from the database itself.

    OK, figured it out. This was helpful: http://www.adp-gmbh.ch/ora/sql/create_directory.html

  • Issue with UTL FILE, does not read directory path

    Hi Guys
    I have created a procedure using a UTL_File, but when I execute that procedure, it comes with an invalid directory path.
    create directory r_bmw as 'C:\BMW';
    grant read, write on directory r_bmw to bmw;
    The above have been created successfully. (r_bmw is the Directory Name. C:\BMW is the directory path.)
    Below is my code:
    create or replace
    PROCEDURE DCA_BMW_OUT
    IS
    -- Declare all variables as reference
    v_out_file UTL_FILE.FILE_TYPE;
    v_row_Count NUMBER;
    r_bmw NUMBER;
    v_out_directory all_directories.directory_path%type;
    v_out_filehandle UTL_FILE.FILE_TYPE := NULL;
    v_out_buffer varchar2 (32767);
    v_records NUMBER;
    body_output varchar2(32759 BYTE);
    dictionary_guarantorsexist varchar2 (1 Char);
    -- Text required within this part of the procedure
    v_body varchar2(32767 BYTE);
    v_header VARCHAR2(32759 BYTE);
    BEGIN
    --- Directories have been created
    FOR r_bmw IN
    ( SELECT *
    FROM dcaadditionaldata
    WHERE directory_name IS NOT NULL
    ) LOOP
    -- inner loop produces the rows in each file
    -- outer loop identifies each of the dca's you want to generate a file for
    BEGIN
    -- Output file to be added into the directory specified
    v_out_file := utl_file.fopen (r_bmw.directory_name, 'DCAExport_1_' || TRIM(TO_CHAR(SYSDATE,'DDMMYYYY_HH24MISS')) || '.txt', 'W');
    -- The Header data which will be outputted to the file
    v_header := 'KennzeichenBrgschaftsforderungGesamtforderung|Währung|Übergabedatum|DifferenzierungAnwalts-oderInkassofall|MainMarktpartnernummer|
    MainAnrede|MainTitel|MainName|MainVorname|MainStraße|MainHausnummer|MainPLZ|MainOrt|MainLand|MainGeburtsdatum|MainTelefonnr.Schuldner|G1Marktpartnernummer
    |G1Anrede|G1Titel|G1Name|G1Vorname|G1Straße|G1Hausnummer|G1PLZ|G1Ort|G1Land|G1Geburtsdatum|G1Telefonnr.Schuldner|G2Marktpartnernummer|G2Anrede|G2Titel|
    G2Name|G2Vorname|G2Straße|G2Hausnummer|G2PLZ|G2Ort|G2Land|G2Geburtsdatum|G2Telefonnr.Schuldner|G3Marktpartnernummer|G3Anrede|G3Titel|G3Name|G3Vorname|
    G3Straße|G3Hausnummer|G3PLZ|G3Ort|G3Land|G3Geburtsdatum|G3Telefonnr.Schuldner|G4Marktpartnernummer|G4Anrede|G4Titel|G4Name|G4Vorname|G4Straße|G4Hausnummer|
    G4PLZ|G4Ort|G4Land|G4Geburtsdatum|G4Telefonnr Schuldner|G5Marktpartnernummer|G5Anrede|G5Titel|G5Name|G5Vorname|G5Straße|G5Hausnummer|G5PLZ|G5Ort|G5Land|
    G5Geburtsdatum|G5Telefonnr.Schuldner|Kundennr.|Bestandsnr.|Finanzierungsnr.|KennzeichenFinanzierung/Leasing|Kennzeichenprivat/gewerblich|
    reguläresVertragsende|Laufzeit|Vertragsdatum|Vertragsstatus|Ratenbetrag|Filiale/Gebiet|Finanzierungstyp|BankverbindungKonto|BankverbindungBLZ|
    RSVKennzeichen|Kündigungsdatum|Modell|Fahrgestellnummer|KFZKennzeichen|KFZZulassungsdatum|CoD1Marktpartnernummer|CoD1Anrede|CoD1Titel|CoD1Name|
    CoD1Vorname|CoD1Straße|CoD1Hausnummer|CoD1PLZ|CoD1Ort|CoD1Land|CoD1Geburtsdatum|CoD1Telefonnr.Schuldner|CoD2Marktpartnernummer|CoD2Anrede|CoD2Titel|
    CoD2Name|CoD2Vorname|CoD2Straße|CoD2Hausnummer|CoD2PLZ|CoD2Ort|CoD2Land|CoD2Geburtsdatum|CoD2Telefonnr.Schuldner|CoD3Marktpartnernummer|CoD3Anrede|
    CoD3Titel|CoD3Name|CoD3Vorname|CoD3Straße|CoD3Hausnummer|CoD3PLZ|CoD3Ort|CoD3Land|CoD3Geburtsdatum|CoD3Telefonnr.Schuldner|CoD4Marktpartnernummer|
    CoD4Anrede|CoD4Titel|CoD4Name|CoD4Vorname|CoD4Straße|CoD4Hausnummer|CoD4PLZ|CoD4Ort|CoD4Land|CoD4Geburtsdatum|CoD4Telefonnr.Schuldner|
    CoD5Marktpartnernummer|CoD5Anrede|CoD5Titel|CoD5Name|CoD5Vorname|CoD5Straße|CoD5Hausnummer|CoD5PLZ|CoD5Ort|CoD5Land|CoD5Geburtsdatum|
    CoD5Telefonnr.Schuldner Y|Y|5830,99|EUR|20/08/2009|DCA|4|123456|Herr||Mueller|Rainer|Messigasse|33|84432|Filz|Deutschland|01/07/1957|08912345|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||||||||||||||76543|5000234567||Lease|Privat|12/12/2013|60|12/12/2008||250,50|US|Rate|1234567890|32343450|N||BMW 320 i|W34567890PA34567|M-H-3456|09/12/2008||||||||||||||||||||||||
    N|450,80|EUR|20/08/2009|DCA|4|987654|Frau||Meier|Heide|Beinstr.|44|86353|Laus|Deutschland|03/06/1949|08987654|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||87654||8765675585|Loan|Gewerblich|14/03/2012|72|14/03/2006||500,01|DF|Select|976579657|32343450|N||BMW 500 sl|W94567890PA34568|M-H-3457|10/03/2006|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345
    Y|33970,50|EUR|20/08/2009|Lawyer|4|64646464|Frau||Schmidt|Susanne|Hueftgasse|55|89363|Maus|Deutschland|23/08/1933|08934567|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||98757|5000785675||Lease|Privat|11/11/2009|48|11/11/2005||380,70|GH|Zielrate|234567899|32343450|Y||BMW 380 s|W54567890PA34569|M-H-3458|07/11/2005||||||||||||||||||||||||
    N|10040,20|EUR|20/08/2009|Lawyer|4|4865465|Herr||Schulz|Karl|Nasenweg|77|83354|Schuh|Deutschland|18/01/1965|08972545|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||46789|50004765787||Lease|Privat|16/09/2012|60|16/09/2007||1234,56|OS|ZUS|98765432|32343450|Y||BMW 280 i|W74567890PA34570|M-H-3459|12/09/2007||||||||||||||||||||||||';
    utl_file.PUT_LINE(v_out_file,v_header,TRUE);
    -- Below will output a row of data which satisfy the requirements.
    FOR body_output IN
    ( SELECT
    AccountDetails.CUSTOMERNUMBER, AccountDetails.ACCOUNTNUMBER, CUSTOMERDETAILS.CDTITLE, CUSTOMERDETAILS.CDFIRSTNAME, CUSTOMERDETAILS.CDLASTNAME, AccountDetails.ACCOUNTTYPE,
    AccountDetails.ORIGINALCONTRACTENDDATE, AccountDetails.CONTRACTTERM, AccountDetails.CONTRACTENDDATE, AccountDetails.BRANCHAREA, AccountDetails.PRODUCTTYPE,
    AccountDetails.HOUSEBANKACCOUNT, AccountDetails.CARMODEL, AccountDetails.CARLICENCE, AccountDetails.ARREARSBALANCE, AccountDetails.CODEBTOR, AccountDetails.GUARANTORNUMBER
    FROM AccountDetails
    JOIN CUSTOMERDETAILS ON AccountDetails.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
    WHERE EXISTS
    ( SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.DCAID = 41
    AND Dcaaccountallocation.status = 3
    AND DebtEpisodes.DCASentDate IS NULL
    AND Dcaaccountallocation.ACCOUNTID = AccountDetails.ACCOUNTNUMBER
    AND DebtEpisodes.DCAORLAWYER = 'DCA'
    LOOP
    UTL_FILE.PUT_LINE (v_out_file,
    body_output.CUSTOMERNUMBER|| '|' || body_output.ACCOUNTNUMBER|| '|' ||body_output.CDTITLE|| '||' ||body_output.CDFIRSTNAME || '|||||' ||
    body_output.CDLASTNAME|| '||||' || body_output.ACCOUNTTYPE|| '|' ||body_output.ORIGINALCONTRACTENDDATE|| '||||' ||body_output.CONTRACTTERM || '|||||' ||
    body_output.CONTRACTENDDATE|| '|' || body_output.BRANCHAREA|| '||' ||body_output.PRODUCTTYPE|| '||' ||
    body_output.HOUSEBANKACCOUNT|| '|||' || body_output.CARMODEL|| '||||' ||body_output.CARLICENCE|| '|' ||
    body_output.ARREARSBALANCE|| '||||' || body_output.CODEBTOR|| '|' ||body_output.GUARANTORnumber);
    END LOOP;
    -- UTL_FILE.fclose (v_out_file);
    -- EXCEPTION
    --WHEN OTHERS THEN
    --UTL_FILE.put_line (v_out_file, 'failed');
    -- If any errors occur when closing the file, then we close the opened file.
    IF utl_file.is_open(v_out_file) THEN
              UTL_FILE.put_line (v_out_file, 'failed');
    UTL_FILE.fclose (v_out_file);
    END IF;
    END;
    UPDATE DebtEpisodes
    SET handoverdate = null
    WHERE DCAORLAWYER = 'DCA'
    AND accountid IN
    ( SELECT accountid
    FROM Dcaaccountallocation
    WHERE Dcaaccountallocation.status = 3
    AND Dcaaccountallocation.dcaid = 41
    END LOOP;
    END DCA_BMW_OUT;
    -- It compiles successfully, but when executes, it provides me with the 'invalid directory path' error message.
    Any help?
    Thanks

    Ram wrote:
    DCAID DIRECTORY_NAME MPNO IN_DIRECTORY_NAME INVESTOR
    4     DCA_PKFO_OUT     51950     DCA_PKFO_IN     (null)
    41     INV_ALTOR_OUT     488742     INV_ALTOR_IN Y
    2     DCA_NIG_OUT     686007     DCA_NIG_IN     (null)
    3     DCA_RAF_OUT     777163     DCA_RAF_IN     (null)
    21     INV_INFOSCORE_OUT 3482400     INV_INFOSCORE_IN     Y
    22     INV_HOIST_OUT     2866813     INV_HOIST_IN     Y
    Above is the output when select * from dca additional data.
    I have edited the r_bmw to varchar (32757 BYTE);
    however, the same errors still appear. Would I need to change the select statement to a different table...and not dca additional data?
    ThanksSo you have created a directory name r_bmw
    create directory r_bmw as 'C:\BMW';
    grant read, write on directory r_bmw to bmw;And your are querying select * from dca additional data, which doesn't return your recently created directory.... So... what to do what to do.... You should query the all_directories with directory_name = 'r_bmw'.

  • XML File Truncating in Traget Directory Path in AL11 transaction

    Hi Experts,
    I did  client proxy and i am getting two records in the xml file, the scenario was successful and i could able to see the two records in sxmb_moni in xi system but when i look at the directory path the file is truncated it is displaying first record and part of the second record. The display format is it is displaying whole xml file in single line, is there any length restriction in directory path or do i need to do any settings in ID for file adapter. Kindly suggest some solutions.
    Regards,
    Venkat.

    Hi Venkat,
    as you know the directory path and the file name on your operation system out of AL11 already, you can logon to your operation system (OS) and use there any editor program (e.g. notepad, vi, edit, etc.) to open the file and display the content.
    An the file adapter side itself, you can use the Message Monitoring in the RWB to have a look into the message on the Messaging System and see there the content of the message as well.
    Best regards,
    Silvia

  • Unable to create File System Repository using Network Path

    Hi All,
    I am trying to create a File System Repository.
    I created a networkpath and windows system and used the same while creating File Repository according to the steps in help.
    With out using Networkpath(i.e.,If I use IP address,I am able to create File System Repository).
    But with the network path,it throws the following error as seen in Component Monitor.
    <b>Startup Error:    The localroot does not exist: C:\usr\sap\IGTE\j2ee\j2ee_00\cluster\server\NWP_001
    My network path is NWP_001
    </b>
    Did any one face this problem?
    Any help please........
    Rgds,
    Santhosh

    Hi,
    I am getting the same error even if I replace(\) by slashes(/).
    I tried on EP6SP12 as well as EP6SP2 and got the same error on both.
    The repository is searching for a folder named with
    n/w path on the portal server itself(i.e, it is searching in the following folder
    <b>C:\usr\sap\IGTE\j2ee\j2ee_00\cluster\server\NWP_001
    My network path is NWP_001</b>),instead of searching on the remote system.
    Can any one help me in solving the problem
    Thanks in Advance.
    Rgds,
    Santhosh

  • Creating a text file in an oracle directory

    Hello all,
    I created a directory in oracle called sampledata (create directory sampledata as 'c:sampledata'). How do I create a new text file in that directory? That's it.
    Thanks,
    Ad

    I created a directory in oracle called sampledataYou mean you created with sys, right? I think only sys can create directories. Make sure you grant privileges to your user. So let's walk trough this:
    connect sys@orcl as sysdba;
    create or replace directory temp_directory as 'c:\temp';
    grant read, write on directory temp_directory to scott;
    connect scott@orcl;
    declare
      output_file utl_file.file_type;
    begin
        output_file := utl_file.fopen('DIR_TEMP', 'test_file.txt', 'w');
        utl_file.put_line(f, 'Testing output file');
        utl_file.fclose(output_file);
    end;
    /hth,
    gleisson henrique
    I granted priveleges to a different directory that I created. Take a look here:
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    Pretty good examples.
    Message was edited by:
    Gleisson Henrique

  • Help needed in creating file structure

    Hi friends,
    - <Validity>
      <Validity Time="1">12102010</Validity>
      </Validity>
    This is a node of an xml file which i need to use in my scenario.but i was stuck in creating data type for this node.how to create data type for this node?
    as at target side this field should be split into 2 fields validity and time

    Hello Kiran,
    To add something related to split, check this out.
    Re: Split a string
    Regards
    Pothana

  • Is there any limitation to create file watcher in oracle 11g scheduler

    Hi,
    Below are the version details where I am working.
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production"
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I tried to create a file watcher. But I got below error.
    begin
        dbms_scheduler.create_file_watcher
          (file_watcher_name => 'file_watcher',
           directory_path => 'F:\Aswadhati\workfile',
           file_name => 'example.txt',
           credential_name => 'external_user',
           enabled => TRUE);
    end;
    Error report:
    ORA-03001: unimplemented feature
    ORA-06512: at "SYS.DBMS_ISCHED", line 3702
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 2632
    ORA-06512: at line 2
    03001. 00000 -  "unimplemented feature"
    *Cause:    This feature is not implemented.
    *Action:   None.

    In the enterprise edition I am able to create all the below objects.But The job is not running after file arrival.
    Could you please me in this case also.
    BEGIN
      DBMS_SCHEDULER.create_credential(
        credential_name => 'LOCAL_CREDENTIAL',
        username        => 'upncommon',
        password        => '*******');
    END;
    BEGIN
      DBMS_SCHEDULER.create_file_watcher(
        file_watcher_name => 'test_file_watcher',
        directory_path    => '/home/upncommon/pub',
        file_name         => 'sample2.sh',
        credential_name   => 'LOCAL_CREDENTIAL',
        destination       => NULL,
        enabled           => FALSE);
    END;
    BEGIN
      DBMS_SCHEDULER.create_program(
        program_name        => 'file_watcher_test_prog',
        program_type        => 'STORED_PROCEDURE',
        program_action      => 'PROC_SCH',
        number_of_arguments => 1,
        enabled             => FALSE);
    END;
    BEGIN
      DBMS_SCHEDULER.define_metadata_argument(
        program_name       => 'file_watcher_test_prog',
        metadata_attribute => 'event_message',
        argument_position  => 1);
    END;
    BEGIN
      DBMS_SCHEDULER.create_job(
        job_name        => 'file_watcher_test_job',
        program_name    => 'file_watcher_test_prog',
        event_condition => NULL,
        queue_spec      => 'test_file_watcher',
        auto_drop       => FALSE,
        enabled         => FALSE);
    END;
    BEGIN
      DBMS_SCHEDULER.set_attribute('file_watcher_test_job','parallel_instances',TRUE);
    END;
    EXEC DBMS_SCHEDULER.enable('test_file_watcher');
    EXEC DBMS_SCHEDULER.enable('file_watcher_test_prog');
    EXEC DBMS_SCHEDULER.enable('file_watcher_test_job');

Maybe you are looking for

  • Black Screen before Windows XP Logon

    First of all: Hi everyone! I've been reading thesse forum for some time, but I could't find exactly my problem. I have Windows XP Pro Corp installed on my PC. When I start the computer and Windows is loading, appears the initial screen (that with bla

  • How to create discoverer 4i user account?

    Hi All, Could anybody please tell me how to create a discoverer 4i user account so that user can log in and use the discoverer viewer? Thanks a lot!

  • Imported jpg probs - Urgent

    Before I begin, I'd like to apologize in advance if this issue has already been addressed in these forums.. I'd be suprised if it hasn't, but i've looked all over, and cannot find the answer i'm looking for. I'm using FlashMX 2004 Pro, on XP Pro SP2.

  • Downloaded CS3 won't setup

    I downloaded CS3 Web Premium as I don't have disk player in my Macbook Air (osx 10.8.5). I still have the original disk with serial number. So far so good. However, when I launch setup, it starts to inialize and then gives an error message: "start up

  • Breaking Down an Image into Tiles- CS3

         Hello! It's been a while since I've done anything more complicated than a wavy line in Illustrator, and I have a project in  mind that's a little above my head.      I would like to draw an image freehand in PS, import it to Illustrator, and bre