External table - interprated as link to a file location

Hello everyone,

I'm usigng of external tables for the first time. I using DB version 11.2.0.1.0

I do the following:

Create the directory:

create the directory lip_test_dir as ' / daten/file_test/XML ";



Create an external table

CREATE TABLE lip_test (clob data)
EXTERNAL ORGANIZATION
(
TYPE ORACLE_LOADER
Lip_test_dir default DIRECTORY
ACCESS SETTINGS
(
FIELDS (lobfn TANK CANCEL BY EOF)
TURNS COLUMN (data FROM lobfile (lobfn))
)
LOCATION ("2011103052820853_erp2eip_iteminventory_xml.xml")
)
REJECT LIMIT UNLIMITED;


try to select data:

Select * from lip_test;

I get the following error:

ORA-29913: error in executing ODCIEXTTABLEFATCH legend
ORA-29400: data cartridge error


Check the log file shows me that the charger open the xml file and tired to open for each line in the xml file, a new file. Messages are looking like this:

KUP-04027: Dateinamenprufung nicht been: / daten/file_test/XML / <? XML version = "1.0" encoding = "UTF-8" standalone = 'no '? >
Fehler beim Öffnen von Datei, daten, file_test, XML / <? XML version = "1.0" encoding = "UTF-8" standalone = 'no '? >
KUP-04017: BS-message: no such file or directory
KUP-04065: Fehler beim use LOBFILE as Feld DATEN von
KUP-04101: Datensatz 1-Datei /daten/file_test/XML/2011103052820853_erp2eip_iteminventory_xml.xml zuruckgewiesen


If <? XML version = "1.0" encoding = "UTF-8" standalone = 'no '? > is the first line in the XML file and tries to open it as a file.
This is repeated for each line in the xml file.

Can someone explain to my why this is happening. I have queryed www for this, but I don #t know what question exectly, so I found no useful result.


I tried the following:

Re-create the table and use a text file "test.txt" as location

CREATE TABLE lip_test (clob data)
EXTERNAL ORGANIZATION
(
TYPE ORACLE_LOADER
Lip_test_dir default DIRECTORY
ACCESS SETTINGS
(
FIELDS (lobfn TANK CANCEL BY EOF)
TURNS COLUMN (data FROM lobfile (lobfn))
)
LOCATION ("test.txt")*.
)
REJECT LIMIT UNLIMITED;


In the test.txt file I just put the name of the XML file, so the value of the test.txt is

2011103052820853_erp2eip_iteminventory_xml. XML


Subsequently I query the table again:

Select * from lip_test;

No error just now came up! and the query shows me all the lines of 2011103052820853_erp2eip_iteminventory_xml.xml.

I expected to see only the name of the file as it is written in test.txt, bt now I get the result that I expect when I put location (2011103052820853_erp2eip_iteminventory_xml.xml).


Anyone know why this is happening?

Thanks a lot for your help!

Best regards from Germany
Ml «»

You will need to use the second approach, you mentioned above, with a file "test.txt" separate containing the name of the source.

Tags: Database

