External table: ORA-029913 only through connection allias TNS

Hello world

I have a problem on an Oracle 11.2.0.3 database. They have an external table MYTABLE that points to an Oracle MYDIR directory. This directory is a text file MyFile.txt, read by the external table.

If I connect to the database using "sqlplus user/pass" directly from the DB server, the statement 'select count (*) from' myTable works very well.

If I connect using a LMO allias "sqlplus user/pass@DB", the statement is wrong:

SQL> select count (*) from MYTABLE;
select count (*) from MYTABLE
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file myfile.txt in MYDIR not found

The user application oracle has READ and write on the Oracle MYDIR directory.

The OS 'oracle' user permissions to write to the directory of the OS.

The problem occurs with the application user, but also with sys and system.

You have an idea? What could make the statement works in direct relation and fail to remote access?

Thanks for your help.

Michael

I finally found the solution! The oracle user has been recently added to the group. The database was relaunched after this change, but the listener has only been reloaded. All processes spawned by the receiver have been opened with privileges evil and that's why my local connections can get access to the file system and not open remote session.

THW following note has helped me find the solution: ORA-29283 "Operation file not valid" with OS group and Oracle user is a member (Doc ID 832424.1).

The note is only on the basis of data Oracle itself, but I tried to restart the receiver and it solved my problem.

Thanks for your help

Tags: Database

