"File" tab in external table editor replaced by "Access Parameters"?

Hi,
I have a few external tables where the "File" tab in the external table editor is replaced by an "Access Parameters" tab.
Does anybody know what may have caused this or how to repair it?
Thanks,
Ed

Hi Ed
I have had that happen many times but have not figured out the root cause. The fix I used was pretty basic. Delete the external table and redefine it.
This has happened to me mostly when I move an external table definition from our TEST repository to PROD. It seems to lose the file definition it was originally attached to.
Since my external tables look exactly like my flat file sources it takes only a few seconds to recreate the external table.
I didn't spend any more time trying to figure out the 'why'.
Good luck.
-gary

Similar Messages

  • Csv file processing using external table

    Dear All,
    Our database is oracle 10g r2 and OS is solaris
    We  would receive csv files to a particular directory on server each day.
    File Format look like:
    H00,SOURCE_NAME,FILE_CREATED_DATE
    RECORD_TYPE,EMP_ID,EMP_NAME,EMP_DOB(DDMMYYYY),EMP_HIRE_DATE(DDMMYYYY),EMP_LOCATION
    T00,RECORD_COUNT
    EMPLOYEE TABLE STRUCTURE
    EMP_ID                   NOT NULL    NUMBER ,
    EMP_NAME            NOT NULL    VARCHAR2(10) ,
    EMP_DOB                                  DATE,
    EMP_HIRE_DATE   NOT NULL     DATE,
    EMP_LOCATION                VARCHAR2(80)
    Sample File:
    H00,ABC,21092013
    "R01",1,"EMP1","14021986","06072010","LOC1"
    "R01",20000000000,"EMP2","14021-987","06072011",""
    ,***,"EMPPPPPPPPPPP3","14021988","060**012","LOC2"
    "R01",4,4,"14021989","06072013",
    T00,4
    we need to validate each record excluding header and trailer  for:
    DATATYPE, LENGTH,OPTIONALITY, and other date validations such as EMP_HIRE_DATE can not be less than EMP_DOB
    In case of any data errors we need to send a response file for corresponding source file.
    we have  predefined error codes to be sent in the response file.
    ERR001    EMP_ID can not be null
    ERR002    EMP_ID  exceeds 10 digits
    ERR003    EMP_ID is not a number    
    ERR004    EMP_NAME   has to be text
    ERR005    EMP_NAME  length can not exceed 10
    ERR006    EMP_NAME   can not be null
    ERR007    EMP_DOB is not a date
    ERR008    EMP_DOB is not in ddmmyyyy format
    ERR009    EMP_HIRE_DATE is not a date
    ERR010    EMP_HIRE_DATE is not in ddmmyyyy format
    ERR011    EMP_HIRE_DATE can not be null
    ERR012    EMP_LOCATION    has to be text
    ERR013    EMP_LOCATION   length can not exceed 80
    ERR014    EMP_HIRE_DATE can not be less than EMP_DOB
    ERR015    Field missing in the record
    ERR016    More number of fields than allowed
    1.Do I need to create external table before processing each file.(EMP1.txt,EMP2.txt)?
    2.How to generate these error codes in case of respective failure scenarios and to log into an exception table?
    3.response file needs to have entire record and a concatination of all the error codes in the next line.
    4.what would be a better approach among
    creating an external table with all char(2000) fields and writing a select statement
    such as select * from ext_table where (emp id is not null and length(emp_id)<=10 and....to select only proper data);
    or creating the external table to be same as employee table and creating a bad file? if this is the preferred how can I generate the custom error codes?
    Could you please help me in achieving this!
    Warm Regards,
    Shankar.

    You can do a one-time creation of an external table.  After that, you can either overwrite the existing text file or alter the location.  In the example below I have split your original sample file into two files, in order to demonstrate altering the location.  You can make the external table all varchar2 fields as large as they need to be to accommodate all possible data.  If you then create a staging table and rejects table of the same structure, you can create a trigger on the staging table such that, when you insert from the external table to the staging table, it inserts into either the employee table or rejects table with the concatenated error list.  If you want this in a file, then you can just spool a select from the rejects table or use some other method such as utl_file.  The following is a partial example.  Another alternative would be to use SQL*Loader to load directly into the staging table without an external table.
    SCOTT@orcl12c> HOST TYPE emp1.txt
    H00,ABC,21092013
    "R01",1,"EMP1","14021986","06072010","LOC1"
    "R01",20000000000,"EMP2","14021-987","06072011",""
    T00,4
    SCOTT@orcl12c> HOST TYPE emp2.txt
    H00,ABC,21092013
    ,***,"EMPPPPPPPPPPP3","14021988","060**012","LOC2"
    "R01",4,4,"14021989","06072013",
    T00,4
    SCOTT@orcl12c> CREATE OR REPLACE DIRECTORY my_dir AS 'c:\my_oracle_files'
      2  /
    Directory created.
    SCOTT@orcl12c> CREATE TABLE external_table
      2    (record_type       VARCHAR2(10),
      3     emp_id            VARCHAR2(11),
      4     emp_name          VARCHAR2(14),
      5     emp_dob           VARCHAR2(10),
      6     emp_hire_date     VARCHAR2(10),
      7     emp_location      VARCHAR2(80))
      8  ORGANIZATION external
      9    (TYPE oracle_loader
    10     DEFAULT DIRECTORY my_dir
    11     ACCESS PARAMETERS
    12       (RECORDS DELIMITED BY NEWLINE
    13        LOAD WHEN ((1: 3) != "H00" AND (1:3) != 'T00')
    14        LOGFILE 'test.log'
    15        FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
    16        MISSING FIELD VALUES ARE NULL
    17        REJECT ROWS WITH ALL NULL FIELDS
    18          (record_type, emp_id, emp_name, emp_dob, emp_hire_date, emp_location))
    19     LOCATION ('emp1.txt'))
    20  /
    Table created.
    SCOTT@orcl12c> CREATE TABLE staging
      2    (record_type       VARCHAR2(10),
      3     emp_id            VARCHAR2(11),
      4     emp_name          VARCHAR2(14),
      5     emp_dob           VARCHAR2(10),
      6     emp_hire_date     VARCHAR2(10),
      7     emp_location      VARCHAR2(80))
      8  /
    Table created.
    SCOTT@orcl12c> CREATE TABLE employee
      2    (emp_id          NUMBER       NOT NULL,
      3     emp_name        VARCHAR2(10) NOT NULL,
      4     emp_dob         DATE,
      5     emp_hire_date   DATE,
      6     emp_location    VARCHAR2(80))
      7  /
    Table created.
    SCOTT@orcl12c> CREATE TABLE rejects
      2    (record_type       VARCHAR2(10),
      3     emp_id            VARCHAR2(11),
      4     emp_name          VARCHAR2(14),
      5     emp_dob           VARCHAR2(10),
      6     emp_hire_date     VARCHAR2(10),
      7     emp_location      VARCHAR2(80),
      8     error_codes       VARCHAR2(4000))
      9  /
    Table created.
    SCOTT@orcl12c> CREATE OR REPLACE TRIGGER staging_air
      2    AFTER INSERT ON staging
      3    FOR EACH ROW
      4  DECLARE
      5    v_rejects         NUMBER := 0;
      6    v_error_codes  VARCHAR2(4000);
      7    v_num          NUMBER;
      8    v_dob          DATE;
      9    v_hire         DATE;
    10  BEGIN
    11    IF :NEW.emp_id IS NULL THEN
    12      v_rejects := v_rejects + 1;
    13      v_error_codes := v_error_codes || ',' || 'ERR001';
    14    ELSIF LENGTH (:NEW.emp_id) > 10 THEN
    15      v_rejects := v_rejects + 1;
    16      v_error_codes := v_error_codes || ',' || 'ERR002';
    17    END IF;
    18    BEGIN
    19      v_num := TO_NUMBER (:NEW.emp_id);
    20    EXCEPTION
    21      WHEN value_error THEN
    22        v_rejects := v_rejects + 1;
    23        v_error_codes := v_error_codes || ',' || 'ERR003';
    24    END;
    25    IF :NEW.emp_name IS NULL THEN
    26      v_rejects := v_rejects + 1;
    27      v_error_codes := v_error_codes || ',' || 'ERR006';
    28    ELSIF LENGTH (:NEW.emp_name) > 10 THEN
    29      v_rejects := v_rejects + 1;
    30      v_error_codes := v_error_codes || ',' || 'ERR005';
    31    END IF;
    32    BEGIN
    33      v_dob := TO_DATE (:NEW.emp_dob, 'ddmmyyyy');
    34    EXCEPTION
    35      WHEN OTHERS THEN
    36        v_rejects := v_rejects + 1;
    37        v_error_codes := v_error_codes || ',' || 'ERR008';
    38    END;
    39    BEGIN
    40      IF :NEW.emp_hire_date IS NULL THEN
    41        v_rejects := v_rejects + 1;
    42        v_error_codes := v_error_codes || ',' || 'ERR011';
    43      ELSE
    44        v_hire := TO_DATE (:NEW.emp_hire_date, 'ddmmyyyy');
    45      END IF;
    46    EXCEPTION
    47      WHEN OTHERS THEN
    48        v_rejects := v_rejects + 1;
    49        v_error_codes := v_error_codes || ',' || 'ERR010';
    50    END;
    51    IF LENGTH (:NEW.emp_location) > 80 THEN
    52      v_rejects := v_rejects + 1;
    53      v_error_codes := v_error_codes || ',' || 'ERR013';
    54    END IF;
    55    IF v_hire IS NOT NULL AND v_dob IS NOT NULL AND v_hire < v_dob THEN
    56        v_rejects := v_rejects + 1;
    57        v_error_codes := v_error_codes || ',' || 'ERR014';
    58    END IF;
    59    IF :NEW.emp_id IS NULL OR :NEW.emp_name IS NULL OR :NEW.emp_dob IS NULL
    60       OR :NEW.emp_hire_date IS NULL OR :NEW.emp_location IS NULL THEN
    61        v_rejects := v_rejects + 1;
    62        v_error_codes := v_error_codes || ',' || 'ERR015';
    63    END IF;
    64    IF v_rejects = 0 THEN
    65      INSERT INTO employee (emp_id, emp_name, emp_dob, emp_hire_date, emp_location)
    66      VALUES (:NEW.emp_id, :NEW.emp_name,
    67              TO_DATE (:NEW.emp_dob, 'ddmmyyyy'), TO_DATE (:NEW.emp_hire_date, 'ddmmyyyy'),
    68              :NEW.emp_location);
    69    ELSE
    70      v_error_codes := LTRIM (v_error_codes, ',');
    71      INSERT INTO rejects
    72        (record_type,
    73         emp_id, emp_name, emp_dob, emp_hire_date, emp_location,
    74         error_codes)
    75      VALUES
    76        (:NEW.record_type,
    77         :NEW.emp_id, :NEW.emp_name, :NEW.emp_dob, :NEW.emp_hire_date, :NEW.emp_location,
    78         v_error_codes);
    79    END IF;
    80  END staging_air;
    81  /
    Trigger created.
    SCOTT@orcl12c> SHOW ERRORS
    No errors.
    SCOTT@orcl12c> INSERT INTO staging SELECT * FROM external_table
      2  /
    2 rows created.
    SCOTT@orcl12c> ALTER TABLE external_table LOCATION ('emp2.txt')
      2  /
    Table altered.
    SCOTT@orcl12c> INSERT INTO staging SELECT * FROM external_table
      2  /
    2 rows created.
    SCOTT@orcl12c> SELECT * FROM employee
      2  /
        EMP_ID EMP_NAME   EMP_DOB         EMP_HIRE_DATE   EMP_LOCATION
             1 EMP1       Fri 14-Feb-1986 Tue 06-Jul-2010 LOC1
    1 row selected.
    SCOTT@orcl12c> COLUMN error_codes NEWLINE
    SCOTT@orcl12c> SELECT * FROM rejects
      2  /
    RECORD_TYP EMP_ID      EMP_NAME       EMP_DOB    EMP_HIRE_D EMP_LOCATION
    ERROR_CODES
    R01        20000000000 EMP2           14021-987  06072011
    ERR002,ERR008,ERR015
               ***         EMPPPPPPPPPPP3 14021988   060**012   LOC2
    ERR003,ERR005,ERR010
    R01        4           4              14021989   06072013
    ERR015
    3 rows selected.

  • More than one flat files with same external table

    Is it possible to create external table in owb associated with more than one file ie to generate code like LOCATION ( FILE1,FILE2) in create table ddl.

    Hi,
    Yes, you can add multiple files by using the configuration of the external table, and create many instances of 'files'. Every 'file' you specify requires you to specify a location and a file name.
    For more details, please review chapter 5 of the user's guide (http://www.oracle.com/technology/documentation/warehouse.html), page 5-15.
    Hope this helps.
    Mark.

  • Problem with file used by external table

    Hi all,
    following situation:
    I am creating my file on unix/solaris and ftp it to oracle server which is running on windows.
    I am getting following error when I try to do select on the external table I get:
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04020: found record longer than buffer size supported, 524288, in D:\corona\flat_files\input\CORE.PROGRESS.TXT
    ORA-06512: at "SYS.ORACLE_LOADER", line 52
    But it is working when I do following:
    File->Conversions->UNIX/MAC to DOS-> Save it and ftp to windows server.
    I have already tried to call unix2dos in my shell script, but I keep getting the same error.
    Here is the CREATE TABLE:
    CREATE TABLE EXT_TRACKING_DATA_PROGRESS
    TRACKING_ID VARCHAR2(19 BYTE),
    COMPANY_ID VARCHAR2(19 BYTE),
    SUPPLIER_ID VARCHAR2(1 BYTE),
    TRACKING_ID_TYPE VARCHAR2(2 BYTE),
    START_DATE VARCHAR2(10 BYTE),
    END_DATE VARCHAR2(10 BYTE),
    BLANK VARCHAR2(100 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY DIR_INPUT
    ACCESS PARAMETERS
    ( fields terminated BY '@|@' )
    LOCATION (DIR_INPUT:'CORE.PROGRESS.TXT')
    REJECT LIMIT 0
    NOPARALLEL
    NOMONITORING;

    Are you FTP-ing the file to the Windows machine in ASCII mode? Or in binary mode? Binary mode won't convert the line breaks from Unix to Windows, which would appear to be the problem.
    Justin

  • How to import external table, which exist in export dump file.

    My export dump file has one external table. While i stated importing into my developement instance , I am getting the error "ORA-00911: invalid character".
    The original definition of the extenal table is as given below
    CREATE TABLE EXT_TABLE_EV02_PRICEMARTDATA
    EGORDERNUMBER VARCHAR2(255 BYTE),
    EGINVOICENUMBER VARCHAR2(255 BYTE),
    EGLINEITEMNUMBER VARCHAR2(255 BYTE),
    EGUID VARCHAR2(255 BYTE),
    EGBRAND VARCHAR2(255 BYTE),
    EGPRODUCTLINE VARCHAR2(255 BYTE),
    EGPRODUCTGROUP VARCHAR2(255 BYTE),
    EGPRODUCTSUBGROUP VARCHAR2(255 BYTE),
    EGMARKETCLASS VARCHAR2(255 BYTE),
    EGSKU VARCHAR2(255 BYTE),
    EGDISCOUNTGROUP VARCHAR2(255 BYTE),
    EGREGION VARCHAR2(255 BYTE),
    EGAREA VARCHAR2(255 BYTE),
    EGSALESREP VARCHAR2(255 BYTE),
    EGDISTRIBUTORCODE VARCHAR2(255 BYTE),
    EGDISTRIBUTOR VARCHAR2(255 BYTE),
    EGECMTIER VARCHAR2(255 BYTE),
    EGECM VARCHAR2(255 BYTE),
    EGSOLATIER VARCHAR2(255 BYTE),
    EGSOLA VARCHAR2(255 BYTE),
    EGTRANSACTIONTYPE VARCHAR2(255 BYTE),
    EGQUOTENUMBER VARCHAR2(255 BYTE),
    EGACCOUNTTYPE VARCHAR2(255 BYTE),
    EGFINANCIALENTITY VARCHAR2(255 BYTE),
    C25 VARCHAR2(255 BYTE),
    EGFINANCIALENTITYCODE VARCHAR2(255 BYTE),
    C27 VARCHAR2(255 BYTE),
    EGBUYINGGROUP VARCHAR2(255 BYTE),
    QTY NUMBER,
    EGTRXDATE DATE,
    EGLISTPRICE NUMBER,
    EGUOM NUMBER,
    EGUNITLISTPRICE NUMBER,
    EGMULTIPLIER NUMBER,
    EGUNITDISCOUNT NUMBER,
    EGCUSTOMERNETPRICE NUMBER,
    EGFREIGHTOUTBOUNDCHARGES NUMBER,
    EGMINIMUMORDERCHARGES NUMBER,
    EGRESTOCKINGCHARGES NUMBER,
    EGINVOICEPRICE NUMBER,
    EGCOMMISSIONS NUMBER,
    EGCASHDISCOUNTS NUMBER,
    EGBUYINGGROUPREBATES NUMBER,
    EGINCENTIVEREBATES NUMBER,
    EGRETURNS NUMBER,
    EGOTHERCREDITS NUMBER,
    EGCOOP NUMBER,
    EGPOCKETPRICE NUMBER,
    EGFREIGHTCOSTS NUMBER,
    EGJOURNALBILLINGCOSTS NUMBER,
    EGMINIMUMORDERCOSTS NUMBER,
    EGORDERENTRYCOSTS NUMBER,
    EGRESTOCKINGCOSTSWAREHOUSE NUMBER,
    EGRETURNSCOSTADMIN NUMBER,
    EGMATERIALCOSTS NUMBER,
    EGLABORCOSTS NUMBER,
    EGOVERHEADCOSTS NUMBER,
    EGPRICEADMINISTRATIONCOSTS NUMBER,
    EGSHORTPAYMENTCOSTS NUMBER,
    EGTERMCOSTS NUMBER,
    EGPOCKETMARGIN NUMBER,
    EGPOCKETMARGINGP NUMBER,
    EGWEIGHTEDAVEMULTIPLIER NUMBER
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EV02_PRICEMARTDATA_CSV_CON
    ACCESS PARAMETERS
    LOCATION (EV02_PRICEMARTDATA_CSV_CON:'VPA.csv')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    While importing , when i seen the log file , it is failing the create the external table. Getting the error "ORA-00911: invalid character".
    Can some one suggest how to import external tables
    Addressing this issue will be highly appriciated.
    Naveen

    Hi Srinath,
    When i observed the create table syntax of external table from import dump log file, it show few lines as below. I could not understand these special characters. And create table definationis failing with special character viz ORA-00911: invalid character
    ACCESS PARAMETERS
    LOCATION (EV02_PRICEMARTDATA_CSV_CON:'VPA.csv').
    I even observed the create table DDL from TOAD. It is same as i mentioned earlier
    Naveen

  • Sqlldr flat file to external table using shell scripts

    Hi,
    Has anyone done this before? Please give me a hand.
    Thanks!

    Thanks Justin.
    When do I need to create the external table EMP_STAGING ?
    These are my steps so far:
    - shell script to crate the flat file (but I need to change the table name to EMP_STAGING)
    - use a script to call sqlldr to load the flat file into the external table
    - then the script will call the MERGE sql script to merge the data from the external table into the database table
    Am I on the right track?
    In which stage should I create and drop the external table?
    Thanks!

  • Error while selecting from view that references external table

    Can someone explain why the error near the bottom of the code below is occuring? If USER1 grants SELECT on the external table to USER2, then USER2 can select from the view without any problems; however, I want to avoid giving USER2 access to all of the columns in the external table. (I only want to give USER2 access to two of the four columns.)
    SQL> CONNECT sys AS SYSDBA
    Connected as SYS@ as sysdba
    SQL> CREATE USER user1 IDENTIFIED BY user1
    User created.
    SQL> CREATE USER user2 IDENTIFIED BY user2
    User created.
    SQL> GRANT CONNECT, CREATE TABLE, CREATE VIEW TO user1
    Grant complete.
    SQL> GRANT CONNECT TO user2
    Grant complete.
    SQL> GRANT READ, WRITE ON DIRECTORY EXT_DATA_DIR TO user1, user2
    Grant complete.
    SQL> CONNECT user1/user1
    Connected as USER1@
    SQL> CREATE TABLE emp_xt
      emp_id     NUMBER,
      first_name VARCHAR2(30),
      last_name  VARCHAR2(30),
      phone      VARCHAR2(15)
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY EXT_DATA_DIR
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'           
      LOCATION ('emp.txt')
    REJECT LIMIT 0
    Table created.
    SQL> SELECT COUNT(1) FROM emp_xt
      COUNT(1)
             4
    1 row selected.
    SQL> CREATE OR REPLACE VIEW emp_xt_view AS SELECT first_name, last_name FROM emp_xt;
    View created.
    SQL> SELECT COUNT(1) FROM emp_xt_view
      COUNT(1)
             4
    1 row selected.
    SQL> GRANT SELECT ON emp_xt_view TO user2
    Grant complete.
    SQL> CONNECT user2/user2
    Connected as USER2@
    SQL> SELECT COUNT(1) from user1.emp_xt_view
    SELECT COUNT(1) from user1.emp_xt_view
    Error at line 0
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    ORA-04043: object "USER1"."EMP_XT" does not exist
    SQL> CONNECT user1/user1
    Connected as USER1@
    SQL> GRANT SELECT ON user1.emp_xt TO user2
    Grant complete.
    SQL> CONNECT user2/user2
    Connected as USER2@
    SQL> SELECT COUNT(1) from user1.emp_xt_view
      COUNT(1)
             4
    1 row selected.
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    user503699 wrote:
    user1983440 wrote:
    Can someone explain why the error near the bottom of the code below is occuring? If USER1 grants SELECT on the external table to USER2, then USER2 can select from the view without any problems; however, I want to avoid giving USER2 access to all of the columns in the external table. (I only want to give USER2 access to two of the four columns.)As you have demonstrated, I guess the view approach only works for database tables. External tables are actually files on the file system. Even through OS, it is not possible to grant READ/WRITE access to only part of the file. The access is for entire file. An "External Table" is just a "wrapper" provided by oracle (using data cartridge) to allow user to be able to access the file as a "table". So it can definitely not do something that underlying OS can not do.
    p.s. In fact, oracle does not even allow to edit data in external tables using SQL.Why not just make a second external table (only including the 2 columns you need) and grant select directly on that to the user. I know you say "views only" but there's an exception to every rule ... just because it's called a table doesn't make it so. You could argue an external table is nothing more than a fancy view.
    Worst case, make a view on top of the second external table.
    CREATE TABLE emp_xt_less_information
      first_name VARCHAR2(30),
      last_name  VARCHAR2(30)
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY EXT_DATA_DIR
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'   
             emp_id      number,
             first_name  char,
             last_name   char,
             phone       char
      LOCATION ('emp.txt')
    REJECT LIMIT 0
    {code}
    Should do it, but my syntax may be off a touch ....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error when loading from External Tables in OWB 11g

    Hi,
    I face a strange problem while loading data from flat file into the External Tables.
    ORA-12899: value too large for column EXPIRED (actual: 4, maximum: 1)
    error processing column EXPIRED in row 9680 for datafile <data file location>/filename.dat
    In a total of 9771 records nearly 70 records are rejected due to the above mentioned error. The column (EXPIRED) where the error being reported doesn't have value greater than 1 at all. I suspect it to be a different problem.
    Example: One such record that got rejected is as follows:
    C|234|Littérature commentée|*N*|2354|123
    highlightened in Bold is the EXPIRED Column.
    When I tried to insert this record into the External Table using UTL_FILE Utility it got loaded successfully. But when I try with the file already existing in the file directory it again fails with the above error, and I would like to mention that all the records which have been loaded are not Ok, please have a look at the DESCRIPTION Column which is highlightened. The original information in the data file looks like:
    C|325|*Revue Générale*|N|2445|132
    In the External Table the Description Value is replaced by the inverted '?' as follows:
    Reue G¿rale
    Please help.
    Thanks,
    JL.

    user1130292 wrote:
    Hi,
    I face a strange problem while loading data from flat file into the External Tables.
    ORA-12899: value too large for column EXPIRED (actual: 4, maximum: 1)
    error processing column EXPIRED in row 9680 for datafile <data file location>/filename.dat
    In a total of 9771 records nearly 70 records are rejected due to the above mentioned error. The column (EXPIRED) where the error being reported doesn't have value greater than 1 at all. I suspect it to be a different problem.
    Example: One such record that got rejected is as follows:
    C|234|Littérature commentée|*N*|2354|123
    highlightened in Bold is the EXPIRED Column.
    When I tried to insert this record into the External Table using UTL_FILE Utility it got loaded successfully. But when I try with the file already existing in the file directory it again fails with the above error, and I would like to mention that all the records which have been loaded are not Ok, please have a look at the DESCRIPTION Column which is highlightened. The original information in the data file looks like:
    C|325|*Revue Générale*|N|2445|132
    In the External Table the Description Value is replaced by the inverted '?' as follows:
    Reue G¿rale
    Please help.
    Thanks,
    JL.sorry, couldnt see the highlighted test.could you plesae enclsoe it in  tags
    also post the table definition with attributes. BTW..Whats your NLS_LANGUAGE SET TO?

  • Comparison of Data Loading techniques - Sql Loader & External Tables

    Below are 2 techniques using which the data can be loaded from Flat files to oracle tables.
    1)     SQL Loader:
    a.     Place the flat file( .txt or .csv) on the desired Location.
    b.     Create a control file
    Load Data
    Infile "Mytextfile.txt" (-- file containing table data , specify paths correctly, it could be .csv as well)
    Append or Truncate (-- based on requirement) into oracle tablename
    Separated by "," (or the delimiter we use in input file) optionally enclosed by
    (Field1, field2, field3 etc)
    c.     Now run sqlldr utility of oracle on sql command prompt as
    sqlldr username/password .CTL filename
    d.     The data can be verified by selecting the data from the table.
    Select * from oracle_table;
    2)     External Table:
    a.     Place the flat file (.txt or .csv) on the desired location.
    abc.csv
    1,one,first
    2,two,second
    3,three,third
    4,four,fourth
    b.     Create a directory
    create or replace directory ext_dir as '/home/rene/ext_dir'; -- path where the source file is kept
    c.     After granting appropriate permissions to the user, we can create external table like below.
    create table ext_table_csv (
    i Number,
    n Varchar2(20),
    m Varchar2(20)
    organization external (
    type oracle_loader
    default directory ext_dir
    access parameters (
    records delimited by newline
    fields terminated by ','
    missing field values are null
    location ('file.csv')
    reject limit unlimited;
    d.     Verify data by selecting it from the external table now
    select * from ext_table_csv;
    External tables feature is a complement to existing SQL*Loader functionality.
    It allows you to –
    •     Access data in external sources as if it were in a table in the database.
    •     Merge a flat file with an existing table in one statement.
    •     Sort a flat file on the way into a table you want compressed nicely
    •     Do a parallel direct path load -- without splitting up the input file, writing
    Shortcomings:
    •     External tables are read-only.
    •     No data manipulation language (DML) operations or index creation is allowed on an external table.
    Using Sql Loader You can –
    •     Load the data from a stored procedure or trigger (insert is not sqlldr)
    •     Do multi-table inserts
    •     Flow the data through a pipelined plsql function for cleansing/transformation
    Comparison for data loading
    To make the loading operation faster, the degree of parallelism can be set to any number, e.g 4
    So, when you created the external table, the database will divide the file to be read by four processes running in parallel. This parallelism happens automatically, with no additional effort on your part, and is really quite convenient. To parallelize this load using SQL*Loader, you would have had to manually divide your input file into multiple smaller files.
    Conclusion:
    SQL*Loader may be the better choice in data loading situations that require additional indexing of the staging table. However, we can always copy the data from external tables to Oracle Tables using DB links.

    Please let me know your views on this.

  • Create external table fails

    I'm trying to map a trace file to an external table' but I'm getting "missing keyword" error.
    set verify off
    create or replace directory 'TRACE_DIR' as '/db_home/oracle/product/diag/rdbms/test/dtms_t/trace';
    column id new_value os_user;
    SELECT sys_context('USERENV', 'OS_USER') id FROM DUAL;
    BEGIN
          EXECUTE IMMEDIATE 'alter session set tracefile_identifier = &os_user' ;
    END;
    column tracefile_loc new_value tracefile
    select SUBSTR(tracefile_loc,INSTR(tracefile_loc,'/',-1)+1) tracefile_loc
    from
    ( select value ||'/'||(select instance_name from v$instance) ||'_ora_'||
                  (select spid||case when traceid is not null then '_'||traceid else null end
                        from v$process where addr = (select paddr from v$session
                                                     where sid = (select sid from v$mystat
                                                                  where rownum = 1
                  ) || '.trc' tracefile_loc
       from v$parameter where name = 'user_dump_dest'
    jbrock@ddtms_t> CREATE TABLE trace_ext
      2                     (line varchar2(80)
      3                     )
      4       ORGANIZATION EXTERNAL
      5       (
      6         TYPE ORACLE_LOADER
      7         DEFAULT DIRECTORY trace_dir
      8         ACCESS PARAMETERS
      9         (
    10           records delimited by newline
    11           missing field values are null
    12           ( line
    13           )
    14         )
    15         LOCATION (&&tracefile)
    16       )
    17       REJECT LIMIT UNLIMITED;
           LOCATION (ddtms_t_ora_9101_JBROCK.trc)
    ERROR at line 15:
    ORA-00905: missing keyword

    Hi,
    jimmyb wrote:
    ... jbrock@ddtms_t> CREATE TABLE trace_ext
    2                     (line varchar2(80)
    3                     )
    4       ORGANIZATION EXTERNAL
    5       (
    6         TYPE ORACLE_LOADER
    7         DEFAULT DIRECTORY trace_dir
    8         ACCESS PARAMETERS
    9         (
    10           records delimited by newline
    11           missing field values are null
    12           ( line
    13           )
    14         )
    15         LOCATION (&&tracefile)
    16       )
    17       REJECT LIMIT UNLIMITED;
    LOCATION (ddtms_t_ora_9101_JBROCK.trc)
    ERROR at line 15:
    ORA-00905: missing keyword
    Doesn't the location have to be in single-qutoes? For line 15, try
    LOCATION ('&&tracefile')

  • External Table LKM: error during task interpretation

    I've had this problem more than once now, using "LKM File to Oracle (EXTERNAL TABLE)". Before the interface can even run, I get an error, as if the script can't be output. I've tried removing the LKM and reimporting. No use. I am using this LKM successfully in other projects... not sure why it would have issues here. When I had this problem previously, Oracle Support couldn't reproduce it (they certainly tried). I managed to work around it then, but now... this is getting problematic. Insight welcome.
    Here's the start of the error:
    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: Error during task interpretation
    Task:6
    java.lang.Exception: BeanShell script error: Sourced file: inline evaluation of: ``out.print("The application script threw an exception: java.lang.StringIndexOutOf . . . '' Token Parsing Error: Lexical error at line 2, column 42. Encountered: "\\" (92), after : "": <at unknown location>
    BSF info: Create external table at line: 0 column: columnNo
         at com.sunopsis.dwg.codeinterpretor.a.a(a.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Text:The application script threw an exception: java.lang.StringIndexOutOfBoundsException: *String index out of range: 2* BSF info: Create external table at line: 0 column: columnNo

    Hi,
    I have this exact problem, did you get a solution?
    Thanks

  • "Open in external sample editor" seems to be broken?

    Hey all,
    I'm hoping that someone can help me figure this out. I'm using Logic Pro X 10.0.7 in conjunction with Adobe Audition CS6. This problem seems to happen intermittently, and on some of my machines, but not others. I've also witnessed it on others' machines as well.
    When I try to open a region of audio in the external sample editor (For which I've set up Adobe Audtion CS6 to do destructive edits), I can manage to get the file to open correctly in Audition. HOWEVER, when I make my edits in audition and try to SAVE the file in Audition to send it back to Logic Pro X, I get an error message that the file cannot be saved because it is "in use by another application". It's almost as if Logic doesn't release the file to the external sample editor in order for it to be overwritten, and updated.
    When I switch back to Logic, after I get the error message, Logic "refreshes" the waveform information, but it's still unchanged, because the external sample editor can't save the changes that I've made to the region. Can anyone relate? Offer me useful tips on how to fix this? Is it a bad configuration on my end, or just a bug in Logic?
    Thanks,
    Steve

    Ok so I think I might have figured this out on my own... Apparently, if you highlight a region, and the region is open in Logic's Editor window, while you're trying to edit the region with an external editor like Audition, it will throw the "file is in use by another application" error, when you try to save the changes you've made in the external editor. I found that if I close the "Editor" window in Logic, before trying to open the region in Audition, Audition is then able to save the changes to the file.
    Derp.

  • How to remove carraige return from the field while loading external table

    I am facing an issue of not getting rid of carraige returns present in the fileds of the source .csv file while loading the records into external table.
    I had tried using LRTRIM, but it does not help.
    The error I am getting is:
    KUP-04021: field formatting error for field POPULATION_DESCRIPTION
    KUP-04037: terminator not found
    I am pasting one record out of the .csv file which is causing this error as below:
    "Business Card Accounts
    ",123,7 BizCard - Gamers,Control,"Business Card Accounts
    ",75270,75271
    You can see the carraige return in the 1st field as well as 5th field. Filed are separated by commas & eclosed by double quotes.
    Could anybody help on this please?

    Can you copy the file to an external table only version, and then dos2unix it?
    Alternatively, you can use the ACCESS PARAMETERS area in your external table definition to set that your RECORDS DELIMITED BY carriage returns, instead of the default.
    Check out the example here http://www.psoug.org/reference/externaltab.html

  • URGENT : Regarding External Table

    Hi,
    We have some external tables in our production environment. In unix level we have two users 1) ORACLE (Primary Group DBA, Secondary group RELEASE)
    2) PROD (Primary Group RELEASE).
    Now the log file directory of external table owned by PROD user and RELEASE group.
    What minimum priviledges is reqire in unix level, so that ORACLE user can create log files for external tables there.
    I have tried with 775, but it is trrowing the follwoing error :
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: unable to open log file log_flow.log
    OS error Permission denied
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    ORA-06512: at line 1
    Can any one suggest ASAP.
    One more Issue I have facing with external tables. The follwoing select "select * from dba_directories" showing all the directories I have created (data,log,reject,error), but "select * from dba_external_locations" showing only the data file locations not showing the error,log and reject location, and when the DATABASE is bounced due to some other reason the DDL of external table get changed (error,log and reject file location was not there). Can any one suggest any work around.
    Any body can call me up in any one of the following nos.
    Ph(O) : (+44)1173024701
    Ph(M) : (+44)7772341689
    Thanks & Regards,
    Koushik Chandra

    Hi,
    Have you try to create a file manually with oracle user ito this log directory ?
    Have you check the good directory ?
    dba_external_locations It describes the locations (data sources) of all external tables in the database.
    Nicolas.
    PS : you know, today is saturday, and in most of countries, saturday is the week-end - in other word not working -, since this forum is based on volunteers, you can wait some time an answer, if you have. If it's very urgent, contact your oracle support service.

  • External Sample Editor Broken

    "To transfer audio edited in the external sample editor back to Logic Pro
    Save the file in the external sample editor, then switch back to Logic Pro.
    The edited audio will be updated in the Audio Bin and Arrange area, if regions based on the audio file are in use. "
    This USED to be true but no longer
    I'm using Melodyne Single Track and instead of updating the relevant file in the arrange window I'm having to 'reimport' the tuned file.

    Ok so I think I might have figured this out on my own... Apparently, if you highlight a region, and the region is open in Logic's Editor window, while you're trying to edit the region with an external editor like Audition, it will throw the "file is in use by another application" error, when you try to save the changes you've made in the external editor. I found that if I close the "Editor" window in Logic, before trying to open the region in Audition, Audition is then able to save the changes to the file.
    Derp.

Maybe you are looking for