External Table Query
Hi
I created a table and created directory and gave grant permission to that directroy for read/write and able to create an external table but when trying to query the same iam getting the below error.
SQL> ed
Wrote file afiedt.buf
1 CREATE TABLE text_ext (city VARCHAR2(30),
2 country VARCHAR2(30),
3 population NUMBER)
4 ORGANIZATION EXTERNAL
5 (TYPE oracle_loader
6 DEFAULT DIRECTORY MV_DATA_EXTRACT
7 ACCESS PARAMETERS(records delimited BY newline
8 badfile 'test.bad'
9 logfile 'test.log'
10 fields terminated by ','
11 optionally enclosed by '"'
12 missing field values are null
13 )
14 location ('foo.dat')
15* )
SQL> /
Table created.
SQL> select * from pop_ext;
select * from pop_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
error opening file C:\Xtern_data\mv_data_extract/test.log
could you please advice.
thanks in advance.
user10991018 wrote:
Hi
I created a table and created directory and gave grant permission to that directroy for read/write and able to create an external table but when trying to query the same iam getting the below error.
SQL> ed
Wrote file afiedt.buf
1 CREATE TABLE text_ext (city VARCHAR2(30),
2 country VARCHAR2(30),
3 population NUMBER)
4 ORGANIZATION EXTERNAL
5 (TYPE oracle_loader
6 DEFAULT DIRECTORY MV_DATA_EXTRACT
7 ACCESS PARAMETERS(records delimited BY newline
8 badfile 'test.bad'
9 logfile 'test.log'
10 fields terminated by ','
11 optionally enclosed by '"'
12 missing field values are null
13 )
14 location ('foo.dat')
15* )
SQL> /
Table created.
SQL> select * from pop_ext;
select * from pop_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
error opening file C:\Xtern_data\mv_data_extract/test.log
could you please advice.
thanks in advance.First, you are not showing us something. You created table TEXT_EXT, but you are selecting from table POP_EXT.
The error is pretty clear, it can't open file 'C:\Xtern_data\mv_data_extract/test.log'. This is obvously Windows. What's with the *forward* slash (between 'extract' and 'test.log') in the file spec?
Similar Messages
-
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 -
External Tables using Discoverer
I am mapping the contents of a complex query to an external table. I am mapping the SUM() of each field to the external table. BUT... when I create a workbook using that complex folder, Discoverer correctly uses the external table but when I look at the actual query that is generated it performs a 'GROUP BY' on the the summary table (i.e my external table) prior to doing the query that I originally wanted.
This is different than if Discoverer was managing the summary table. A very simple example is:
External Table Query
SELECT
SUM(alias_avar)
FROM
(select id, SUM(avar) alias_avar
FROM
summarytable
group by id)
Discoverer Managed
Select SUM(avar) from summarytable
Thank you in advance for helping me with any ideas or workarounds.
MikeJust a word...I have had NO LUCK with Oracle9i external tables accessing network drive with Windows Server 2003 spk1.
I have read all the tips from Metalink and forums and nothing that works on Windows 2000 or NT work for 2003..Has anyone had any luck with this?
UNC or mapped letters..The best I could do was GIVE EVERYPERMISSION and create a SUPER users with ALL groups and still then all external tables could do was move it to the error folder with a OS errors saying it could not open the file. I have the same setup locally and it opens fine.
In fact UNC was the only way I could even touch the files..mapped drive letter did nothing ... -
Error while querying the external tables in 9i
i am working on a project on Oracle 9iR2 on Linux AS 3.0, i am in urgent need to port my data in text files for using in the DB
I have created an external table using the following script. While executing a query it gives the following error. Pls Hlp
create table ap_info_ex
(ser_no number(7),
no_of_sps number(1),
hpy_liq_mm number(2),
rmp_rnk_cd number(1),
ir number(3),
dps_flg varchar2(1))
organization external
(type oracle_loader
default directory aps_jul
access parameters (records delimited by newline
fields terminated by ","
(sno char,
no_sps char,
hpy_mm char,
rmp_rnk char,
ir char,
dpsflg char))
location ('info.txt'));
Table has been created successfully
but when i execute a query say
select * from ap_info_ex;
THIS IS THE ERROR MESSAGE I AM GETTING
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file AP_INFO_EX_6151.log
OS error Permission denied
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
hope you would help me. i am greateful for that.Arun,
Here are the things you could do.
1. You may want to specify a logfile in your access parameters using the command 'logfile'.
For example,
logfile 'info.log'. You could create the file in advance and provide appropriate permissions to the operating system user(In unix, I use the commands 'touch' and 'chmod').
2. You could specify the command
'NOLOGFILE' in your access parameters.
3. Provide permissions for the user to create files in the folder associated with the directory object 'aps_jul'. -
Report query not returning the field value from external table
hi
I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in plsql developer it returns all the fields values.
Can anyone please help me in this issue.
Thanks and Regards
kkDuplicate post?
value not displaying in report whereas it returns in plsql developer
value not displaying in report whereas it returns in plsql developer
Please log a SR if you do not get any reply to your thread instead of creating new one.
Thanks,
Hussein -
Interactive report errors when trying to query external table.
I'm trying to create an interactive report against an external table and getting the following error. I see a note in metalink the describes its cause, but I doesn't seem to apply here.
Query cannot be parsed, please check the syntax of your query. (ORA-06550: line 2, column 17: PLS-00302: component 'ODCIOBJECTLIST' must be declared ORA-06550: line 2, column 13: PL/SQL: Item ignored ORA-06550: line 4, column 18: PLS-00302: component 'ORACLE_LOADER' must be declared ORA-06550: line 4, column 6: PL/SQL: Statement ignored ORA-06550: line 5, column 12: PLS-00320: the declaration of the type of this expression is incomplete or malformed ORA-06550: line 5, column 6: PL/SQL: Statement ignored)
Metalink Note:437896.1 identifies this same error related to external tables. It says the cause is an object named 'sys' that exist in the user's schema and must be removed. I checked dba_objects and there is no object named 'sys'Please ignore thread - operator error. There was an object named sys.
-
Query regarding External tables
DECLARE
FileIn UTL_FILE.FILE_TYPE;
v_sql VARCHAR2 (1000);
BEGIN
FileIn := UTL_FILE.FOPEN ('DIR_TEMP', 'test_file_out.txt', 'R');
IF UTL_FILE.IS_OPEN(FileIn) THEN
LOOP
BEGIN
UTL_FILE.GET_LINE (FileIn, v_sql);
dbms_output.put_line(v_sql);
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXIT;
END;
END LOOP;
END IF;
UTL_FILE.FCLOSE (FileIn);
END;
above mentioned is the procedure to read from a flat file.
I would like to know the procedure to load flat file data into table using external tables:
i have tried using this code but it displays errors:
CREATE TABLE EXT_EMP
( EMPNO NUMBER(4), ENAME VARCHAR2(10), JOB VARCHAR2(9),
MGR NUMBER(4), HIREDATE DATE, SAL NUMBER(7,2), COMM NUMBER(7,2), DEPTNO NUMBER(2))
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY DIR_TEMP
ACCESS PARAMETERS(
RECORDS DELIMETED BY newline
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL(COMM NUMBER(7,2))
LOCATION ('test_file_out.txt')
PARALLEL
REJECT LIMIT UNLIMITED;
db: Oracle 11g , OS: windows vistathe query works fine as table is created.
but:
select * from ext_emp;
o/p: no rows.
ext.bad :
7369,SMITH,CLERK,7902,17-DEC-80,800,,20
7499,ALLEN,SALESMAN,7698,20-FEB-81,1600,300,30
7521,WARD,SALESMAN,7698,22-FEB-81,1250,500,30
7566,JONES,MANAGER,7839,02-APR-81,2975,,20
7654,MARTIN,SALESMAN,7698,28-SEP-81,1250,1400,30
7698,BLAKE,MANAGER,7839,01-MAY-81,2850,,30
7782,CLARK,MANAGER,7839,09-JUN-81,2450,,10
7788,SCOTT,ANALYST,7566,19-APR-87,3000,,20
7839,KING,PRESIDENT,,17-NOV-81,5000,,10
7844,TURNER,SALESMAN,7698,08-SEP-81,1500,0,30
7876,ADAMS,CLERK,7788,23-MAY-87,1100,,20
7900,JAMES,CLERK,7698,03-DEC-81,950,,30
7902,FORD,ANALYST,7566,03-DEC-81,3000,,20
7934,MILLER,CLERK,7782,23-JAN-82,1300,,10
ext.log:
LOG file opened at 04/01/09 02:13:13
Field Definitions for table EXT_EMP
Record format DELIMITED BY NEWLINE
Data in file has same endianness as the platform
Rows with all null fields are accepted
Fields in Data Source:
EMPNO Integer (4)
Record position (+0, +4)
Terminated by ","
Trim whitespace same as SQL Loader
ENAME CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
JOB CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
MGR Integer (4)
Record position (+0, +4)
Terminated by ","
Trim whitespace same as SQL Loader
HIREDATE CHAR (9)
Date datatype DATE, date mask DD-MON-YY
Terminated by ","
Trim whitespace same as SQL Loader
SAL Integer (4)
Record position (+0, +4)
Terminated by ","
Trim whitespace same as SQL Loader
COMM Integer (4)
Record position (+0, +4)
Terminated by ","
Trim whitespace same as SQL Loader
DEPTNO Integer (4)
Record position (+0, +4)
Terminated by ","
Trim whitespace same as SQL Loader
error processing column HIREDATE in row 1 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 2 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 3 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 4 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 5 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 6 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 7 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 8 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 9 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 10 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 11 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 12 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 13 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
error processing column HIREDATE in row 14 for datafile c:\temp\test_file_out.txt
ORA-01858: a non-numeric character was found where a numeric was expected
" I tried changing hiredate "dd-mm-yy" to hiredate "dd-mon-yy" but there is no difference. -
Error Querying Contents of External Table
I get the error below from JDeveloper when I try to query the contents of an external table that I created in OWB. The Validate, Generate & Deploy actions were successful on the External Table. The location ALAN_TARGET_LOC_FILES_LOC resolves to where the flat files that the external tables refer to reside on Linux Server. This seemed to work fine last week Any ideas what may have broke?
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file wire.mock in ALAN_TARGET_LOC_FILES_LOC not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
ORA-06512: at line 1
Alan Lichtenstein Programming SunGard Professional Services 595 E. Swedesford Road, Suite 3000, Wayne, PA 19087
Tel 610-975-3168 Fax 610-975-3062 www.sungard.com/bondmaster
CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and privileged information, and unauthorized disclosure or use is prohibited. If you received this email in error, please notify the sender and delete this email from your system. Thank you.Is there any way to find out the physical path
that 'owbdir' resolves to?
owner directory_name directory_path
SYS ALAN_TARGET_LOC_FILES_LOC owbdirSeems to me that the directory path is wrong. Under directory path you should see the real physical path you specified when you created the directory. Here's what select * from all_directories shows on my system (excerpt):
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS LOC_COCKPIT_OWB_LOC_FLAT_FILES E:\DATEN\01_ENTWICKLUNG\07_BEWIRTSCHAFTUNG\FF_DATEN\
As you can see directory path contains the physical path where my flat files reside.
Regards,
Jörg -
Querying external tables ERROR no not English version 10g R2 ¿BUG 5172459?
Hello
I have a serious problem when trying to view the content of external tables under Oracle 10R2 in Spanish
Steps to perform:
1. Make directory on file system (in oracle server side).
2. Copy a data file into this directory.
3. Login (sqlplus) as "sys as sysdba"
4. Make one oracle directory object
5. Grant permits read / write to a user 'simple_uesr'
6. Logout sys, and login as 'simple_user'
7. Make a external table, which uses the directory and data file.
8. Run query 'select * from myExtTable' to check it.
I have repeated these steps on Oracle 9i Enterprise, Oracle 10gR2 Enterprise, and Oracle 10g XE, and always, always worked perfectly (no problems).
The problem occurs in the client's DB (Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 SPANISH), everything works fine until the step 8 (querying external tables), where systematically the following error occurs:
ERROR en línea 1:
ORA-29913: error al ejecutar la llamada de ODCIEXTTABLEOPEN
ORA-29400: error de cartucho de datos
KUP-00552: internal XAD package failed to load
ORA-06512: en "SYS.ORACLE_LOADER", línea 19
I have made many tests, such as assigning a wrong directory to external table, remove the data file, remove access permissions, and always, always gives the same error, nerver error "file not found...etc, etc".
I have concluded that the failure, which occurs before Oracle even try to access the file system, but I do not know what may be the cause.
Searching the Internet, I found the following links:
http://www.dba-oracle.com/t_ora_29913_external_table_error.htm
http://zalbb.itpub.net/post/980/249423
Where mention the BUG 5172459 (MetaLink Note: 373168.1), but after follow the directions, still does not work.
Can anyone help me with this problem?
Thanks!
Full details of the DB which gives the error
SO: Windows 2003 Server Standard SP1.
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
PL/SQL Release 10.2.0.2.0 - Production
CORE 10.2.0.2.0 Production
TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production
show parameter nls;
NAME TYPE VALUE
nls_calendar string
nls_comp string
nls_currency string
nls_date_format string
nls_date_language string
nls_dual_currency string
nls_iso_currency string
nls_language string SPANISH
nls_length_semantics string BYTE
nls_nchar_conv_excp string FALSE
nls_numeric_characters string
nls_sort string
nls_territory string SPAIN
nls_time_format string
nls_timestamp_format string
nls_timestamp_tz_format string
nls_time_tz_format string
-- NLS_SESSION_PARAMETERS
select * from NLS_SESSION_PARAMETERS order by parameter;
PARAMETER VALUE
NLS_CALENDAR GREGORIAN
NLS_COMP BINARY
NLS_CURRENCY €
NLS_DATE_FORMAT DD/MM/RR
NLS_DATE_LANGUAGE SPANISH
NLS_DUAL_CURRENCY €
NLS_ISO_CURRENCY SPAIN
NLS_LANGUAGE SPANISH
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NUMERIC_CHARACTERS ,.
NLS_SORT SPANISH
NLS_TERRITORY SPAIN
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF
NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
-- NLS_INSTANCE_PARAMETERS
select * from NLS_INSTANCE_PARAMETERS order by parameter;
PARAMETER VALUE
NLS_CALENDAR
NLS_COMP
NLS_CURRENCY
NLS_DATE_FORMAT
NLS_DATE_LANGUAGE
NLS_DUAL_CURRENCY
NLS_ISO_CURRENCY
NLS_LANGUAGE SPANISH
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NUMERIC_CHARACTERS
NLS_SORT
NLS_TERRITORY SPAIN
NLS_TIME_FORMAT
NLS_TIMESTAMP_FORMAT
NLS_TIMESTAMP_TZ_FORMAT
NLS_TIME_TZ_FORMAT
-- NLS_DATABASE_PARAMETERS
select * from NLS_DATABASE_PARAMETERS order by parameter;
PARAMETER VALUE
NLS_CALENDAR GREGORIAN
NLS_CHARACTERSET WE8MSWIN1252
NLS_COMP BINARY
NLS_CURRENCY ?
NLS_DATE_FORMAT DD/MM/RR
NLS_DATE_LANGUAGE SPANISH
NLS_DUAL_CURRENCY ?
NLS_ISO_CURRENCY SPAIN
NLS_LANGUAGE SPANISH
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_NCHAR_CONV_EXCP FALSE
NLS_NUMERIC_CHARACTERS ,.
NLS_RDBMS_VERSION 10.2.0.2.0
NLS_SORT SPANISH
NLS_TERRITORY SPAIN
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF
NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
END.jpadron_uy wrote:
ERROR en línea 1:
ORA-29913: error al ejecutar la llamada de ODCIEXTTABLEOPEN
ORA-29400: error de cartucho de datos
KUP-00552: internal XAD package failed to load
ORA-06512: en "SYS.ORACLE_LOADER", línea 19Hola!
Let's go through errors you posted:
First error (ORA-29913) indicating error occurs when Oracle tryed to access external table.
Then ORA-29400 says that error has occurred in a data cartridge external procedure.
And then finally KUP-00552 - an error was encountered while attempting to initialize the XAD package.
So did you check state of the XAD package in that database?
Also, please post code you used in steps 4. and 7.
HTH -
Create external table to query alertlog
Hi all,
I've been following the tutorial on the following site http://www.singlequery.com/?p=23 to create an external table that can be used to query our alert logs.
It is a little more complicated than the usual tutorials that only really allow for select * from the alert log table.
However when I am working through the tutorial in a test environment I get errors with some of the sql....
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Nov 26 10:32:20 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL> SELECT row_num
2 ,LAST_VALUE(low_row_num IGNORE NULLS)
3 OVER(ORDER BY row_num ROWS BETWEEN UNBOUNDED PRECEDING
4 AND CURRENT ROW) start_row
5 ,LAST_VALUE(alert_date IGNORE NULLS)
6 OVER(ORDER BY row_num ROWS BETWEEN UNBOUNDED PRECEDING
7 AND CURRENT ROW) alert_date
8 ,alert_text
9 FROM (SELECT ROWNUM row_num
10 ,NVL2(system.alert_log_date(text),ROWNUM,NULL) low_row_num
11 ,system.alert_log_date(text) alert_date
12 ,text alert_text
13 FROM system.alert_log_external
14 )
15 WHERE ROWNUM < 20
16 /
,LAST_VALUE(low_row_num IGNORE NULLS)
ERROR at line 2:
ORA-00907: missing right parenthesis
SQL>
Please can anyone ofer any advice on the error, it works fine if i delete the IGNORE NULLS text, but then the out put isnt quite as neat.
CheersI have added that line as shown below
DECLARE
BDumpDir VARCHAR2(200);
SID VARCHAR2(16);
ObjectExists EXCEPTION;
PRAGMA EXCEPTION_INIT(ObjectExists,-955);
BEGIN
-- get the bdump dir
SELECT value
INTO BDumpDir
FROM v$parameter
WHERE name='background_dump_dest';
-- create the directory for the bdump dir
EXECUTE IMMEDIATE 'CREATE OR REPLACE DIRECTORY bdump_dir AS '''||
BDumpDir||'''';
-- grant the necessary privileges
EXECUTE IMMEDIATE 'GRANT READ ON DIRECTORY bdump_dir TO system';
-- get the SID
SELECT instance_name INTO SID FROM v$instance;
-- create the external table
EXECUTE IMMEDIATE 'CREATE TABLE system.ALERT_LOG_EXTERNAL
(TEXT VARCHAR2(255)
) ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY BDUMP_DIR
ACCESS PARAMETERS
(records delimited by newline
missing field values are null
TEXT VARCHAR2(255)
) nobadfile
nologfile
LOCATION (''alert_'||SID||'.log'')
REJECT LIMIT UNLIMITED'
-- ignore ORA-955 errors (object already exists)
EXCEPTION WHEN ObjectExists THEN NULL;
END;
dropeed the table, run the above script to re-create it, but now when I try to run the query
SELECT row_num,
max(low_row_num) over (order by row_num),
max(alert_date) over (order by row_num),
alert_text
FROM (SELECT ROWNUM row_num
,NVL2(system.alert_log_date(text),ROWNUM,NULL) low_row_num
,system.alert_log_date(text) alert_date
,text alert_text
FROM system.alert_log_external
I get the following errors
SELECT row_num,
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "missing": expecting one of: "badfile,
byteordermark, characterset, data, delimited, discardfile, exit, fields, fixed,
load, logfile, nodiscardfile, nobadfile, nologfile, date_cache, processing,
readsize, string, skip, variable"
KUP-01007: at line 2 column 7
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
Thank you for your help and advice Maxim, its much appreciated -
How to query an external table?
hi,
Can anyone help me, I created an external table but I cannot query the table... I encountered the error SQL Error: ORA-29913: error in executing ODCIEXTTABLEOPEN callout...
Attached my SQL for your reference:
CREATE OR REPLACE DIRECTORY dat_dir AS 'pos_file';
CREATE OR REPLACE DIRECTORY log_dir AS '//10.101.21.175/pos_file/Log';
CREATE OR REPLACE DIRECTORY bad_dir AS '//10.101.21.175/pos_file/Bad';
CREATE TABLE revext (person VARCHAR2(20),
rev_jan NUMBER(4),
rev_feb NUMBER(4),
rev_mar NUMBER(4),
rev_apr NUMBER(4),
rev_mai NUMBER(4),
rev_jun NUMBER(4),
rev_jul NUMBER(4),
rev_aug NUMBER(4),
rev_sep NUMBER(4),
rev_oct NUMBER(4),
rev_nov NUMBER(4),
rev_dez NUMBER(4))
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY dat_dir
ACCESS PARAMETERS
records delimited by newline
fields terminated by ','
( person,
rev_jan,
rev_feb,
rev_mar,
rev_apr,
rev_mai,
rev_jun,
rev_jul,
rev_aug,
rev_sep,
rev_oct,
rev_nov,
rev_dez
LOCATION ('revext.dat')
Thank you,
DexterHi! Thanks for your immediate response...
Here's the complete error when I tried to query the created external table.
Error starting at line 48 in command:
select * FROM revext
Error report:
SQL Error: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
error opening file pos_file/REVEXT_18225.log
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. -
Failed to parse SQL Query - External Tables [Apex 4.0.2]
Greetings experts -
Has anyone encountered errors when creating a report in Apex that sources from an external table within the database? I'm using the 4.0.2 version that is packaged with the 11g XE edition on 64bit CentOS.
For example, I might run:
SELECT NULL LINK,
COL1 LABEL,
COL2 VALUE
FROM MYTAB;
Where MYTAB is an external table sitting on top of a comma-separated file. When I go to create the page, I'm prompted with the "Failed to parse SQL" dialogue.
I noticed that if I did CTAS on the external table, and referenced the CTAS table, my page ran without problem!
Any ideas? Is this a known "limitation" of Apex?
Thanks,
CJChiedu,
Please try removing all declarative validations on this tabular form, and see if it works as expected then. There are some limitations on the type of views and joins that are supported by tabular forms when using the new declarative validations, i.e. you'll need a key preserved table in your view or join.
Regards,
Marc -
Query related to external table authentication
Hi Gurus,
I am new to OBIEE. When we login to the Oracle Business intelligence, we used to give user as Administrator and password as Administrator.
At this point, can we authentication the userid and password which is stored in external table in a users schema?
~ John"Administrator" will always be a user which is registered in the repository. All other users can be authenticated by external table authentication.
You can create an init block which sets the USER system variable by
SELECT user FROM users WHERE user = ':USER' and password = ':PASSWORD' -
External Table to Internal table Data update query
Hi all ,
I have Follwoing 2 tables one is external oracle and 2nd is internal and both table have the same data as following this is sample data while actual table contains millions of record.
External Table name SE2_EXT
GL_REF_NO GL_CUST_ID GL_TRAN_AMT_LCY GL_REVERSAL_MARKER GL_GL_ID GL_LOCAL
1 5 513557 100 136340003678088.020001
2 5 513557 -100 R 136340003678088.020002
3 1 26 -685.12 136340003674772.030001
4 1 26 685.12 R 136340003674772.030002
5 4 500539 100 136340003477900.000001
6 4 500539 -100 R 136340003477900.000002
7 23 604612 182.15 136340003578165.170001
8 23 604612 -182.15 R 136340003578165.170002
9 76 232033 -230.7 136340003576922.100001
10 76 232033 235.7 R 136340003576957.010001 I want to update GL_LOCAL column with 'R' with conditions that if
WHERE GL2.GL_GL_ID=GL2_EXT.GL_GL_ID
AND GL2.GL_REF_NO=GL2_EXT.GL_REF_NO
AND GL2.GL_CUST_ID=GL2_EXT.GL_CUST_ID
AND GL2.GL_REVERSAL_MARKER IN ('R',NULL)
AND GL2.GL_TRAN_AMT_LCY=GL2_EXT.GL_TRAN_AMT_LCYbut the tricky thing is GL_TRAN_AMT is one time - (minus) and one time +(plus). I only want to update those record who have same TRAN_AMT_LCY with same other condition mentioned above.
I tried merj statement but it did'nt work.If any body help me i would be appriciated.
MERGE INTO SE2 A
USING ( SELECT GL_REF_NO,GL_CUST_ID,GL_TRAN_AMT_LCY,GL_REVERSAL_MARKER,GL_GL_ID FROM GL2_EXT) B
ON (A.GL_GL_ID=B.GL_GL_ID AND A.GL_CUST_ID=B.GL_CUST_ID)
WHEN MATCHED THEN
UPDATE
SET A.GL_LOCAL_A1=B.SE_LOCALWhy is it tricky? You did not say.
Making a guess as to the problem why not use TO_NUMBER to cast the string? -
DATE fields and LOG files in context with external tables
I am facing two problems when dealing with the external tables feature in Oracle 9i.
I created an External Table with some fileds with the DATE data type . There were no issues during the creation part. But when i query the table, the DATE fields are not properly selected though the data is there in the files. Is there any ideas to deal with this ?
My next question is regarding the log files. The contents in the log file seems to be growing when querying the external tables. Is there a way to control this behaviour?
Suggestions / Advices on the above two issues are welcome.
Thanks
LakshminarayananHi
If you have date datatypes than:
select
greatest(TABCASER1.CASERRECIEVEDDATE, EVCASERS.FINALEVDATES, EVCASERS.PUBLICATIONDATE, EVCASERS.PUBLICATIONDATE, TABCASER.COMPAREACCEPDATE)
from TABCASER, TABCASER1, EVCASERS
where ...-- join and other conditions
1. greatest is good enough
2. to_date creates date dataype from string with the format of format string ('mm/dd/yyyy')
3. decode(a, b, c, d) is a function: if a = b than return c else d. NULL means that there is no data in the cell of the table.
6. to format the date for display use to_char function with format modell as in the to_date function.
Ott Karesz
http://www.trendo-kft.hu
Maybe you are looking for
-
I uploaded my photos from my camera for the first time using HP Mediasmart, and now I cannot get them into my normal photo file called, My Pictures. I normally use a windows program to upload to my computer, but thought I would try something new. Now
-
Ok, so I dropped my iPhone last night It was a low drop, about 4 feet, and it only fell on a thick carpeted floor. But it's not working properly now. These are the problems that I'm getting: • the Home button does not respond at all, which means I ca
-
"All Photographs" collection empty in 2.6
I recently installed Lightroom 2.6. In my folders menu on the left of the screen, I can see all my folders, and when I select one, thumbnails of the pictures in it appear as they should. However, if I select "all photographs" I get a "no photograph
-
DNS requests seem to have slowed on our network and I'm trying to find a way to test DNS requests and see a report of the routing of the request. 1) are the requests (i.e. from a client web browser) of outside domains being passed on to my ISP namese
-
Does anyone know what's wrong with it? not booting up. instead of it a picture of a file appears with a question mark on it in the middle of screen?