External Tables on Windows
I have Oracle loaded on a Unix server. I am trying to execute stored procedures using External Tables. My external table directories reside on a Windows OS. While I was successful in creating the external tables and the logical directories mapped to the OS drectory, I was not able to execute the procedure. It came up with errors.
I have the necessary grants on these directories.
The procedures runs successfully if the directories are created on the Unix box
14:41:21 Start Executing PL/SQL block ...
14:41:21 Starting execution of PL/SQL block...
Error -29913: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file exttbl_1970284.log
OS error No such file or directory
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
14:41:21 Execution failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
14:41:21 ORA-29400: data cartridge error
14:41:21 KUP-04063: unable to open log file invpbl_1970284.log
14:41:21 OS error No such file or directory
14:41:21 ORA-06512: at line 7
14:41:21 End Executing PL/SQL block
I have checked the read/write permissions on the Windows folder and they have full access
It is critical for me to make it work on a Windows platform
Hi
Extract of Metalink note
You query the following view and found a mismatch between directory path.
SQL> select * from dba_directories ;
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS ADMIN_DAT_DIR e:\external_tables\data
SYS ADMIN_DAT_DIR e:\external_tables\bad
SYS ADMIN_DAT_DIR e:\external_tables\log
SQL> select * from dba_external_locations where table_name='ADMIN_EXT_EMPLOYEES';
OWNER TABLE_NAME LOCATION DIRECTORY_OWNER DIRECTORY_NAME
SCOTT ADMIN_EXT_EMPLOYEES empxt1.dat SYS ADMIN_DAT_DIR
SCOTT ADMIN_EXT_EMPLOYEES empxt2.dat SYS ADMIN_DAT_DIR
Fix --- Check for the OS directory "data,bad and log" exists under e:\external_tables. If this does not exist then create and rerun the query.
Regards
Hector Ulloa Ligarius
Similar Messages
-
External table in Oracle 10g and Windows server 2003 problem
I'm having a problem accessing an external table in an Oracle 10g and Windows 2003 server environment. The disk is remote (mapped) to the server. It's the usual access errors, kup-04001 or kup-04063.
I have the [seemingly] exact same setup in an Oracle 9i and Windows 2000 server environment which works perfectly. Services run as local SYSTEM and SYSTEM has full permissions on the disk. Directories exist and so do the permissions to the directories.
In the Oracle 10g and Windows 2003 environment, services run as local SYSTEM and SYSTEM has full permissions on the mapped disk. Directories exist and so do the permissions to the directories.
This obviously effects mappings, deployments, etc.
Does anyone know if something changed in either the db or the os?
Thank you,
MichaelThank you for your reply.
Your proposal is the standard solution. As a matter of fact, that's how it is on my "old" system. Server "A" Oracle services are started by SYSTEM. Server "B" Oracle services are started by SYSTEM and is where the flat files reside. SYSTEM has full permissions on a disk local to Server "B". Database directoriies defined on Server "A" point to Server "B" remote disk. External Tables on Server "A" are defined with directories that point to Server "B" remote (mapped) disk. I have no problems with this configuration.
I'm having a problem acheiving the same configuration with Oracle 10g and Windows 2003. I guess I'm baffled over the fact it isn't working the same way as my "old" environment. Why shouldn't it? Oracle (and you) want me to start services as a specific user. It shouldn't have to be that way unless something changed in the way the database makes calls to the os or if Microsoft slipped something in with one of it's numerous security patches. -
External table error in windows environment
Can i create external table from directory which is on network drive not on local server where oracle is intsalled. I am receiving follwoing error when I try to query external table poinittng to directory object on network drive in windows. Thanks
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file BRIDGIES_EXTERNAL_4564_4844.log
OS error The system cannot find the file specified.
ORA-06512: at "SYS.ORACLE_LOADER", line 19I suspect not. Copy the file to a local disk location, point the directory or a directory to it, update the external table definition if necessary, repeat. If this run works then you have your answer.
HTH -- Mark D Powell -- -
External table in Oracle 10g and Windows server 2003
I'm having a problem accessing an external table in an Oracle 10g and Windows 2003 server environment. The disk is remote (mapped) to the server. It's the usual access errors, kup-04001 or kup-04063.
I have the [seemingly] exact same setup in an Oracle 9i and Windows 2000 server environment which works perfectly. Services run as local SYSTEM and SYSTEM has full permissions on the disk. Directories exist and so do the permissions to the directories.
In the Oracle 10g and Windows 2003 environment, services run as local SYSTEM and SYSTEM has full permissions on the mapped disk. Directories exist and so do the permissions to the directories.
Does anyone know if something changed in either the db or the os?
Thank you,
MichaelVersion 9.2.04.
Server "A" Oracle services are started by SYSTEM. Server "B" Oracle services are started by SYSTEM and is where the flat files reside. SYSTEM has full permissions on a disk local to Server "B". Database directoriies defined on Server "A" point to Server "B" remote disk. External Tables on Server "A" are defined with directories that point to Server "B" remote (mapped) disk. I have no problems with this configuration.
I'm having a problem acheiving the same configuration with Oracle 10g and Windows 2003. I guess I'm baffled over the fact it isn't working the same way as my "old" environment. Why shouldn't it? Oracle (and you) want me to start services as a specific user. It shouldn't have to be that way unless something changed in the way the database makes calls to the os or if Microsoft slipped something in with one of it's numerous security patches. -
Accesing windows files using oracle unix external tables.
Hi, I'm trying to access files on windows2k using oracle external tables on unix:
Oracle server on unix: oracle ver. is 9.2.0.6 and OS is 5.8 Generic_117000-03 sun4u sparc SUNW,Sun-Fire
1. Created dir object on oracle unix pointing to windows path
2. created user
3. Assigned read and write privs on dir to user
4. created external table using dir step 1
5. select on external table
When I FTP the files into unix and recreate dir object, it works, but if I point dir object into windows path, it fails.
Is possible to do this?
Tks
GAPHi
The directory object must be accesible to your Database server, so if the Database is in unix you must create the directory in unix.
I don´t know software that allow unix systems to see a windows file system. Maybe windows can see unix from a samba server or NFS. -
EXTERNAL TABLES ON ACFS 11.2 WINDOWS
hi
I use Windows 2008R2 Std. and Oracle 11gR2 RAC
I have successfully mounted ACFS share
ASMCMD> volinfo -a
Diskgroup Name: SHARED
Volume Name: SHARED_ACFS
Volume Device: \\.\asm-shared_acfs-106
State: ENABLED
Size (MB): 8192
Resize Unit (MB): 256
Redundancy: UNPROT
Stripe Columns: 4
Stripe Width (K): 128
Usage: ACFS
Mountpath: C:\SHARED
I have created directory in Oracle mapped on ACFS share
and granted read,write access on it to my user
Then I created external table with success BUT...
though I see metadata
ADM@proton22> desc t111;
Name Null? Type
NAME VARCHAR2(4000)
VALUE VARCHAR2(4000)
I got error:
ADM@proton22> select * from t111;
select * from t111
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04027: file name check failed: C:\SHARED\EXTTAB\EXT_PARAM.log
How to cope with this? Any step by step paper?
I granted "full control" privileges to "everyone" user at OS level with no avail.
Edited by: g777 on 2011-06-02 07:12Hi!
I am facing the same problem.
Can anyone tell me if it the bug has been fixed now, and where to get a bug fix for this one, for instance a reference number?
Is this bug limited to
1. a specific version of Oracle (11g R2?)
2. ACFS file systems in Oracle
Thank you for answering this one.
BR,
Martin Laursen
SimCorp -
Error while creating external table
Hi i tried to create external table. The table is created but while selecting that table it is throwing below errors
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file Countries1.txt in EXT_TABLES not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19I've created temp directory in window under oracle directory " C:\oracle\product\10.2.0\temp"
In the temp directory i've a text file countries1.txt
the text file has the below information
ENG,England,English
SCO,Scotland,English
IRE,Ireland,English
WAL,Wales,WelshI've connected to system user and created one directory and granted the read and write permissions to user SCOTT.
SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp\';
Directory created.
SQL> grant read,write on directory ext_tables to scott;
Grant succeeded.The creation of external table query is
CREATE TABLE countries_ext (
country_code VARCHAR2(5),
country_name VARCHAR2(50),
country_language VARCHAR2(50)
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY ext_tables
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
country_code CHAR(5),
country_name CHAR(50),
country_language CHAR(50)
LOCATION ('Countries1.txt')
PARALLEL 5
REJECT LIMIT UNLIMITED;And the error is
SQL> select *from countries_ext;
select *from countries_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file Countries1.txt in EXT_TABLES not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
SQL> Please help me in thisYou are missing something. Most probably the file does not exists in your specified path. This is working in my 10.2.0.3
Step1: Check the file is actually there.
C:\oracle\product\10.2.0>mkdir temp
C:\oracle\product\10.2.0>cd temp
C:\oracle\product\10.2.0\temp>dir
Volume in drive C is C_Drive
Volume Serial Number is 8A93-1441
Directory of C:\oracle\product\10.2.0\temp
07/30/2011 12:00 PM <DIR> .
07/30/2011 12:00 PM <DIR> ..
07/30/2011 12:00 PM 79 countries1.txt
1 File(s) 79 bytes
2 Dir(s) 50,110,582,784 bytes free
C:\oracle\product\10.2.0\temp>type countries1.txt
ENG,England,English
SCO,Scotland,English
IRE,Ireland,English
WAL,Wales,Welsh
C:\oracle\product\10.2.0\temp>Step 2: Creating the directory object.
SQL> show user
USER is "SYS"
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp';
Directory created.
SQL> grant read,write on directory ext_tables to scott;
Grant succeeded.
SQL>Step 3: Table definition.
C:\>sqlplus scott@orclsb/tiger
SQL*Plus: Release 10.1.0.4.2 - Production on Sat Jul 30 12:04:24 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> CREATE TABLE countries_ext (
2 country_code VARCHAR2(5),
3 country_name VARCHAR2(50),
4 country_language VARCHAR2(50)
5 )
6 ORGANIZATION EXTERNAL (
7 TYPE ORACLE_LOADER
8 DEFAULT DIRECTORY ext_tables
9 ACCESS PARAMETERS (
10 RECORDS DELIMITED BY NEWLINE
11 FIELDS TERMINATED BY ','
12 MISSING FIELD VALUES ARE NULL
13 (
14 country_code CHAR(5),
15 country_name CHAR(50),
16 country_language CHAR(50)
17 )
18 )
19 LOCATION ('Countries1.txt')
20 )
21 PARALLEL 5
22 REJECT LIMIT UNLIMITED;
Table created.
SQL> SELECT * FROM countries_ext;
COUNT COUNTRY_NAME
COUNTRY_LANGUAGE
ENG England
English
SCO Scotland
English
IRE Ireland
English
COUNT COUNTRY_NAME
COUNTRY_LANGUAGE
WAL Wales
Welsh -
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,
OrausernCMcM 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 fetching data from OWB Client using External Table.
Dear All,
I am using Oracle Warehouse Builder 11g & Oracle 10gR2 as repository database on Windows 2000 Server.
I facing some issue in fetching data from a Flat File using external table from OWB Client.
I have perform all the steps without any error but when I try to view the data, I got the following error.
======================================
RA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file expense_categories.csv in SOURCE_LOCATION not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
java.sql.SQLException: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file expense_categories.csv in SOURCE_LOCATION not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:774)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:849)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1377)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:386)
at oracle.wh.ui.owbcommon.QueryResult.<init>(QueryResult.java:18)
at oracle.wh.ui.owbcommon.dataviewer.relational.OracleQueryResult.<init>(OracleDVTableModel.java:48)
at oracle.wh.ui.owbcommon.dataviewer.relational.OracleDVTableModel.doFetch(OracleDVTableModel.java:20)
at oracle.wh.ui.owbcommon.dataviewer.RDVTableModel.fetch(RDVTableModel.java:46)
at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerPanel$1.actionPerformed(BaseDataViewerPanel.java:218)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.AbstractButton.doClick(AbstractButton.java:282)
at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerPanel.executeQuery(BaseDataViewerPanel.java:493)
at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerEditor.init(BaseDataViewerEditor.java:116)
at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerEditor.<init>(BaseDataViewerEditor.java:58)
at oracle.wh.ui.owbcommon.dataviewer.relational.DataViewerEditor.<init>(DataViewerEditor.java:16)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at oracle.wh.ui.owbcommon.IdeUtils._tryLaunchEditorByClass(IdeUtils.java:1412)
at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1349)
at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1367)
at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:869)
at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:856)
at oracle.wh.ui.console.commands.DataViewerCmd.performAction(DataViewerCmd.java:19)
at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
===========================
In the error it is showing that file expense_categories.csv in SOURCE_LOCATION not found but I am 100% sure that file is very much there.
Is anybody face the same issue?
Do we need to configure something before loading data from a flat file from OWB Client?
Any help would higly appreciable.
Regards,
Manmohan SharmaHi Detlef / Gowtham,
Now I am able to fetch data from flat files from OWB Server as well as OWB Client.
One way I have achieved as suggested by you
1) Creating location on the OWB Client
2) Samples the files at client
3) Created & Configured external table
4) Copy all flat files on OWB Server
5) Updated the location which I created at the client.
Other way
1) Creating location on the OWB Client
2) Samples the files at client
3) Created & Configured external table
4) Copied flat files on the sever in same drive & directory . like if my all flat files are on C:\data at OWB Client then I copied flat file C:\data on the OWB Server. But this is feasible for Non-Windows.
Hence my problem solved.
Thanks a lot.
Regards,
Manmohan -
External Table Authentication in OBIEE 11g
Hi ,
I have a security table, which contains userid,displayname,group . I have imported Security table in Physical Layer. I'm creating session variables based on condition.
When am trying to logging into analytic s getting an error, invalid username and password . I'm using 11.1.1.6.0 version
How to handle external table authentication in OBIEE 11g version.
Regards,
MalliHi fiaz,
That links talks about 10g version.
Step1: We have imported a secutiry table in Physical layer.
Step2: Creating a session variable by selecting initilazation block.
Select user_name,group from security_table where user_id=':USER' and pwd=':password';
step3: created DISPLAYNAME,GROUP & USER VARIABLES in edit target window
After these modifications i was trying to logging with new user, which is there in security table.
I am getting an error that is invalid user or password.
Is there any other changes does it required here.
Regards,
Malli
Edited by: user10675696 on Dec 26, 2012 9:39 PM -
Execution Errors while running a mapping having external table operator
when I am executing a mapping with external table operator, I am getting the following error:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-04040: file testdoc.txt in CONN_FLAT_FILE not found
Here CONN_FLAT_FILE is the connector.
The flat file location has been registered with the user name (as used for Windows login), password (as used for Windows Login) and host name as the name that is used for accessing my machine in the network. The path to the file name is given from the root folder like C:\.....
Please let me know things that I need to check.
RegardsIf you're using an external table check if you can see the data by querying that table. Possible errors: wrong directory or wrong file structure.
Regards,
Jörg -
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
JohnWell, 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. -
Hi,
I have an external table script to load data and I need to schedule the loading (every 10 minutes). (env: Windows XP)
I am planning on putting the external table script in a procedure and call the procedure in the DBMS utility.
But.... when I put the external table script in the procedure, I am getting compilation errors because of the DROP and CREATE (DDL) statements in the procedure.
Please help me putting the external table script in the procedure.
Thanks in advanceJT,
If the file is allways the same name, why drop and recreate externale table.
You can reuse the table even if the file was drop and recreate.
1 CREATE TABLE EXT_RN_DEPLOY_DATA
2 (
3 MONITOR_ID VARCHAR2(30),
4 SAMPLE_ID VARCHAR2(30),
5 LATITUDE VARCHAR2(10),
6 DEW_POINT NUMBER(18,8)
7 )
8 ORGANIZATION EXTERNAL
9 ( TYPE ORACLE_LOADER
10 DEFAULT DIRECTORY DATA_FILE_DIR2
11 ACCESS PARAMETERS
12 ( RECORDS DELIMITED BY NEWLINE SKIP 1
13 BADFILE DATA_FILE_DIR2:'REVEXT%A_%P.BAD'
14 LOGFILE DATA_FILE_DIR2:'REVEXT%A_%P.LOG'
15 FIELDS TERMINATED BY ","
16 OPTIONALLY ENCLOSED BY '"'
17 MISSING FIELD VALUES ARE NULL
18 )
19 LOCATION (DATA_FILE_DIR2:'load.csv')
20 )
21 REJECT LIMIT UNLIMITED
22 LOGGING
23 NOCACHE
24* NOPARALLEL
SQL> /
Table created.
SQL> create procedure test_ext as
2 i number;
3 begin
4 select count(*) into i from EXT_RN_DEPLOY_DATA;
5 dbms_output.put_line(i);
6 end;
7 /
Procedure created.
--The file exists
SQL> exec test_ext
0
PL/SQL procedure successfully completed.
--I deleted the file
SQL> exec test_ext
BEGIN test_ext; END;
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file load.csv in DATA_FILE_DIR2 not found
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
ORA-06512: at "SCOTT.TEST_EXT", line 4
ORA-06512: at line 1
--I recreated the file and populate this one
SQL> exec test_ext
2
PL/SQL procedure successfully completed.
SQL> Nicolas. -
Doubt in external table.
I want to read the csv file and load into oracle table.But I am getting file with filename_<today date> for every day.
Is it possible to use single External table to read file in dynamic.
or what is the best way to do this?
My oracle version 10g in windows OS.
Thanks in advance,>
I want to read the csv file and load into oracle table.But I am getting file with filename_<today date> for every day.
Is it possible to use single External table to read file in dynamic.
>
Yes - it is possible. You need to issue an ALTER TABLE command to provide the new filename before you SELECT from the table.
alter table myExternalTable location ('myNewFileName.ext'); See the Location of Datafiles and Output Files section of Chapter 12 External Tables Concepts in the Utilities doc
http://docs.oracle.com/cd/B28359_01/server.111/b28319/et_concepts.htm#i1009094
Also see the Altering External Tables section of Managing External Tables in the DBA Guide
http://docs.oracle.com/cd/E14072_01/server.112/e10595/tables013.htm
That sections has examples for all of the ALTER statements you can use. For example you can also alter the DIRECTORY object being used.
ALTER TABLE admin_ext_employees
DEFAULT DIRECTORY admin_dat2_dir; -
Oracle External Table SELECT FROM problem from workstation
At Solaris Oracle database server console.
Created directory on the Solaris server as Oracle owner.
As SYS created oracle directory object on that Solaris directory
Granted read/write to SCHEMA_OWNER on that oracle directory object.
Using OS Oracle user, moved a tab-delimited flat file into the Solaris directory.
Logged on a SCHEMA_OWNER using SQLPLUS on the Solaris database server.
Ran external table script in SQLPLUS.
External table was created.
Ran Select * from ext_table.
Appropriate dataset returned.
So at the Oracle Solaris server console,
the create external table script worked without errors,
and a select from statement on the external table worked without errors.
Move to developer workstation:
Logged on as SCHEMA_OWNER using SQLPLUS on Windows workstation.
TNSNAMES of course points to the Solaris database server.
Ran the external table script in SQLPLUS.
External table was created.
Ran Select * from ext_table.
This failed with these errors:
ORA29913 error executing ODCIEXTTABLEOPEN callout
ORA29400 data cartridge error
cant open logfile.log
OS permission denied
ORA06512 sys.oracle_loader line 19
So how can I select from external tables from a windows workstation?
Any guidance on this problem would be appreciated.Thank you for your response.
I am not creating the external table on the workstation.
In both cases,
from the Solaris console
and from the Windows workstation
the external table is being created on the Solaris file system
in an Oracle Directory object
running an SQL script from SQLPLUS prompt.
The external table creator, schema owner, has read and write permissions
granted by SYS on the oracle directory object.
The problem is:
Logged in as the schema owner,
you can select * from ext_table from the Solaris console SQLPLUS,
but you can not select * from ext_table from the Windows workstation SQLPLUS.
You can DROP TABLE ext_table from the Windows workstation SQLPLUS.
You just cannot select * from ext_table from the Windows workstation SQLPLUS.
I guess as a test,
I can drop from the ext_table creation script the references
to discardfile, badfile, and logfile,
and remove this other file objects from the equation...
which appears to be a file permissions problem.
Maybe you are looking for
-
Error Occured when creating a new material
Dear All, I met a strange problem when creating a new material in CRM System. I have configure the product Hierarchy and Product Category in the sysytem. and I have assigned the Hierarchy to the Application. But when i created a material. the error o
-
Creation of IBASE with the XIF adapter
Hello, I am trying to create IBASES using the XIF adapter (LSMW). The actual creation of the IBASE is no problem, but creating an IBASE with a partner + address connection seems not to work. In HELP.SAP there are examples of IBASE craetion with compo
-
Dbms_space.verify_shrink_candidate
Hi, in 10gR2how can I find the table which can be shrinked using dbms_space.verify_shrink_candidate Many thanks.
-
SAP Dispute & Collection Management
We need to implement SAP Dispute & Collection Management: we are working with a SAP R/3 Enterprise Release 4.70, and we dont want to upgrade. The recommended architecture according to SAP documentation in this case should be a multisystem one: FI-AR
-
I received one film through Bluetooth to my Nokia Lumia 720 but in my phone I can't find that file. In phone storage one memory is there others that film was saved in that how I can see that film. Give me solution for this