Similar Questions

  • error returned when I try to install an external table...

    gurus of the afternoon...

    This is the first time I tried to do this bear so please with me...

    I need to create an external table to load in regular data files prior to a MERGER past update/Insert made in ORACLE table as fact here...

    Re: Insert and add data to the table to a batch file

    But alas, my lack of knowledge has already failed here...

    ORA-06564: object CHRIS21_UPLOAD_PROCESS does not exist
    first of all, I run this...
    CREATE OR REPLACE DIRECTORY xtern_data_dir AS 'C:\worKstuff\Small Projects\CHRIS21_Upload_Process';
    .. After committing what I then...
          
    CREATE TABLE SU_XTERN_EMP_AUDIT (
    staff_member VARCHAR2(150) 
    ,surname VARCHAR2(50)
    ,forename VARCHAR2(40)
    ,preferred_name VARCHAR2(40)
    ,email_id VARCHAR2(10)
    ,email_address VARCHAR2(50)
    ,start_date VARCHAR2(10)
    ,end_date VARCHAR2(10) 
    ,posishun VARCHAR2(10)
    ,job_title VARCHAR2(40)
    ,FTE VARCHAR2(10)
    ,fac_service VARCHAR2(10)
    ,area  VARCHAR2(10)
    ,gruup  VARCHAR2(10)
    ,LOCATIONs  VARCHAR2(6)
    ,mpoposit  VARCHAR2(12)
    ,mpopstart  VARCHAR2(12)
    ,mpopend  VARCHAR2(12)
    ,mpo_fte  VARCHAR2(8)
    ,mpo_fac  VARCHAR2(8)
    ,mpo_dept  VARCHAR2(8)
    ,mpo_group  VARCHAR2(8)
    ,mpo_loc  VARCHAR2(8)
    ,termin_date VARCHAR2(10) --DATE
    ,title   VARCHAR2(8)
    ,ft_pt  VARCHAR2(2)
    ,cp_mode  VARCHAR2(2)
    ,new_status    VARCHAR2(12)
      )  
         ORGANIZATION EXTERNAL
          ( DEFAULT DIRECTORY CHRIS21_Upload_Process
            ACCESS PARAMETERS
             ( records delimited BY newline
              --fields terminated BY ','
                fields (
                staff_member position(1:150) VARCHAR2(150),
    surname position(151:201) VARCHAR2(50)
    ,forename  position(202:242) VARCHAR2(40)
    ,preferred_name  position(243:283) VARCHAR2(40)
    ,email_id  position(284:294) VARCHAR2(10)
    ,email_address  position(295:345) VARCHAR2(50)
    ,start_date  position(346:396) VARCHAR2(10)
    ,end_date  position(397:407) VARCHAR2(10) 
    ,posishun  position(408:418) VARCHAR2(10)
    ,job_title  position(419:459) VARCHAR2(40)
    ,FTE  position(460:470) VARCHAR2(10)
    ,fac_service  position(471:481) VARCHAR2(10)
    ,area   position(482:492) VARCHAR2(10)
    ,gruup   position(493:503) VARCHAR2(10)
    LOCATIONs   position(504:510) VARCHAR2(6)
    ,mpoposit   position(511:513) VARCHAR2(12)
    ,mpopstart   position(514:526) VARCHAR2(12)
    ,mpopend  position(527:539)  VARCHAR2(12)
    ,mpo_fte   position(540:548) VARCHAR2(8)
    ,mpo_fac  position(549:557)  VARCHAR2(8)
    ,mpo_dept  position(558:566)  VARCHAR2(8)
    ,mpo_group   position(567:575) VARCHAR2(8)
    ,mpo_loc   position(576:584) VARCHAR2(8)
    ,termin_date  position(585:595) VARCHAR2(10) --DATE
    ,title    position(596:604) VARCHAR2(8)
    ,ft_pt  position(605:607)  VARCHAR2(2)
    ,cp_mode   position(608:610) VARCHAR2(2)
    ,new_status   position(611:623)   VARCHAR2(12)
      )
      )
       LOCATION ('LDAP_report_TESTER_2010-09-09.csv')  
        )
    REJECT LIMIT UNLIMITED;
    Its something to do with the name of the folder I run the file from... ? ! ? Am I missing something?

    Thanks for looking...

    Steven

    Published by: Mr_Alkan on Aug 13, 2010 15:08

    Change this

    staff_member position(1:10) VARCHAR(10),
    surname position(11:60) VARCHAR(50)
    ,forename  position(61:100) VARCHAR(40)
    ,preferred_name  position(101:140) VARCHAR(40)
    ,email_id  position(141:150) VARCHAR(10)
    ,email_address  position(151:200) VARCHAR(50)
    ,start_date  position(201:210) VARCHAR(10)
    ,end_date  position(211:220) VARCHAR(10)
    ,posishun  position(221:230) VARCHAR(10)
    ,job_title  position(231:270) VARCHAR(40)
    ,FTE  position(271:280) VARCHAR(10)
    ,fac_service  position(281:290) VARCHAR(10)
    ,area   position(291:300) VARCHAR(10)
    ,gruup   position(301:310) VARCHAR(10)
    ,LOCATIONs   position(311:316) VARCHAR(6)
    ,mpoposit   position(317:328) VARCHAR(12)
    ,mpopstart   position(329:340) VARCHAR(12)
    ,mpopend  position(341:352)  VARCHAR(12)
    ,mpo_fte   position(353:360) VARCHAR(8)
    ,mpo_fac  position(361:368)  VARCHAR(8)
    ,mpo_dept  position(369:376)  VARCHAR(8)
    ,mpo_group   position(377:384) VARCHAR(8)
    ,mpo_loc   position(385:392) VARCHAR(8)
    ,termin_date  position(393:402) VARCHAR(10)
    ,title    position(403:410) VARCHAR(8)
    ,ft_pt  position(411:412)  VARCHAR(2)
    ,cp_mode   position(413:414) VARCHAR(2)
    ,new_status   position(415:426)   VARCHAR(12)
    

    TO

    staff_member position(1:10) char(10),
    surname position(11:60) char(50)
    ,forename  position(61:100) char(40)
    ,preferred_name  position(101:140) char(40)
    ,email_id  position(141:150) char(10)
    ,email_address  position(151:200) char(50)
    ,start_date  position(201:210) char(10)
    ,end_date  position(211:220) char(10)
    ,posishun  position(221:230) char(10)
    ,job_title  position(231:270) char(40)
    ,FTE  position(271:280) char(10)
    ,fac_service  position(281:290) char(10)
    ,area   position(291:300) char(10)
    ,gruup   position(301:310) char(10)
    ,LOCATIONs   position(311:316) char(6)
    ,mpoposit   position(317:328) char(12)
    ,mpopstart   position(329:340) char(12)
    ,mpopend  position(341:352)  char(12)
    ,mpo_fte   position(353:360) char(8)
    ,mpo_fac  position(361:368)  char(8)
    ,mpo_dept  position(369:376)  char(8)
    ,mpo_group   position(377:384) char(8)
    ,mpo_loc   position(385:392) char(8)
    ,termin_date  position(393:402) char(10)
    ,title    position(403:410) char(8)
    ,ft_pt  position(411:412)  char(2)
    ,cp_mode   position(413:414) char(2)
    ,new_status   position(415:426)   char(12)
    

    And see if it works.

    For more information, see this link.

    http://download.Oracle.com/docs/CD/E11882_01/server.112/e16536/et_params.htm#i1009548

    Concerning

    REDA

  • Pretreatment of an external table - table is empty at the end

    Hello

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    "CORE 11.2.0.1.0 Production."

    AMT for Solaris: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    Solaris 10 x 86

    I'm trying to create an external table that first pre-process a file and then the bed. The problem is that, in the end, the outer table is empty even if the read file is not empty.

    First, the table works gunzip on the 'employees.csv.gz' file located in/export/home/oracle/archives and then bed. The file employees.csv.gz exists in the specified location. This is the complete script:

    -This Directory keeps the archived files

    CREATE or REPLACE DIRECTORY arch_dir AS 'archives/export/home/oracle/archives";

    -This directory shows where the command gunzip

    CREATE or REPLACE the bin_dir AS DIRECTORY ' / usr/bin';

    CREATE TABLE emp_exadata

    (

    employee_id NUMBER (22, 0),

    first name VARCHAR2 (20).

    last_name VARCHAR2 (25).

    e-mail VARCHAR2 (25).

    Phone_Number VARCHAR2 (20).

    hire_date DATE,

    job_id VARCHAR2 (10),

    higher wages (22: 2),

    commission_pct NUMBER 22 (2)

    manager_id NUMBER (22, 0),

    department_id NUMBER (22, 0)

    )

    EXTERNAL ORGANIZATION

    (

    TYPE oracle_loader

    Arch_dir default DIRECTORY

    ACCESS SETTINGS

    (

    RECORDS delimited BY NEWLINE

    preprocessor bin_dir: "gunzip".

    end fields BY «»

    missing field VALUES are NULL

    (

    employe_id,

    first name,

    last_name,

    E-mail

    Phone_Number,

    hire_date CHAR date_format DATE mask "dd-mm-yyyy hh24:mi:ss."

    job_id,

    salary,

    commission_pct,

    manager_id,

    department_id

    )

    )

    LOCATION ("employees_exp.csv.gz")

    )

    REJECT LIMIT UNLIMITED;

    When I choose to emp_exadata the result set is empty!

    SELECT * FROM emp_exadata;

    no selected line

    When I look at the db server in the directory /export/home/oracle/archives I see no archived file employees_exp.csv. Here is the result of the first three lines:


    bash - $3.2-3 employees_exp.csv head

    198, Donald, Ollivier, DOCONNEL, 650.507.9833, 21/06/2007 00:00:00, SH_CLERK, 2600, 124, 50,.

    199, Douglas, grant, DGRANT, 650.507.9844, 2008-01-13 00:00:00, SH_CLERK, 2600, 124, 50,.

    200 Jennifer Whalen, JWHALEN 515.123.4444, 17/09/2003 00:00:00, AD_ASST, 4400, 101, 10.

    The end of the lines in the file line is LF (unix style). The encoding is in ANSI format.

    I tried to experiment around, but cannot view records when I select in the external table. Please help me to solve it.

    I also register the generated log file:

    LOG file opened at 01/06/15 16:40:11

    For table EMP_EXADATA field definitions

    Record format DELIMITED BY newline

    Data in file have same "endianness" as platform

    Rows with all null fields are accepted

    Fields of the Data Source:

    EMPLOYEE_ID CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    FIRST NAME CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    LAST_NAME CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    EMAIL CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    PHONE_NUMBER CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    HIRE_DATE TANK (19)

    Day DATE data type, date mask dd-mm-yyyy hh24:mi:ss

    Completed by «,»

    Trim whitespace same as SQL Loader

    JOB_ID CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    SALARY CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    COMMISSION_PCT CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    MANAGER_ID CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    DEPARTMENT_ID CHAR (255)

    Completed by «,»

    Trim whitespace same as SQL Loader

    You need to carefully examine the description of the PREPROCESSOR option in the chapter of the manual external Tables utility.

    The first point that applies to your question is that the preprocessor must write its data transformed to stdout. To do this with gunzip, you use the - c command line parameter. The second point that applies to your case, in view of the answer to the first point, is that you must write a script shell if your preprocessor requires command line settings.

    Kind regards

    Bob

  • External table to read another encoding

    Hi all

    I am having some problems with the external table. My database coding is currently AL32UTF8. If my external table wants to read the txt file with the ZHS16GBK, the value is displayed not correctly when the external table reads the file. Y at - it means to display the value in the file txt correctly without changing the database coding and coding in the txt file.

    You can give a character defined in the external table definition.
    See for example: http://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:6611962171229 #10978420712036
    There is also the {forum: id = 732} Forum, where you could find/ask as well.

  • external table data with several locations pump

    Hello
    I'm on:
    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - 64biit
    SunOS 5.10

    I am trying to create a table of data pump external at the same time, with the location of the files previously created using pump.
    This is the same as the example given in step 10-13 here:
    http://docs.Oracle.com/CD/B19306_01/server.102/b14215/et_dp_driver.htm#i1007502

    But when I do this and select all the lines in the resulting table, I get the error:

    ORA-29913: error in executing ODCIEXTTABLEFETCH legend
    ORA-29400: data cartridge error
    KUP-11011: file / < filepath > sys_tables.dmp is not valid for this load operation
    ORA-06512: at "SYS." ORACLE_DATAPUMP', line 52

    Can anyone help?
    Here is a script of what I do...


    create the directory message_archive_dir as ' / your/path/directory "; -change default directory
    -chmod 777 your way

    create the sys_tables table
    external organization
    (type ORACLE_DATAPUMP
    THE DEFAULT DIRECTORY MESSAGE_ARCHIVE_DIR
    LOCATION ("sys_tables.dmp"))
    AS
    Select object_id, object_type
    of object
    where owner = 'SYS '.
    and object_type = 'TABLE '.
    and rownum < 11;

    create the table sys_indexes
    external organization
    (type ORACLE_DATAPUMP
    THE DEFAULT DIRECTORY MESSAGE_ARCHIVE_DIR
    LOCATION ("sys_indexes.dmp"))
    AS
    Select object_id, object_type
    of object
    where owner = 'SYS '.
    and object_type = 'INDEX '.
    and rownum < 11;

    Select * from sys_tables
    Union
    Select * from sys_indexes;

    -all 20 rows returned!
    -now I combine the two dmp files in a single table...

    create the table sys_objects
    (
    object_id NUMBER (14).
    object_type VARCHAR2 (30)
    )
    EXTERNAL ORGANIZATION
    (
    TYPE ORACLE_DATAPUMP
    THE DEFAULT DIRECTORY MESSAGE_ARCHIVE_DIR
    LOCATION ('sys_indexes.dmp', 'sys_tables.dmp')
    );

    Select *.
    of sys_objects
    where rownum = 1;

    -ok returnes one line (one of the dmp files work)
    --Choose so all lines...

    Select *.
    of sys_objects;

    ORA-29913: error in executing ODCIEXTTABLEFETCH legend
    ORA-29400: data cartridge error
    KUP-11011: file / < filepath > sys_tables.dmp is not valid for this load operation
    ORA-06512: at "SYS." ORACLE_DATAPUMP', line 52

    Can you see what I'm doing wrong?

    Any help is greatly appreciated!
    Thank you.

    user9969845 wrote:
    ... Etc...

    TYPE ORACLE_DATAPUMP
    THE DEFAULT DIRECTORY MESSAGE_ARCHIVE_DIR
    LOCATION ('sys_indexes.dmp', 'sys_tables.dmp')

    Combination dump files

    Files dump populated by different external tables can all be specified in the LOCATION of another external table clause. For example, data from different databases can be unloaded in separate files, and these files can then be included in an external table defined in a data warehouse. This provides an easy way to aggregate data from multiple sources. The only restriction is that the metadata for all external tables is exactly the same. This means that the game characters, time zone, schema name, table name, and column names must match. In addition, the columns must be defined in the same order, and their data types must be identical. This means that after you create the first external table you must remove it so that you can use the same table name for the second outer table. This ensures that the metadata in two dump files is the same and they can be used together to create the external table even.
    8 2

  • External table does not appear

    DB = xe

    Hello
    I try to create an external table to refer to a csv file that contains the exif data for images. The data present exif date in the form 2011:12:03 following 16:47:27

    I built the external table as this;
    CREATE TABLE metadata_external
    ( sourcefile VARCHAR2 (255 CHAR)
    , createdate VARCHAR2 (255 CHAR)
    )
    ORGANIZATION EXTERNAL 
    ( TYPE ORACLE_LOADER
      DEFAULT DIRECTORY "UPLOAD_DIR"
      ACCESS PARAMETERS 
        ( RECORDS DELIMITED BY NEWLINE
          NOBADFILE
          NOLOGFILE
          FIELDS TERMINATED BY ','
          MISSING FIELD VALUES ARE NULL
          ( sourcefile
          , createdate
            )
              )
      LOCATION
        ( "UPLOAD_DIR":'metadata_external.csv'
          )
    ) REJECT LIMIT UNLIMITED;
    You will notice that I gave you the createdate column a varchar2 data type. This was to avoid any problems with formatting so that I could use the to_date function when inserting in the other tables.

    But the following code will not display anything that throws the following error;
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "minussign": expecting one of: "binary_double, binary_float, comma, char, date, defaultif, decimal, double, float, integer, (, nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned, varrawc, varchar, varraw, varcharc, zoned"
    KUP-01007: at line 8 column 1
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    I suspect that the: separator of date are causing problems.

    Anyone have some suggestions to solve this problem?

    Thank you
    Ben

    Try this out

    CREATE TABLE metadata_external
    (sourcefile VARCHAR2 (255 CHAR)
    date createdate
    )
    EXTERNAL ORGANIZATION
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY 'UPLOAD_DIR '.
    ACCESS SETTINGS
    (RECORDS DELIMITED BY NEWLINE
    NOBADFILE
    NOLOGFILE
    FIELDS TERMINATED BY ', '.
    MISSING FIELD VALUES ARE NULL
    (sourcefile
    createdate
    )
    )
    LOCATION
    (' UPLOAD_DIR"":'metadata_external.csv "')
    )
    ) REJECT LIMIT UNLIMITED;

    the createdate column, I guess that will contain exif data then leave as a date column, not as a varchar column.

    I have not test but try it.

    Good luck

    AbdurRahman

  • can bind us a single external table with multiple files in OWB 11 g?

    Hello

    I wanted to ask if it is possible to link an external table with several source files in same or different places? Or an external table must be bound to a single source file and one place.

    Thanks in advance,
    Ann.

    Published by: Ann on October 8, 2010 09:38

    Hello Ann,.

    Can you please help me by telling me the steps to achieve this.

    Right-click on the external table in the project tree, from the menu choose Configure.
    then open right clock the node data files dialog Configuration properties and choose from the menu - Create
    you will get a new record for the file - name of file data property

    Also the link of the OWB user guide
    http://download.Oracle.com/docs/CD/B28359_01/OWB.111/b31278/ref_def_flatfiles.htm#i1126304

    Kind regards
    Oleg

  • error when reading flat file of external table... "ORA-01849: time must be between 1 and 12"

    My question is - is it possible for me to fix this error at the level of external table definition? Please advice

    Here is the data file I am trying to download...

    KSEA | 08-10 - 2015-17.00.00 | 83.000000 | 32.000000 | 5.800000

    KBFI | 2015-08-06 - 15.00.00 | 78.000000 | 35.000000 | 0.000000

    KSEA | 08-10 - 2015-11.00.00 | 73.000000 | 55.000000 | 5.800000

    KSEA | 08-08 - 2015-05.00.00 | 61.000000 | 90.000000 | 5.800000

    KBFI | 2015-08-06 - 16.00.00 | 78.000000 | 36.000000 | 5.800000

    KSEA | 2015-08-07 - 18.00.00 | 82.000000 | 31.000000 | 10.400000

    KSEA | 08-10 - 2015-00.00.00 | 65.000000 | 61.000000 | 4.600000

    KBFI | 08-08 - 2015-07.00.00 | 63.000000 | 84.000000 | 4.600000

    KSEA | 08-10 - 2015-15.00.00 | 81.000000 | 34.000000 | 8.100000

    This is the external table script

    CREATE TABLE MWATCH. MWATCH. WEATHER_EXT ".

    (

    LOCATION_SAN VARCHAR2 (120 BYTE),

    DATE OF WEATHER_DATETIME,

    NUMBER (16) TEMP.

    NUMBER (16) OF MOISTURE,

    WIND_SPEED NUMBER (16)

    )

    EXTERNAL ORGANIZATION

    (TYPE ORACLE_LOADER

    THE DEFAULT DIRECTORY METERWATCH

    ACCESS SETTINGS

    (records delimited by newline

    BadFile "METERWATCH": "weather_bad" logfile 'METERWATCH': 'weather_log '.

    fields ended by ' |' missing field values are null

    (location_san, WEATHER_DATETIME char date_format DATE mask "YYYY-mm-dd - hh.mi.ss", TEMPERATURE, MOISTURE, wind_speed)

    )

    LOCATION (METERWATCH: 'weather.dat')

    )

    REJECT LIMIT UNLIMITED

    PARALLEL (DEGREE 5 1 INSTANCES)

    NOMONITORING;

    Here is the error in the weather_bad which is generated files...

    column WEATHER_DATETIME of 55 error processing in the 1st row to the /export/home/camsdocd/meterwatch/weather.dat data file
    ORA - 01849ther_log.log 55 56 error processing column WEATHER_DATETIME in the row 1 for the /export/home/camsdocd/meterwatch/weather.dat data file
    5756 ORA - 01849ther_log.log: time must be between 1 and 12
    58column WEATHER_DATETIME 57 error during treatment number 2 for the /export/home/camsdocd/meterwatch/weather.dat data file
    59ORA-58 01849: time must be between 1 and 12
    60column WEATHER_DATETIME of 59 error processing 5th for the /export/home/camsdocd/meterwatch/weather.dat data file
    61ORA-60 01849: time must be between 1 and 12
    62column WEATHER_DATETIME of 61 error treatment in line 6 to the /export/home/camsdocd/meterwatch/weather.dat data file
    63ORA-62 01849: time must be between 1 and 12
    64column WEATHER_DATETIME of 63 error treatment in row 7 for datafile /export/home/camsdocd/meterwatch/weather.dat
    65ORA-64 01849: time must be between 1 and 12
    66column WEATHER_DATETIME of 65 error treatment 9 for the /export/home/camsdocd/meterwatch/weather.dat data file online
    67: time must be between 1 and 12

    My question is - is it possible for me to fix this error at the level of external table definition? Please advice

    Yes it is possible.  Let's not your date mask.  You're masking for 12-hour format when your data is in 24-hour format.  Change the mask of your date to be "YYYY-mm-dd-hh24. MI.ss ".  Notice the change in "BOLD".

  • Load the XML file into Oracle external Table


    I load the data from the XML file into an intermediate table Oracle using external Tables.

    Let's say below, it is my XML file

    < header >
    < A_CNT > 10 < / A_CNT >
    < E_CNT > 10 < / E_CNT >
    < AF_CNT > 10 < / AF_CNT >
    < / header >
    < student >
    <>students-details
    < Student_info >
    < Single_Info >
    < ID > 18 / < ID >
    New York < City > < / City >
    < country > United States < / country >
    < Name_lst >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >
    Aware of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >

    < TerminationDt > 20050812 < / TerminationDt >
    History of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < / Name_lst >
    < Personal_Info >
    <>men < / Type >
    < 27 > < / Age >
    < / Personal_Info >
    < / Single_Info >
    < / Student_info >

    < student - register >
    class < A >
    < info >
    < detail >
    < ID student > 18 < / student >
    EE < major > < / Major >
    < course-Grades >
    < course > VLSI < / course >
    < degree > 3.0 < / Grade >
    < / course-Grades >
    < course-Grades >
    < course > nanotechnology < / course >
    < degree > 4.0 < / Grade >
    < / course-Grades >
    < / details >
    < detail >
    < ID student > 18 < / student >
    THIS < major > < / Major >
    < / details >
    < / info >
    class < A >
    < Student_Enrol >
    <>students-details
    < student >

    I load this XML data file into a single table using an external Table. Could someone help me please with coding.

    Thank you

    Reva

    Could you please help me how to insert my XML content into that.

    Same as before, try a plain old INSERT:

    insert into xml_pecos

    values)

    XmlType (bfilename ('XML_DIR', "test.xml"), nls_charset_id ('AL32UTF8'))

    );

    But you'll probably hit the same limitation as with the binary XMLType table.

    In this case, you can use FTP to load the file as a resource in the XML DB repository.

    If the XML schema has been registered with the hierarchy enabled then the file will be automatically inserted into the table.

    Could you post the exact statement that you used to save the scheme?

    In the meantime, you can also read this article, I did a few years ago, it covers the XML DB features that may be useful here, including details on how to load the file via FTP:

    https://odieweblog.WordPress.com/2011/11/23/Oracle-XML-DB-a-practical-example/

    And documentation of the course: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb06stt.htm#ADXDB4672

  • External table with the preprocessor file to display the list of files

    Hello

    in my db 11.2.0.2 I would create an external table with script preprocessor to show me the list of files in a directory.

    Preprocessor banally:

    #! / bin/bash

    CD/MyDir

    / bin/ls-l *.txt 2 >/dev/null

    The problem is the file name that contains white space (style windows in a Linux env), for ex:

    -rw - r - r - 1 oracle oinstall 920 9 Jun 17:37 File1.txt

    -rw - r - r - 1 oracle oinstall 72316 Jun 10 10:37 file GC output1.txt

    -rw - r - r - 1 oracle oinstall 72316 Jun 10 10:40 GC file output2.txt

    So I can't use FIELDS DELIMITED BY "". ""

    FIXED size? No, because the file size change the length of the lines.

    I tried to use awk in my preprocessos script, but I have the same problem:


    / bin/ls-l *.txt 2 >/dev/null | / bin/awk ' {printf "%s %.2d %s %s\n", $6, $ 7, $ 8, $9} '.


    Any ideas?

    Hello

    I used java to retrieve information about the files.

  • Battle of external table: files that contain only a picture

    Hello

    Does anyone know if this is possible: use an external table to load files that each contain only one photo (photo) in a BLOB column?

    So: just a photo, not other columns and not many lines.

    I tried, in the sense of this article: ORACLE-DATABASE external Tables containing LOB -

    I'm starting to believe it is not possible due to the "delimited records by ' and 'fields terminated by' clauses, which are not really applicable given files (just a picture), but maybe (hopefully), I'm wrong.

    Any pointer is more than welcome!

    BANNER

    ----------------------------------------------------------------

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

    PL/SQL Release 10.2.0.4.0 - Production

    CORE 10.2.0.4.0 Production

    AMT for HP - UX: release 10.2.0.4.0 - Production

    NLSRTL Version 10.2.0.4.0 - Production

    5 selected lines.

    SQL > drop table photo_ext is serving;

    Deleted table.

    SQL > create table photo_ext

    2 (blob_content blob

    3   )

    4 external organization

    5 (type oracle_loader

    6 default directory tmp

    7 access settings

    8 (records delimited by newline

    9 nobadfile

    10 nologfile

    11 fields completed by «,»

    12 field missing values are null

    (13)

    14 blob_filename tank (100)

    15)

    16 transformations column (lobfile (blob_filename) of the blob (tmp) blob_content)

    17)

    18 rental

    19 ("54618645837_vp3.jpg",

    20 "54618645837_vp4.jpg."

    21 "54618645837_vp2.jpg."

    22 "54618645837_vp1.jpg."

    23 "54618645837.jpg."

    24 "54618636860_vp6.jpg."

    25 "54618636860_vp5.jpg."

    26 "54618636860_vp4.jpg."

    27 "54618636860_vp3.jpg."

    28 '54618636860_vp2.jpg '.

    29       )

    30)

    31 reject limit unlimited;

    Table created.

    SQL > select DBMS_LOB.getlength (blob_content) AS blob_length of photo_ext;

    Select DBMS_LOB.getlength (blob_content) AS photo_ext blob_length

    *

    ERROR on line 1:

    ORA-29913: error in executing ODCIEXTTABLEFETCH legend

    ORA-29400: data cartridge error

    KUP-04001: doing bij openen van bestand/tmp /.

    ORA-06512: at "SYS." ORACLE_LOADER', line 52

    You need for your names to jpg files in a text file, the name of one file per line in the list, then use the name of the text file as your location in your outer table.  In the example below, I've listed just a jpg file bridge.jpg in text file test.dat.

    Scott@orcl12c > host type test.dat

    Bridge.jpg

    Scott@orcl12c > create or replace directory tmp as 'c:\my_oracle_files '.

    2.

    Created directory.

    Scott@orcl12c > create table photo_ext

    2 (blob_content blob)

    3 the external organization

    4 (type oracle_loader

    5 by default directory tmp

    6 access settings

    7 (records delimited by newline

    8 nobadfile

    9 nologfile

    10 fields completed by «,»

    11 lack of field values are null

    12 (blob_filename tank (100))

    13 column transformations

    14 (lobfile (blob_filename) of the blob (tmp) blob_content))

    15 rental ("test.dat"))

    release limit 16 unlimited

    17.

    Table created.

    Scott@orcl12c > select DBMS_LOB.getlength (blob_content) AS photo_ext blob_length

    2.

    BLOB_LENGTH

    -----------

    511500

    1 selected line.

  • How to load the file tabs with field-delimited a comma in an external table

    I am trying to create an external table in oracle 11 g r2. the script is as below. It fails if the field contains commas.

    for example, the following data will not be loaded.

    ERT 123, poipoipoi, yutio 567

    Please suggest how to solve this problem. Thank you!

    CREATE TABLE external_interaction
    (
    TAX_ID NUMBER (8).
    pubmed_id_list varchar2 (36),
    interaction_id_type varchar2 (36)
    )
    EXTERNAL ORGANIZATION
    (TYPE ORACLE_LOADER
    THE DEFAULT DIRECTORY ET_NCBI_DIR
    ACCESS SETTINGS
    (records delimited by 0 x '0A'
    jump 1
    BADFILE et_ncbi_log_dir: 'interactions.bad'
    Et_ncbi_log_dir LOG file: 'interactions.log'
    fields terminated by '\t '.
    missing field values are null
    REJECT ROWS WITH ALL FIELDS ARE NULL
    (
    TAX_ID,

    pubmed_id_list,
    interaction_id_type
    )
    )
    LOCATION (ET_NCBI_DIR: "interactions")
    )
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;

    Thanks for the reply.

    Should I use

    collumn_name tank (2000) in the table creation script because it is larger than the default char (255)

  • SQL * Loader vs external tables to a single file with several types of records (intercalated)

    I have a file of sample data (we will have the a 'true' at a later date and put in day after that) which includes a header, footer, and 5 types of records, that have different columns and lengths, noticed by the first two characters. The different types of records are not all together. On the contrary, some (in particular, two of these types in this example) are intertwined. I am currently working on a SQL * Loader configuration file when it was suggested that I use external tables. I know very little of either, then I would ask what is the best to use.

    Scott@orcl12c > host type test.dat

    header line

    AB, 123, efg

    CD, hij, 456

    Scott@orcl12c > type host test.ctl

    options (Skip = 1)

    load data

    in the ab table truncate where table_name = 'ab'

    fields ended by ',' trailing nullcols

    (table_name filler position (1), col1, col2)

    in the cd table add where table_name = 'cd'

    fields ended by ',' trailing nullcols

    (table_name filler position (1), col3, col4)

    Scott@orcl12c > create table ab

    2 (col1 number,

    3 col2 varchar2 (8))

    4.

    Table created.

    Scott@orcl12c > insert into ab values (1, 'old data')

    2.

    1 line of creation.

    Scott@orcl12c > create table cd

    2 (col3 varchar2 (8))

    3 col4 number)

    4.

    Table created.

    Scott@orcl12c > insert into cd values ("old data", 1).

    2.

    1 line of creation.

    Scott@orcl12c > commit

    2.

    Validation complete.

    Scott@orcl12c > host sqlldr scott/tiger control = test.ctl data = test.dat log = test.log

    SQL * Loader: release 12.1.0.1.0 - Production on Thu Mar 27 13:11:47 2014

    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

    Path used: classics

    Commit the point reached - the number of logical records 2

    Table AB:

    1 row loaded successfully.

    Table D:

    1 row loaded successfully.

    Check the log file:

    test.log

    For more information on the charge.

    Scott@orcl12c > select * AB

    2.

    COL1 COL2

    ---------- --------

    EFG 123

    1 selected line.

    Scott@orcl12c > select * from cd

    2.

    COL3 COL4

    -------- ----------

    old data 1

    hij 456

    2 selected lines.

  • In the external table files forming themselves!

    Hi all

    I am facing a weird situation.

    Few days back, DB has been improved to 11g 10g R2 and we are facing the situation of the training of logfiles, throw files have joined with external tables in the directory of the OS!

    Without job is calling them and the only procedure in which these paintings have been used in the SELECT statement, are not running, even while these files form themselves and fill space in the BONE.

    Here is the version information:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    PL/SQL Release 11.2.0.3.0 - Production

    "CORE 11.2.0.3.0 Production."

    AMT for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production

    NLSRTL Version 11.2.0.3.0 - Production

    Please help in this regard.

    Thank you.

    Hi all

    Problem has been identified.

    11 g, dbms_stats.gather_stats_job runs all day until 22:00 and after every 4 hours on weekends.

    He also tried gathering statistics for external tables given through the GATHER_TABLE_STATS procedure.

    In the process, he joint/written in the log files.

    Now, I think of locking statistics from this table, so that no stats will be gathered for what is just an EXTERNAL table which is used/populated only once a month.

    Suggestions or comments?

    Thank you.

  • External table with the empty file

    Hello

    My version of db: Oracle 11 g

    I have a csv file that is empty.

    I created an external table the empty csv file.

    When I run:

    Select count (*) in the externaltblname;

    It returns 1.

    It should return 0 to the right.

    In the definition, I specified "SKIP 1.

    But he always returns 1.

    When I use this external table to load into a table target. It loads a single row with null values.

    How to solve this problem. Please advice.

    What works for me is the following (t_ext points to a blank csv):

    SQL > select count (field) in the t_ext;

    COUNT (FIELD)

    ------------

    1

    1 selected line.

    SQL > select ascii (field) in the t_ext;

    ASCII (FIELD)

    ------------

    13

    1 selected line.

    SQL > select count (replace (field, chr (13))) of t_ext;

    COUNT (REPLACE (FIELD, CHR (13)))

    -----------------------------

    0

    1 selected line.

Maybe you are looking for

  • Flashing folder

    My MacBook Pro (early 2012, 13 ", with latest OS X before El Capitan, 8 GB of RAM, 1 TB HD?)  all of a sudden is gone belly up. Sunday, I started working on it at home, Monday morning at work I do absolutely no response. I forced a reboot, but was we

  • Why do I get restore window when opening firefox since the update

    Why do I get restore window when opening firefox since the update. I don't want to restore but it appears every time instead of my homepage as shown

  • Table of Boolean scanning

    I am creating a GUI scan, which scans an array of buttons (lines) and then when you press a switch Arduino, the button on the (line) which is highlighted is saved. After that the line is selected, the same thing happens in the columns table. I have t

  • I can't get any printer work with Windows XP too more.

    I can't get any printer to work with my computer which uses Windows XP.  I checked with the companies of the printer and it is not a driver problem.  In addition, these printers all work on other computers that use Windows XP.  In addition, they work

  • Windows XP system repair

    I can't boot my system missing windows system config. Cannot get to the windows screen to perform the operations advised what I would do.