External Table – Simple" application

Hello Again,
I am trying to install "External Table – Simple” application  and following is the instruction:
Installation
1.     Login to SQL*Plus as a user with dba privileges, such as system and run the create_directory.sql script . >This script will prompt you for a physical directory on the host OS where the database is installed. It will also >prompt you for the schema that your APEX application will parse as.
2.     Copy employees.txt into the physical directory that you specified in the previous step.
3.     Import the APEX application file ExtTable_APEX_Sample.sql using the Application Express web interface.
I could not continue for step 2 and 3 and I got following message:
Either the DATA_LOAD directory does not exist or this database schema does not have read / write access to >it. Please re-run the create_directory.sql script.I need someone’s help to continue it.
Thanks in advance,
Sam

What's the output of:
select * from all_directories where directory_name='DATA_LOAD'
?

Similar Messages

  • Error 'Loading Textfile data into external table'

    I am using Apex 2.0, Oralce Database 10G and Internet Explorer (version 6.5)
    I tried to run following code using SQLCommands of SQLWORKSHOP of Apex
    Code Here:
    declare
    ddl1 varchar2(200);
    ddl2 varchar2(4000);
    begin
    ddl1 := 'create or replace directory data_dir as
    ''C:\LAUSD_DATA\''';
    execute immediate ddl1;
    ddl2:= 'create table tbl_temp_autoload
    (ID NUMBER,
         RECTYPE VARCHAR2(2),
         EXPORTNBR NUMBER(2),
         EXPORTDATE DATE,
         BIMAGEID VARCHAR2(11),
         APPLICNBR NUMBER(10),
         MEALIMAGE VARCHAR2(17),
         MEDIIMAGE VARCHAR2(17),
         LANGUAGE VARCHAR2(1),
         APPLICCNT NUMBER(1),
         OTHAPPLICNBR VARCHAR2(10),
         PEDETDATE DATE,
         PESTATUS VARCHAR2(1),
         ERRORREMARKS VARCHAR2(50),
         COMMENTS VARCHAR2(50),
         SID1 VARCHAR2(10),
         WID1 NUMBER(10),
         MEDIROW1 VARCHAR2(1),
         LASTNAME1 VARCHAR2(20),
         FIRSTNAME1 VARCHAR2(20),
         SCHOOL1 VARCHAR2(15),
         LOCCD1 VARCHAR2(4),
         BIRTHDATE1 DATE,
         CASENBR1 VARCHAR2(15),
         FOSTER1 VARCHAR2(1),
         CHILDINC1 VARCHAR2(4),
         RACEAIAN VARCHAR2(1),
         RACEBAA VARCHAR2(1),
         RACENHPI VARCHAR2(1),
         RACEASIAN VARCHAR2(1),
         RACEWHITE VARCHAR2(1),
         HISPANIC VARCHAR2(1),
         NOTHISPANIC VARCHAR2(1),
         ADULTSIG3 VARCHAR2(1),
         ADULTSIGDATE3 VARCHAR2(10),
         ADULTNAME3 VARCHAR2(30),
         SSN3 VARCHAR2(1),
         SSN3NOT VARCHAR2(1),
         ADDRESS VARCHAR2(30),
         APTNBR VARCHAR2(6),
         CTY VARCHAR2(20),
         ZIP NUMBER(5),
         PHONEHOME VARCHAR2(12),
         PHONEWORK VARCHAR2(12),
         PHONEEXTEN VARCHAR2(6),
         MEALROWA VARCHAR2(1),
         LNAMEA VARCHAR2(20),
         FNAMEA VARCHAR2(20),
         MINITA VARCHAR2(6),
         GENDERA VARCHAR2(1),
         AGEA NUMBER(2),
         MOTYPEA VARCHAR2(1),
         MONAMEA VARCHAR2(1),
         FATYPEA VARCHAR2(1),
         FANAMEA VARCHAR2(1),
         FAMNBR NUMBER(1),
         PARENTINC NUMBER(5),
         FAMILYINC NUMBER(5),
         FAMILYSIZE NUMBER(2),
         PGSIG1 VARCHAR2(1),
         PGNAME1 VARCHAR2(30),
         PGSIGDATE1 VARCHAR2(10),
         FAMSIZE1 VARCHAR2(2),
         FAMINC1 VARCHAR2(6),
         PGSIG2 VARCHAR2(1),
         PGNAME2 VARCHAR2(30),
         PGSIGDATE2 DATE,
         FAMSIZE2 VARCHAR2(2),
         FAMINC2 VARCHAR2(4),
         GRADE NUMBER(2),
         SCHOOL VARCHAR2(40),
         RACE VARCHAR2(4),
         MEDI_CALID VARCHAR2(15),
         MEDSTATUS VARCHAR2(1),
         ADULT1NAME VARCHAR2(40),
         ADULT1TYPE VARCHAR2(1),
         ADULT1INC1 VARCHAR2(5),
         ADULT1INC2 VARCHAR2(5),
         ADULT1INC3 VARCHAR2(5),
         ADULT1INC4 VARCHAR2(5),
         ADULT2NAME VARCHAR2(40),
         ADULT2TYPE VARCHAR2(1),
         ADULT2INC1 VARCHAR2(5),
         ADULT2INC2 VARCHAR2(5),
         ADULT2INC3 VARCHAR2(5),
         ADULT2INC4 VARCHAR2(5),
         ADULT3NAME VARCHAR2(40),
         ADULT3TYPE VARCHAR2(1),
         ADULT3INC1 VARCHAR2(5),
         ADULT3INC2 VARCHAR2(5),
         ADULT3INC3 VARCHAR2(5),
         ADULT3INC4 VARCHAR2(5),
         ADULT4NAME VARCHAR2(40),
         ADULT4TYPE VARCHAR2(1),
         ADULT4INC1 VARCHAR2(5),
         ADULT4INC2 VARCHAR2(5),
         ADULT4INC3 VARCHAR2(5),
         ADULT4INC4 VARCHAR2(5),
         ADULT5NAME VARCHAR2(40),
         ADULT5TYPE VARCHAR2(1),
         ADULT5INC1 VARCHAR2(5),
         ADULT5INC2 VARCHAR2(5),
         ADULT5INC3 VARCHAR2(5),
         ADULT5INC4 VARCHAR2(5),
         ADULT6NAME VARCHAR2(40),
         ADULT6TYPE VARCHAR2(1),
         ADULT6INC1 VARCHAR2(5),
         ADULT6INC2 VARCHAR2(5),
         ADULT6INC3 VARCHAR2(5),
         ADULT6INC4 VARCHAR2(5),
         AGE1LT19 VARCHAR2(1),
         AGE2LT19 VARCHAR2(1),
         AGE3LT19 VARCHAR2(1),
         AGE4LT19 VARCHAR2(1),
         AGE5LT19 VARCHAR2(1),
         AGE6LT19 VARCHAR2(1),
         MIDINIT1 VARCHAR2(1)
    organization external
    ( type oracle_loader
    default directory data_dir
    access parameters
    ( fields terminated by '','' )
    location (''DataJuly07.txt'')
    execute immediate ddl2;
    end;
    Error Received:
    ORA-29913:error in executing ODCIEXITTABLEFETCH callout ORA-30653: reject limit reached
    Please help ASAP. I am new with oracle and Apex. Any help will be appreciated greatly.

    I downloaded the External table simple application from the Apex Packaged application and installed it. It installed successfully but when I run it - it doesn't load the data eventhough I get a message stating it was successful. I am running it on OracleXE - Apex 3.0.1.
    In addition, I tried running the stored procedure directly (ext_employees_load) in sql-developer and received the ora-30648.
    Please help.
    thanks,
    Tom

  • External Table Application

    Trying to install the External_Table_Simple_0.9 application but I am receiving errors.
    I installed the application but it could not see the flat file, so I de-installed and on re-install I got these errors.
    report error:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: unable to open log file EXT_EMPLOYEES_EXTERNAL_5476_2344.log
    OS error The data is invalid.
    Has anybody experienced this.
    Gus

    Gus,
    Copy and paste will not do the work every time.
    I copied and pasted the package definition you posted and it won't compile. One
    of the declarations is not properly quoted:
    x :=
             q'! comment on table ext_employees is 'Data loaded: !'
          || TO_CHAR (SYSDATE, 'FMDay, Mon ddth, hh:mi am');
       x := x || q'! by !' || NVL (v ('APP_USER'), USER) || q'!' !';
       EXECUTE IMMEDIATE x;
    ...Other than that, you also had an inproper positioning specification here:
    FIRST_NAME position(8:22),
    last_name position(23:34),
    where you didn't consider whitspace between the two columns.
    I assume the file you use is of fixed column length. I used the information
    you pasted here and modified it accordingly to get a fixed lenght of the columns:
    EMP_ID FIRST_NAME LAST_NAME EMAIL    PHONE_NUMBER HIRE_DATE  JOB_ID  SALARY COMM_PCT MGR_ID DEPT_ID
    100    Steven     King      SKING    515.123.4567 06/17/1987 AD_PRES 24000           90
    101    Neena      Kochhar   NKOCHHAR 515.123.4568 09/21/1989 AD_VP   17000           100    90
    102    Lex        De Haan   LDEHAAN  515.123.4569 01/13/1993 AD_VP   17000           100    90
    103    Al         Hunold    AHUNOLD  590.423.4567 01/03/1990 IT_PROG 9000            102    60Saved it as employees.txt into the directory DATA_LOAD.
    Running the following script will create an external table:
    CREATE TABLE ext_employees_external
      employee_id     VARCHAR(20),
      first_name      VARCHAR(20),
      last_name       VARCHAR(20),
      email           VARCHAR(20),
      phone_number    VARCHAR(20),
      hire_date       VARCHAR(20),
      job_id          VARCHAR(20),
      salary          VARCHAR(20),
      commission_pct  VARCHAR(20),
      manager_id      VARCHAR(20),
      department_id   VARCHAR(20)
    ORGANIZATION EXTERNAL
      (  TYPE oracle_loader
         DEFAULT DIRECTORY data_load
         ACCESS PARAMETERS
           ( RECORDS DELIMITED BY NEWLINE
    SKIP 2
    FIELDS MISSING FIELD VALUES ARE NULL(
    employee_id POSITION(001:006),
    first_name POSITION(008:0017),
    last_name POSITION(019:027),
    email POSITION(029:036),
    phone_number POSITION(038:049),
    hire_date POSITION(051:060) ,
    job_id POSITION(062:068),
    salary POSITION(070:075),
    commission_pct POSITION(077:083),
    manager_id POSITION(086:092),
    department_id POSITION(093:100)
         LOCATION (data_load:'employees.txt')
    REJECT LIMIT 10
    NOPARALLEL
    NOMONITORING;This table is reading the data properly. You may now include this in your procedure.
    You certanly need to have a look at your .txt file and exactly determie the column
    widths. I was using varchar2 in the column definiton of the extenal table. Since you are
    loading the external table into your "real" table, you may want to perform data
    conversion at that point.
    The directory I specified in this script is DATA_LOAD. Your directory may be different.
    Denes Kubicek

  • External Table Security with OBIEE 11G is not working properly.

    Hello Everyone,
    we just upgraded for OBIEE from 10G to 11G.
    not what we had in 10G for object level and data level security is that we were using "External table" and LDAP Authentication.
    Now for User we are capturing Groups in that table, so basically we have Group-level security.
    so in that case we are creating Groups in External Table, RPD & Catalog.
    Now we upgraded OBIEE to 11G, there we have totally different concept for security.
    So here in what we have to do to implement the same concept. because we have created the Application Roles in Admin Console and Groups in Enterprise Manager with same name, and assigned same Groups to same Application Role.
    now while applying security in frontend we can catalog groups options too!!! so do we have to create the same groups in catalog too?? and while applying the security to catalog which one do we need to use? "Application Role" OR "Catalog Groups"???
    Thanking You..

    Hi,
    which version r u using? until obiee11.1.1.5 its bug but solve it by workaround method . also the bug fixed in obiee.11.1.1.6
    11700314 REPORT NOT EXPORTED FULLY INTO EXCEL WHEN DOWNLOADING FROM PAGES OTHER THAN 1
    1) stop it all u r bi serivices then take a back of u original instanconfig.xml file then do the below changes
    D:\Oracle\Middleware\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1
    instanceconfig.xml
    just add below content then
    <Views>
    <Pivot>
    <MaxCells>6500000</MaxCells>
    <MaxVisibleColumns>100</MaxVisibleColumns>
    <MaxVisiblePages>1000</MaxVisiblePages>
    <MaxVisibleRows>65000</MaxVisibleRows>
    <MaxVisibleSections>25</MaxVisibleSections>
    <DefaultRowsDisplayed>500</DefaultRowsDisplayed>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DefaultRowsDisplayedInDownload>64000</DefaultRowsDisplayedInDownload>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DisableAutoPreview>false</DisableAutoPreview>
    </Pivot>
    <Table>
    <MaxCells>6500000</MaxCells>
    <MaxVisiblePages>1000</MaxVisiblePages>
    <MaxVisibleRows>65000</MaxVisibleRows>
    <MaxVisibleSections>25</MaxVisibleSections>
    <DefaultRowsDisplayed>500</DefaultRowsDisplayed>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
    <!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager--><DefaultRowsDisplayedInDownload>64000</DefaultRowsDisplayedInDownload>
    </Table>
    </Views>
    Restart all u r bi services..
    then test it out.
    Thanks
    Deva

  • Error in Loading a clob via external table (Oracle 10.2.0.3 On Solaris 8)

    Hi,
    I am trying to insert a csv file as a single record as a CLOB (one row for entire csv file) and trying to do that via external table. But unalbe to do so. Following is the syntax I tried with:
    create table testext_tab2
      ( file_data clob
      organization external
         TYPE ORACLE_LOADER
         DEFAULT DIRECTORY dir_n1
      access parameters
             RECORDS DELIMITED BY NEWLINE
               BADFILE DIR_N1:'lob_tab_%a_%p.bad'
                 LOGFILE DIR_N1:'lob_tab_%a_%p.log'
                 FIELDS TERMINATED BY ','
              MISSING FIELD VALUES ARE NULL
      clob_filename CHAR(100)
      COLUMN TRANSFORMS  (file_data FROM LOBFILE (clob_filename) FROM (DIR_N1) CLOB)
      LOCATION ('emp.txt')
    REJECT LIMIT UNLIMITED
    --it gives the output that the table is created but the table does not have any rows (select count(*) from testext_tab2 gives 0 rows)
    -- and the logfile has entries like follows:
      Fields in Data Source:
        CLOB_FILENAME                   CHAR (100)
          Terminated by ","
          Trim whitespace same as SQL Loader
      Column Transformations
        FILE_DATA
            is set from a LOBFILE
                directory is from constant DIR_N1
                    directory object list is ignored
                file is from field CLOB_FILENAME
                file contains character data
                    in character set WE8ISO8859P1
    KUP-04001: error opening file /oracle/dba/dir_n1/7369
    KUP-04017: OS message: No such file or directory
    KUP-04065: error processing LOBFILE for field FILE_DATA
    KUP-04101: record 1 rejected in file /oracle/dba/dir_n1/emp.txt
    KUP-04001: error opening file /oracle/dba/dir_n1/7499
    KUP-04017: OS message: No such file or directory
    KUP-04065: error processing LOBFILE for field FILE_DATA
    KUP-04101: record 2 rejected in file /oracle/dba/dir_n1/emp.txt
    KUP-04001: error opening file /oracle/dba/dir_n1/7521
    KUP-04017: OS message: No such file or directory
    KUP-04065: error processing LOBFILE for field FILE_DATA
    KUP-04101: record 3 rejected in file /oracle/dba/dir_n1/emp.txt
    and also the file to be loaded (emp.txt) has data like this:
    7369,SMITH,CLERK,7902,12/17/1980,800,null,20
    7499,ALLEN,SALESMAN,7698,2/20/1981,1600,300,30
    7521,WARD,SALESMAN,7698,2/22/1981,1250,500,30
    7566,JONES,MANAGER,7839,4/2/1981,2975,null,20
    7654,MARTIN,SALESMAN,7698,9/28/1981,1250,1400,30
    7698,BLAKE,MANAGER,7839,5/1/1981,2850,null,30
    7782,CLARK,MANAGER,7839,6/9/1981,2450,null,10
    7788,SCOTT,ANALYST,7566,12/9/1982,3000,null,20
    7839,KING,PRESIDENT,null,11/17/1981,5000,null,10
    7844,TURNER,SALESMAN,7698,9/8/1981,1500,0,30
    7876,ADAMS,CLERK,7788,1/12/1983,1100,null,20
    7900,JAMES,CLERK,7698,12/3/1981,950,null,30
    7902,FORD,ANALYST,7566,12/3/1981,3000,null,20
    7934,MILLER,CLERK,7782,1/23/1982,1300,null,10I will be thankful for help on this. Also I read on asktom site (http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1669379500346411993)
    that LOB are not supported for external tables but there are other sites with examples of CLOB being loaded by external tables.
    With regards,
    Orausern

    CMcM wrote:
    Hi all
    We have an application that runs fine on 10.2.0.4 on most platforms, but a customer has reported an error when running 10.2.0.3 on HP. We have since reproduced the error on 10.2.0.3 on XP but have failed to reproduce it on Solaris or Linux.
    The exact error is within a set of procedures, but the simplest reproducible form of the error is pasted in below.Except that you haven't pasted output to show us what the actual error is. Are we supposed to guess?
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    vstrg clob:= 'A';
      3    Thisstrg varchar2(32000);
      4  begin
      5    for i in 1..31999 loop
      6      vstrg := vstrg||'A';
      7    end loop;
      8    ThisStrg := vStrg;
      9* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL>Works ok for me on 10.2.0.1 (Windows 2003 server)

  • Error while importing external table

    Hello,
    I am getting the following error message when trying to import an external table:
    SQL Exception
    SQL Exception
    Repository Error:SQL Exception..
    Class Name: CacheMediator.
    Method Name: getDDEntryFromDB.
    Repository Error Message: ORA-22992: cannot use LOB locators selected from remote tables
    I am using the "import..."- function of "external tables" in warehouse target module. The external table is working correctly when accessing it via sqlplus.
    We are using owb version 10.2.0.1.
    Any help would be appreciated.
    Best regards
    Alexander

    My friends, this a documented BUG into Metalink, but there is no solution.
    I used a simple workaround:
    1. I created the external table into the database;
    2. I created the external table into the OWB repository;
    3. I DIDN'T DEPLOY THE EXTERNAL TABLE TO THE DATABASE;
    4. I used the external table into my mappings with no problems;
    5. Finishing, I deployed my mappings to the database without any errors.
    Hope to help!,
    Gustavo.

  • Error while calling an procedure using an external table with C#.

    Hello,
    I am developping a scheduler application with Visual Studio 2010 (C#) to start my PL/SQL procedures.
    Everything works fine with every procedure but one who is reading the content of an external table.
    Strange thing is when i launch the same procedure with Toad, i have no problem, but when i launch it with my C# code :
                OracleCommand cmdMET = new OracleCommand();
                cmdMET.CommandText = "STG_AE.M_MET_S_EXT_DEFECT";
                cmdMET.CommandType = CommandType.StoredProcedure;
                cmdMET.Connection = con;
                //OracleParameter retvalMET = new OracleParameter("retval", OracleDbType.Varchar2, 50);
                //retvalMET.Direction = ParameterDirection.ReturnValue;
                //cmdMET.Parameters.Add(retvalMET);
                cmdMET.ExecuteNonQuery();
    I've got this error :
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    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.MET", line 14
    ORA-06512: at line 1
    I can't figure out why it works when i launch it with Toad and why i get this error when launching it with C#... Any advice would be great !
    Thanks!

    You're right!
    Adding
    string sql = "ALTER SESSION SET NLS_NUMERIC_CHARACTERS = \",.\"";
    OracleCommand cmd = new OracleCommand(sql, con);
    cmd.CommandType = CommandType.Text;
    OracleDataReader dr = cmd.ExecuteReader();
    solved the problem !
    Thanks a lot =)

  • XML File in External Table - OS error permission denied.

    Hi.
    10g R2, Red Hat Linux
    I'm using the article (see below, taken from http://www.dbazine.com/olc/olc-articles/scardina1 by Mark Scardina) to create an external table where I'd store my XML file.
    So, I
    1. Created a directory xmlfile_dir
    2. Granted access to needed db user
    3. Created the table
    CREATE TABLE relayxml_xt (doc CLOB)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY xmlfile_dir
    ACCESS PARAMETERS
    FIELDS (lobfn CHAR TERMINATED BY ',')
    COLUMN TRANSFORMS (doc FROM lobfile (lobfn))
    LOCATION ('xml.dat')
    REJECT LIMIT UNLIMITED;
    4. mv relay.xml /xmlfile_dir/xml.dat
    When I run SELECT * FROM relayxml_xt I get this:
    Error starting at line 1 in command:
    select * from relayxml_xt
    Error report:
    SQL Error: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: unable to open log file RELAYXML_XT_28773.log
    OS error Permission denied
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    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.
    What am I doing wrong?
    Thanks,
    Using External Tables
    Introduced in Oracle9i, Oracle’s external table feature offers a solution to define a table in the database while leaving the data stored outside of the database. Prior to Oracle Database 10g, external tables can be used only as read-only tables. In other words, if you create an external table for XML files, these files can be queries and the table can be joined with other tables. However, no DML operations, such as INSERT, UPDATE, and DELETE, are allowed on the external tables.
    Note: In Oracle Database 10g , by using the ORACLE_DATAPUMP driver instead of the default ORACLE_DRIVER, you can write to external tables. In Oracle Database 10g, you can define VARCHAR2 and CLOB columns in external tables to store XML documents. The following example shows how you can create an external table with a CLOB column to store the XML documents. First, you need to create a DIRECTORY to read the data files:
    CREATE DIRECTORY data_file_dir AS 'D:\xmlbook\Examples\Chapter9\src\xml';
    GRANT READ, WRITE ON DIRECTORY data_file_dir TO demo;
    Then, you can use this DIRECTORY to define an external table:
    CREATE TABLE customer_xt (doc CLOB)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY data_file_dir
    ACCESS PARAMETERS
    FIELDS (lobfn CHAR TERMINATED BY ',')
    COLUMN TRANSFORMS (doc FROM lobfile (lobfn))
    LOCATION ('xml.dat')
    REJECT LIMIT UNLIMITED;
    The xml.dat file follows:
    customer1.xml
    customer2.xml
    If you describe the table, you can see the following definition:
    SQL> DESC customer_xt;
    Name Null? Type
    DOC CLOB
    Then, you can query the XML document as follows:
    SELECT XMLType(doc).extract('/Customer/EMAIL')
    FROM customer_xt;
    Though the query requires run-time XMLType creation and XPath evaluation, this approach is useful when applications just need a few queries on the XML data and don’t want to upload the XML data into database. In Oracle Database 10g, you cannot create external tables that contain pre-defined XMLType column types.
    Message was edited by:
    vi2167

    Your don't have the proper operating system privileges. Be sure that you (=oracle OS user / the OS Linux user that is starting the database) are allowed have read privs on the path and/or file.
    for example...
    chown -Rf /xxxxxxx/xxxx/etc
    ls -l file.xml
    file.xml    oracle:oinstall    rw-rw-rw

  • 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

  • How to insert filename as column in external table.

    I have an external table that is made up by number of different files. I would like to add a new column in the table to store the actual external filename. How can this be done?
    thanks in advanced

    That's going to be a problem, then. The ISO 8859-1 character set doesn't support that character, so you cannot store a ™ in a CHAR or VARCHAR2 column in your database.
    Potentially, you could use an NCHAR or NVARCHAR2 column, depending on your national character set. Using the national character set, though, can cause other problems, particularly for front-end applications that may not fully support those data types.
    You could also potentially change your existing character set to something that does support that character, but that may be a rather involved sort of change.
    Justin

  • Error in simple Application

    Hi all,
        since i am relatively new to this field, i created a simple application which takes in carrid and displays the sflight details...i too have binded the table but whenever i try to test the application it displays the following error_..."Adapter error in INPUT_FIELD "INPUT_CARRID" of view "Z_TEST_DETAILS.MAIN": Context binding for property VALUE cannot be resolved: The MAIN.1.SFLIGHT1 node does not contain any elements "*_
    i even cannot enter debug mode because it dumps in the beginning.Could you please help me out with this.
    Thanks and regards,
    Urbashi

    hi Abhi...
    dat problem is solved bt nw after entering the carrid it again dumps saying "Number of Elements of the Collection of Node MAIN.1.SFLIGHT1 Violates the Cardinality. "
    i have set the cardinality to 1-n.
    the code written is:
    data itab_sflight type standard table of  sflight.
        DATA lo_nd_sflight1 TYPE REF TO if_wd_context_node.
        DATA lo_el_sflight1 TYPE REF TO if_wd_context_element.
        DATA ls_sflight1 TYPE wd_this->Element_sflight1.
        DATA lv_carrid TYPE wd_this->Element_sflight1-carrid.
      navigate from <CONTEXT> to <SFLIGHT1> via lead selection
        lo_nd_sflight1 = wd_context->get_child_node( name = wd_this->wdctx_sflight1 ).
      @TODO handle non existant child
      IF lo_nd_sflight1 IS INITIAL.
      ENDIF.
      get element via lead selection
        lo_el_sflight1 = lo_nd_sflight1->get_element( ).
      alternative access  via index
      lo_el_sflight1 = lo_nd_sflight1->get_element( index = 1 ).
      @TODO handle not set lead selection
        IF lo_el_sflight1 IS INITIAL.
        ENDIF.
      get single attribute
        lo_el_sflight1->get_attribute(
          EXPORTING
            name =  `CARRID`
          IMPORTING
            value = lv_carrid ).
    select * from sflight into table itab_sflight
      where carrid = 'lv_carrid'.
    lo_nd_sflight1 = wd_context->get_child_node( name = wd_this->wdctx_SFLIGHT1 ).
    lo_nd_sflight1->bind_table( itab_sflight ).
    Regards,
    Urbashi

  • Showing Text file as external table without trimming spaces

    Hi all:
    I am trying to display a text file from db sever with original spacing.
    Well it's not entirely related to APEX.
    This is how external table is created:
    create table u_x
      (rowline varchar2(255))
         ORGANIZATION EXTERNAL
           TYPE ORACLE_LOADER
           DEFAULT DIRECTORY ext_tab         <-- this is a dir i have created
           access parameters
           records delimited by newline
           fields notrim
           LOCATION ('aaa.txt')
    REJECT LIMIT UNLIMITED;
    on the first line of the aaa.text (its a report), it shows something like:
    Sat Dec 29                                                                Page 1
    but when I do select * from u_x , the result shows:
    Sat Dec 29 Page 1
    all above is done in sql workshop /sql command in APEX 4.2.1 (db 10.2.0.5)
    Is there any way to preserve the spaces between "29" and "Page"?
    (the result compressed all spaces in-between to 1 space).
    I think the ideal way is to invoke client's notepad to open the server's text file.
    anyway to generate the link?
    Thanks
    John

    Well, I have tried to download the file using below procedure.
    create or replace PROCEDURE download_bfile (
          directory_in   IN   VARCHAR2,
          file_in        IN   VARCHAR2
       AS
          lob_loc    BFILE;
          v_mime     VARCHAR2 (48);
          v_length   NUMBER(16);
       BEGIN
          lob_loc := BFILENAME (UPPER (directory_in), file_in);
          v_length := DBMS_LOB.getlength (lob_loc);
          -- set up HTTP header
          -- use an NVL around the mime type and
          -- if it is a null set it to application/octect
          -- application/octect may launch a download window from windows
          OWA_UTIL.mime_header (nvl(v_mime, 'application/octet'), FALSE);
          -- set the size so the browser knows how much to download
          HTP.p ('Content-length: ' || v_length);
          -- the filename will be used by the browser if the users does a save as
          HTP.p (   'Content-Disposition:attachment; filename="'
                 || SUBSTR (file_in, INSTR (file_in, '/') + 1)
                 || '";'
          -- close the headers
          OWA_UTIL.http_header_close;
          -- download the BLOB
          WPG_DOCLOAD.download_file (lob_loc);
          apex_application.stop_apex_engine;
       END download_bfile;
    I run it inside sql command in apex, but it does not show a pop window to save the file,
    it displays the whole text content of the file in the result window.
    Any idea why the save-as window does not pop up?
    thanks,
    John.

  • ORA-00942 when creating external table under 10g with AQ

    I have an application that runs with AQ. The front-end queues up batch-type
    tasks in a queue. When one particular kind of message is dequeued, it
    initiates a data load. That load requires the creation of an external
    table.
    The schema in question is owned by user BL (bulkload). The queue
    is owned by BLB (bulkload batch), primarily to simplify some of the
    rules needed by the resource manager in order to limit the total CPU
    a batch process can consume. The BLB user has full access to the
    BL schema, along with the following rights:
    CREATE TYPE
    CREATE TABLE
    CREATE SEQUENCE
    CREATE PROCEDURE
    CREATE VIEW
    CREATE SYNONYM
    CREATE SEQUENCE
    ALTER SESSION
    CREATE SESSION
    QUERY REWRITE
    CREATE ANY CONTEXT
    EXECUTE_CATALOG_ROLE
    CREATE MATERIALIZED VIEW
    CREATE ANY DIRECTORY
    DROP ANY DIRECTORY
    The table creation works fine under 9.2.0.8 (our current required
    version). However the application generates an ORA-00942 table or view does
    not exist when run under 10g (10.2.0.1 and 10.2.0.3).
    The following statement is the problem:
    CREATE TABLE bulkload33 (
              field1 VARCHAR2(2000),field2 VARCHAR2(2000),field3 VARCHAR2(2000))
              ORGANIZATION EXTERNAL (
              TYPE oracle_loader DEFAULT DIRECTORY EXT_100
              ACCESS PARAMETERS ( RECORDS DELIMITED BY "\r\n"
              CHARACTERSET 'WE8ISO8859P1'
              BADFILE EXT_100:'bulkload_bad.csv'
              LOGFILE EXT_100:'bulkload_log.csv'
              FIELDS TERMINATED BY ','
              OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS (
              field1 CHAR(2000),field2 CHAR(2000),field3 CHAR(2000),field4 CHAR(2000)))
              LOCATION ('bulkload.csv')
              ) REJECT LIMIT UNLIMITED PARALLEL;
    To clarify, the preceding statement, when handled by the process
    for a queue message, failes with an ORA-00942.
    Note that I can issue the command directly, as BLB or SYS, against
    the BL schema with no problems. Further, as user BLB or SYS, I can do
    the following:
    CREATE OR REPLACE PROCEDURE dotest
    IS
         l_sql varchar2(2000);
    BEGIN
         l_sql := 'CREATE TABLE bulkload33 (
              field1 VARCHAR2(2000),field2 VARCHAR2(2000),field3 VARCHAR2(2000))
              ORGANIZATION EXTERNAL (
              TYPE oracle_loader DEFAULT DIRECTORY EXT_100
              ACCESS PARAMETERS ( RECORDS DELIMITED BY "\r\n"
              CHARACTERSET ''WE8ISO8859P1''
              BADFILE EXT_100:''bulkload_bad.csv''
              LOGFILE EXT_100:''bulkload_log.csv''
              FIELDS TERMINATED BY '',''
              OPTIONALLY ENCLOSED BY ''"'' MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS (
              field1 CHAR(2000),field2 CHAR(2000),field3 CHAR(2000),field4 CHAR(2000)))
              LOCATION (''bulkload.csv'')
              ) REJECT LIMIT UNLIMITED PARALLEL';
         EXECUTE IMMEDIATE l_sql;
    END;
    show errors
    EXEC dotest
    Does anyone have any ideas of why this doesn't work under 10g? Metalink
    has yielded no clues so far.
    Thanks.

    Define "has full access to the BL schema" given that it is impossible to grant access rights, in Oracle, by schema. What was done and how was it done?
    My guess is that the privs were granted in a role, rather than explicitly, as is required for PL/SQL.

  • External Table - Issues With Special Character.

    I have an external table that reads from a fixed length file. The file is expected to contain special characters. In my case the word containing special character is "Göteborg". Because "ö" is a special character, looks like Oracle is considering it as 2 bytes. That causes the trouble. The subsequent fields in the files get shifted by 1 byte thereby messing up the data. Has anyone faced the issue before. So far we have tried the following solution:
    Changed the value of NLS_LANG to AMERICAN_AMERICA.WE8ISO8859P1
    Tried Setting the Database Character set to UTF-8
    Tried changing the NLS_LENGTH_SYMMANTIC to CHAR instead of BYTE using ALTER SYSTEM
    Tried changing the External table characterset to: AL32UTF8
    Tried changing the External table characterset to: UTF-8
    Nothing works. Other details include:
    • File is UTF-8 encoded
    • Operating System : RHEL
    • Database: Oracle 11gR2
    Any thing else that I might be missing? Any help will be appreciated. Thanks in advance!
    Ganesh

    CREATE TABLE "APP_XXX_XX_XXXX"(
    "KEY_NO" NUMBER,
    "XXX_XXX_XXXXX" VARCHAR2(1 CHAR),
    "XXX_XXX_XXXXX" NUMBER(9,0),
    "XXX_XXX_XXXXX" NUMBER(4,0),
    "XXX_XXX_XXXXX" NUMBER(2,0),
    "XXX_XXX_XXXXX" NUMBER(3,0))
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY "DIR"
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    CHARACTERSET 'UTF8'
    LOGFILE APP_XXX_XX_XXXX_%A_%P.LOG'
    BADFILE 'APP_XXX_XX_XXXX_%A_%P.BAD'
    DISCARDFILE 'APP_XXX_XX_XXXX_%A_%P.DSC'
    FIELDS(
    KEY_NO POSITION(1:9) INTEGER EXTERNAL,
    XXX_XXX_XXXXX POSITION(10:10) CHAR,
    XXX_XXX_XXXXX POSITION(11:19) INTEGER EXTERNAL,
    XXX_XXX_XXXXX POSITION(11:14) INTEGER EXTERNAL,
    XXX_XXX_XXXXX POSITION(15:16) INTEGER EXTERNAL,
    XXX_XXX_XXXXX POSITION(17:19) INTEGER EXTERNAL)
    LOCATION
    ( 'FILE1.TXT')
    REJECT LIMIT UNLIMITED
    PARALLEL 4;
    The data forms part of a major driver table, which I may not be able to provide as per the NDA with my company.
    The Script I have shared is standard template for creating external table as part of our applications.
    We majorly cater for EU regions with this project.(European Characterset needed to be supported)
    Thanks
    Ganesh
    Edited by: RGRAM on Feb 11, 2011 12:44 PM

  • Simple application

    My problem is simple but not for me (I' m beginer inWeblogic BEA)
    I have one JSP in which I entering tree simple text filds.
    Those values I need to put in simple Oracle table within the Container
    Managed Entity Bean. I configure Oracle dirvers, and Oracle Connection Pool,
    but I don't know how to deploy such simple application.
    Thanks
    [email protected]

    What language are you wanting to use? If you are looking at staying with AppleScript, you might take a look at AppleScriptObjC, which lets you use AppleScript to write Cocoa applications. Take a look at MacScripter's AppleScriptObjC in Xcode for an introduction and some short tutorials.

Maybe you are looking for

  • Root.sh script failed

    Hi all, I am trying to install Oracle 11g R2 RAC on HP UX 11.3, As part of that installed Grid software. while executing roo.sh script on node 1 getting the following error. # ./root.sh Running Oracle 11g root.sh script... The following environment v

  • What version of Safari do I need for Gmail?

    What version of Safari do I need for Gmail? It says my current version (5.1.10) is outdated.

  • SAP SNC: Invoice Collaboration

    Scenario: The vendor creates a paper invoice, scans it and sends it to the customer. The customer scans it and using softwares like Readsoft/Opentext posts it in SAP ERP. Question: Can SNC possibly have a role here? How will SNC work with paper invoi

  • OS X 10.6.1, Canon Pixma MP600R, and wireless Airport Extreme Base Station

    I can't get my MacBook Pro on OS X 10.6.1 to recognise my Canon MP600R printer via my AEBS. There was no problem with its predecessor, an iBook on Tiger. As well as the MacBook I've got a PC on XP Home + SP3. The setup I'm aiming for is USB access to

  • PSE 4 for Mac coming March 3!

    Hi Everybody, I just got an email from Adobe announcing PSE 4 for Mac. Offering a $20 coupon good till Sept 06. That brings it to $79 But if you order it from Amazon, its $59 with the mail in coupon. I just pre-ordered it. Jane