Similar Questions

  • External table ORA-30657: operation not supported on external organized tab

    Hi all
    I'm trying to create a table outside and fill it with data from my DB. Without the AS - Section all right. The external table will be created, but I do not get the data into it. Is there a possible way to write data defined in a flat file via external table or some other mechanism?

    Carsten cordially

    The full statement:

    CREATE or REPLACE DIRECTORY admin_dat_dir
    LIKE 'E:\CDDTEST ';
    CREATE or REPLACE DIRECTORY admin_log_dir
    LIKE 'E:\CDDTEST ';
    CREATE or REPLACE DIRECTORY admin_bad_dir
    LIKE 'E:\CDDTEST ';
    DROP TABLE cdd_ext_vt;
    -creation of the external table
    CREATE TABLE cdd_ext_vt
    (vertrag_nr VARCHAR2 (25),)
    kunden_name VARCHAR2 (60)
    )
    EXTERNAL ORGANIZATION
    (
    TYPE ORACLE_LOADER
    Admin_dat_dir default DIRECTORY
    ACCESS SETTINGS
    (
    records delimited by newline
    BadFile admin_bad_dir:'empxt%a_%p.bad'
    logfile admin_log_dir:'empxt%a_%p.log'
    fields completed by «,»
    missing field values are null
    (vetrag_nr, kunden_name
    )
    )
    LOCATION ("cdd_ext_vt.dat")
    )
    REJECT LIMIT UNLIMITED

    AS
    Select vt.vertrag, chr (34) | Trim (Person.Name) | Chr (34)
    VT, person
    where vt.syskd = person.sysperson
    and rownum < 11
    ;

    Carsten,

    You can use this to dump this procedure in csv file

    create or replace function  dump_csv( p_query     in varchar2,
                                          p_separator in varchar2 default ',',
                                          p_dir       in varchar2 ,
                                          p_filename  in varchar2 )
    return number
    is
        l_output        utl_file.file_type;
        l_theCursor     integer default dbms_sql.open_cursor;
        l_columnValue   varchar2(4000);
        l_status        integer;
        l_colCnt        number default 0;
        l_separator     varchar2(10) default '';
        l_cnt           number default 0;
    begin
        l_output := utl_file.fopen( p_dir, p_filename, 'w' );
    
        dbms_sql.parse(  l_theCursor,  p_query, dbms_sql.native );
    
        for i in 1 .. 255 loop
            begin
                dbms_sql.define_column( l_theCursor, i, l_columnValue, 4000 );
                l_colCnt := i;
            exception
                when others then
                    if ( sqlcode = -1007 ) then exit;
                    else
                        raise;
                    end if;
            end;
        end loop;
    
        dbms_sql.define_column( l_theCursor, 1, l_columnValue, 4000 );
    
        l_status := dbms_sql.execute(l_theCursor);
    
        loop
            exit when ( dbms_sql.fetch_rows(l_theCursor) <= 0 );
            l_separator := '';
            for i in 1 .. l_colCnt loop
                dbms_sql.column_value( l_theCursor, i, l_columnValue );
                utl_file.put( l_output, l_separator || l_columnValue );
                l_separator := p_separator;
            end loop;
            utl_file.new_line( l_output );
            l_cnt := l_cnt+1;
        end loop;
        dbms_sql.close_cursor(l_theCursor);
    
        utl_file.fclose( l_output );
        return l_cnt;
    end dump_csv;
    /
    
    REM Here is an example of using the above:
    
    create or replace procedure test_dump_csv
    as
        l_rows  number;
    begin
        l_rows := dump_csv( 'select * from all_users where rownum < 25', ',', '/tmp', 'test.dat' );
    end;
    /
    

    HTH
    SS

  • Several flat_files through the external table with only the common columns of loading

    Hi, I have 50 flat files and each of them have some columns (fields) common and I need to load only the fields that are common to an external Table. Is any chance to do it with education unique external table. Or I need to load all flat_files at separate tables and then with the ETG and UNION load them only one table.

    If the page size for all the files are different, I think that your only option would be to define different external tables and create a view that joins all the.

    HTH
    Srini

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

  • ORA-29913 for external table on Windows 7

    Hello

    Please help with the following problem.

    I installed Oracle 11 g on Windows 7 Pro workstation and have created an external table.

    I'm getting an ORA-29913 when I select.

    What I did is given below.

    create the directory imp_files as 'C:\app\user\admin\orcl\dpdump\'-'C:\orcl_work '.
    ;

    drop table people
    ;
    create table people)
    first name varchar2 (250).
    VARCHAR2 (250) last_name,.
    hire_date date,
    number of salary
    )
    (external) Organization
    type oracle_loader
    the default directory data_pump_dir
    (settings) access
    records delimited by newline
    BadFile data_pump_dir: 'pers1%a_%p.bad' /*'pers.bad'*/
    data_pump_dir log file: "pers1%a_%p.log" /*'pers.log'*/
    fields termintated by ' |'
    missing field values are null
    (first_name, last_name, hire_date 'dd.mm.yyyy' format mask, salary)
    )
    location ("pers_table1.txt")
    )
    reject limit unlimited
    ;

    Hello

    you completed wrongly spelt...

    Try to fix that and try again.

    See you soon,.

    rich

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

  • ORA-29913 of the external table error: error in executing ODCIEXTTABLEOPEN legend

    Hello

    I am getting error for an external table, after trying to load data from external table to a pipe delimited file.
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file BIPO_04_28_2010_18_53_11.txt in AB501 not found
    29913. 00000 -  "error in executing %s callout"
    *Cause:    The execution of the specified callout caused an error.
    *Action:   Examine the error messages take appropriate action.
    Here's the code for creating table
    CREATE TABLE ' || whr_ext_tab || '
        (
            partner_product_code VARCHAR2(30), -- Partner’s product code or part number
            product_description VARCHAR2(60), -- Product description
            po_comments VARCHAR2(254), -- Purchase Order Comments
            wr_member_number VARCHAR2(60), -- Rewards Member Number
        )
        ORGANIZATION EXTERNAL
          (  TYPE ORACLE_LOADER
             DEFAULT DIRECTORY "<dir>"
             ACCESS PARAMETERS
               ( RECORDS DELIMITED BY NEWLINE
                        BADFILE ''BIPO.bad''
                        LOGFILE ''BIPO.log''
                        FIELDS TERMINATED BY ''|''
                        MISSING FIELD VALUES ARE NULL
                 )
             LOCATION ("<dir>":''<fn>'')
          )
        REJECT LIMIT UNLIMITED
        NOPARALLEL
        NOMONITORING
      ';
    Thank you
    Sandy

    Have you seen this in the error message:

    KUP-04040: file BIPO_04_28_2010_18_53_11.txt in AB501 not found
    

    What is the file exists in the directory? You have permissions to read from the object Directory logical Oracle? You have OS permissions to read from this directory?

  • field of varchar2 external table storing only 255 bytes (4000 bytes)

    Hi all

    I was wondering if someone can tell me what im missing here.
    I have an external table with one column defined as varchar2 (4000 byte). the file contains a line with 255 characters (all the number 2 for simplicity). When I query the table, everything is fine. If I add 1 plus 2 chain (256 characters) it fails. im sure its something stupidly simple, but what am I missing? If he doesn't have to question fine up to 4000 characters?

    Thank you
    Dave

    I ran your testcase, thanks for that.
    Make sure you read the SQL and PL/SQL FAQ as well (the first thread sticky on this forum), he explains how to post the code formatted and many other things.

    In any case, the .log file gave me:

    LOG file opened at 07/18/11 20:05:33
    
    Field Definitions for table DAVEP2
      Record format DELIMITED, delimited by 0A
      Data in file has same endianness as the platform
      Rows with all null fields are accepted
    
      Fields in Data Source: 
    
        MY_STRING                       CHAR (255)
          Terminated by ","
          Enclosed by """ and """
          Trim whitespace same as SQL Loader
    

    So, what happens if you create the table as follows:

     CREATE TABLE davep2 (
       my_string         VARCHAR2(4000 BYTE)         NULL
     )
     ORGANIZATION EXTERNAL
       (  TYPE ORACLE_LOADER
          DEFAULT DIRECTORY FILE_TEST
          ACCESS PARAMETERS
            ( RECORDS DELIMITED BY  0x'0A'  BADFILE FILE_TEST:'davep2.bad'
      LOGFILE FILE_TEST:'davep2.log'
      FIELDS TERMINATED BY ',' optionally enclosed by '"' and '"'
      missing field values are null
       (
               my_string char(4000)
               ) )
          LOCATION (FILE_TEST:'DaveP.csv')) REJECT LIMIT 0 NOPARALLEL
    
  • Need to change column Datatype on external Table

    Hi - I need to change a data type of column on an external table and I have a few questions.

    1. I've read that I can do a regular alter table change column statement, but I also see in the script behind the external table, the following instructions:
     FIELDS  MISSING FIELD VALUES ARE NULL(
            claim_number           POSITION(1-12)   INTEGER EXTERNAL(12),
            receipt_date           POSITION(13-8)   INTEGER EXTERNAL(8),
    ........
    When I run the statement column change he does not alter the column but does nothing in this clause. Is it possible to update this info as well?

    I wonder also (currently working at dev with a specification of invalid directory - soon to solve) - will I encounter a problem if I try to edit my article, if a file is located in the related directory? I ask because I know that to change the data type of the existing column in a table standard you must first set this null column, so I wonder how this rul applies when it is an external table.

    Thank you!
    Christine

    An external table does not store any data. The external file that contains data is only available at query time. You can remove the outer table and re-create it to change both the data type of the column in the table and the type of data in the file. using the statement ALTER TABLE... Type MODIFY instruction, you can modify the data of table column. You can also change the definition of the external table if the file is stored in the direcory and ready to be read through the external table.

    In an ordinary table, you can decrease the length of the column if the column is no longer, then the new column length:

    SQL >desc test
    Nome                Nullo? Tipo
    ----------------- -------- ------------
    A                 NOT NULL NUMBER
    B                          VARCHAR2(30)
    C                 NOT NULL NUMBER
    D                          DATE
    E                          DATE
    
    SQL >alter table test modify b varchar2(10);
    Tabella modificata.
    
    SQL >alter table test modify b varchar2(1);
    alter table test modify b varchar2(1)
    *
    ERRORE alla riga 1:
    ORA-01441: cannot decrease column
    length because some value is too big
    

    Max

  • External USB hard drives lose its connection and work stoppages. __

    External USB hard drives lose its connection and work stoppages.      History
     
    Windows 7 Ultimate - 64-bit
    I installed it on a HP Pavilion, OS, 64-bit, and I have this problem.
    People report that it does not occur with Windows 7 32 bit OS.

    Problem:
    Any brand of external hard drive USB (and other USB devices sometimes) lose its connection and stops working only when copying large files internal drive to external USB drives.
    The USB device may appear to work properly when Windows first starts, but later stops working (crashes computer) after the start of large files to copy. You must restart Windows for the USB is working again.
    This only occurs when you copy files large files to THE USB port, not on the internal drive. It happened when I synicing my IPhone with Itunes when it started the synchronization of music files.

    According to the suggestions I have:
    1) updated the BIOS from the websites of the manufacturers.
    (2) power management disabled on the USB hub for disks
    (3) ensure that the BIOS for Legacy USB is set to.  I don't have this option in the BIOS settings.
    (4) this is not a motherboard problem, it is located on three different MB that we use.
    Also tried three different USB drives and different cables.

    Because I tested with two different computers updated and USB drives, our opinion is that this problem indicates that the Windows 7 64-bit operating system.

    Someone knows a solution?

    Hi Jh6284,

    Thank you for posting.
    What is a version of Windows 7 RC or RTM?

    You can try to uninstall and reinstall the drivers for the USB ports in Device Manager.

    UNINSTALL ALL USB ENTRIES IN DEVICE MANAGER ASSOCIATES.

    1. click on START
    2. right click "Computer" and select "Properties".
    3. on the left side, click on Device Manager.
    4. expand the 'USB Bus controllers' category
    5. right click and uninstall all THE references listed
    6. restart your computer and check if it works.
     
    I suggest you go to the Web site of the manufacturer of your and try to install the latest drivers for the chipset. Make sure that install you in compatibility mode there is no driver for Windows 7 64 bit.

    Please go through the article below to install in compatibility mode.
    http://social.technet.Microsoft.com/forums/en-us/w7itproappcompat/thread/cdd894f8-1ee2-43e5-952b-d04c25779a7f

    Kind regards
    Technical support of Microsoft-yama.

  • The external Table storage

    Since data is stored outdoors, and the definition that is stored inside, it means that a the table structure of the outer table is stored in the database as well (or a virtual table based on the definition of the external table...)

    I'll hit the ORA-DOCS again once, back in the external tables read tonight on them 2 or 3 sources and it is not quite clear whether real data with structure exists outside the database or an internal table set (and stored) retrieves data from an outside source.

    Since data is stored outdoors, and the definition that is stored inside, it means that a the table structure of the outer table is stored in the database as well (or a virtual table based on the definition of the external table...)

    The 'definition' you refer to IS the structure of the table; they are one and the same. There is no 'table' stored in the database using space or storage. When a query on an external table is executed, the data source is read.

    
    I'll be hitting the ORA-DOCS up again, just got back into external tables tonight reading up on them from 2-3 sources and it is not quite clear if an actual data with structure exists out of the database , or an internally defined (and stored?) table draws data from an outside source.
    

    I suggest you that start with the documentation of Oracle - including the ground provided the link to:

    If any "metadata" are stored outside the database depends on if the file that is outside of the database was produced by Oracle using the robot UNLOADING discussed in this doc

    Unloading of data using ORACLE_DATAPUMP Access driver

    To unload data, you use the ORACLE_DATAPUMP driver access. The stream that is discharged is in a proprietary format and contains all of the data column for each row being unloaded.

    A discharge operation also creates a stream of metadata that describes the content of the data stream. The information in the metadata stream are required to load the stream. Therefore, the metadata stream is written to the file data and placed before the data stream.

    If YOU provide data/files, then you MUST provide it in the format expected by the external table statement. You can, if you wish, use a preprocessor to convert ANY file (zip, encrypted, etc.) in the required format.

    For YOUR files, you can the metadata stored in the same file, or elsewhere, if you choose, but Oracle will have NO knowledge of this fact and not will NOT be involved in the transformation or read any of the metadata that you provide. Your preprocessor must remove all these metadata and ONLY provide data in the format appropriate for Oracle to use.

    If the file was produced by the process of UNLOADING Oracle then it will include metadata that Oracle WILL read, use, and remove as says this quote from doc above. These external metadata is added to the real external table definintion/metadata stored in the dictionary.

  • Bulk insert in an external table

    Hi, I get the error ora-29913, ora-01410 trying to do a bulk insert of external table

    INSERT

    IN CORE_TB_LOG

    (SELECT 'MODEL', 'ARCH_BH_MODEL', ROWID, "MODEL-D-000000001', - 45, 'A', SYSDATE, 'R'")

    OF ARCH_BH_MODEL1

    WHERE length (MOD_XCODIGO) > 10)

    INSERT

    *

    ERROR on line 1:

    ORA-29913: error in executing ODCIEXTTABLEFETCH legend

    ORA-01410: invalid ROWID

    ARCH_BH_MODEL1 is the external table.


    What's wrong?


    Thank you.

    Hello

    There is no ROWID in external tables.

    It makes sense: ROWID identifies where a line is stored in the database; It shows the data file and the block number in this file.

    External tables are not stored in the database.  They exist independently of any data file in the database.  The concept of an Oracle block does not apply to them.

    Why would you copy the ROWID, even if you could?

    Apart from ROWID and SYSDATE, you select only literals.  You don't want to select all the real data of the external table?

    What is the big picture here?  Post a small example of data (a CREATE TABLE statement and a small data file for the external table) and the desired results from these sample data (in other words, what core_tb_log must contain after INSERTION is complete.)  Explain how you get these results from data provided.

    Check out the Forum FAQ: Re: 2. How can I ask a question on the forums?

  • Error when calling a procedure using an external table with c#.

    Hello

    I'm developing an application scheduler with Visual Studio 2010 (c#) to start my PL/SQL procedures.

    Everything works fine with each procedure, but one who reads the contents of an external table.

    Strange thing is when I start the same procedure with Toad, I have no problem, but when I run with my c# code:

    OracleCommand cmdMET = new OracleCommand();

    cmdMET.CommandText = 'STG_AE. M_MET_S_EXT_DEFECT ';

    cmdMET.CommandType = CommandType.StoredProcedure;

    con = cmdMET.Connection;

    OracleParameter retvalMET = new OracleParameter ("value", OracleDbType.Varchar2, 50);

    retvalMET.Direction = ParameterDirection.ReturnValue;

    cmdMET.Parameters.Add (retvalMET);

    cmdMET.ExecuteNonQuery ();

    I got this error:

    ORA-29913: error in executing ODCIEXTTABLEFETCH legend

    ORA-01722: invalid number

    ORA-06512: at "STG_AE. M_MET_S_EXT_DEFECT', line 8

    ORA-06512: at "STG_AE. MET_SRC', line 10

    ORA-06512: at "STG_AE. PUTS", line 14

    ORA-06512: at line 1

    I can't understand why it works when I run it with Toad and why I get this error when launching of it with c#... Any advice would be great!

    Thank you!

    I can't understand why it works when I run it with Toad and why I get this error when launching of it with c#... Any advice would be great!

    The error led to think that a string to number conversion fails all by accessing the external table.

    What is the format of numeric fields in the external file?

    I'm guessing that your session NLS_NUMERIC_CHARACTERS setting is defined differently whether you're in your application c# or toad.

    Could check you on both?

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

  • Using the external table error

    Hi all

    This is the first time I use the external table for loading the data.

    I did these steps

    In the D:\sqlloade folder, I have my text file containing data example.txt

    I ran these queries

    CREATE OR REPLACE DIRECTORY  ext_tab_data AS 'D:\sqlloader';
    
    

    Directory created

    CREATE TABLE fxops.t_ext (
    t number
    )
    ORGANIZATION EXTERNAL (
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY ext_tab_data
      ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        MISSING FIELD VALUES ARE NULL
        (
         t number
        )
      )
      LOCATION ('sample.txt')
    )
    PARALLEL 5
    REJECT LIMIT UNLIMITED;
    
    

    create table

    When I tried to create a view on that table, he throws an error

    CREATE OR REPLACE VIEW fxops.t_view  AS
      SELECT *
      FROM   fxops.t_ext;
    
    SQL Error: ORA-06564: object EXT_TAB_DATA does not exist
    06564. 00000 -  "object %s does not exist"
    *Cause:    The named object could not be found.  Either it does not exist
               or you do not have permission to access it.
    *Action:   Create the object or get permission to access it.
    
    

    Sign in, and then run this:

    Select HOST_NAME from v$ instance;

    is this the same hostname that you are connected?

    Kind regards

    Harry

Maybe you are looking for