Setting reject_limit error in external tables
I am setting the reject_limit for an external table but it is giving this error.
My access data in csv i am importing into oracle using external tables.
Please suggest how i can set the reject limit
thnak you
SQL> ALTER TABLE AIRFIELD_TEMP SET REJECT_LIMIT 100;
ALTER TABLE AIRFIELD_TEMP SET REJECT_LIMIT 100
ERROR at line 1:
ORA-02000: missing UNUSED keyword
Remove the "SET" keyword.
Similar Messages
-
Suppose we have a file containing city populations in our /tmp directory and we wish to access this data from within our database.
Tokyo,Japan,33600000
Seoul,South Korea,23400000
Mexico City,Mexico,22400000
New York,USA,21900000
Bombay,India,21600000
Delhi,India,21500000
Sao Paulo,Brazil,20600000
Los Angeles,USA,18000000
Shanghai,China,17500000O
saka,Japan,16700000
First, we create a DIRECTORY object which will reference the /tmp directory in our file system.
CREATE OR REPLACE DIRECTORY tmp_dir AS '/tmp';
Directory created
Now, we create an external table by specifying the name of the file we wish to query and the directory where it can be located. We will rely on the default values of comma for a field separator and new line as the record delimiter, to describe our data.
CREATE TABLE pop_ext ( city VARCHAR2(30),
country VARCHAR2(30),
population NUMBER)
ORGANIZATION EXTERNAL
(DEFAULT DIRECTORY tmp_dir
LOCATION('pop.txt'));
Table created.
But when run the below query
SELECT * FROM pop_ext;
I am getting following error
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-30653: reject limit reached
ORA-06512: at "SYS.ORACLE_LOADER", line 52Hi Sri ram,
we have a file which contains bank holidays in the UK for 2007 to 2009.
"Holiday" 2007 2008 2009
"New Year" 01/01/07 01/01/08 01/01/09
"Good Friday" 06/04/07 21/03/08 10/04/09
"Easter Monday" 09/04/07 24/03/08 13/04/09
"Early May" 07/05/07 05/05/08 04/05/09
"(First Monday in May)"
"Spring Bank" 28/05/07 26/05/08 25/05/09
"(Last Monday in May)"
"Summer" 27/08/07 25/08/08 31/08/09
"(Last Monday in August)"
"Christmas Day" 25/12/07 25/12/08 25/12/09
"Boxing Day" 26/12/07 26/12/08 28/12/09
CREATE OR REPLACE DIRECTORY log_dir AS '/logs';
Directory created.
CREATE TABLE bank_hol_ext(
hol_desc VARCHAR2(50),
hol_2007 DATE,
hol_2008 DATE,
hol_2009 DATE )
ORGANIZATION EXTERNAL
TYPE oracle_loader
DEFAULT DIRECTORY etl_dir
ACCESS PARAMETERS
( records delimited BY newline
load when (hol_2007 != BLANKS)
badfile log_dir:'bank_holidays.bad'
logfile log_dir:'bank_holidays.log'
discardfile log_dir:'bank_holidays.dsc'
skip 1 fields terminated by '\t'
optionally enclosed by '"'
missing field values are null
(hol_desc,
hol_2007 DATE "dd/mm/yy",
hol_2008 DATE "dd/mm/yy",
hol_2009 DATE "dd/mm/yy" )
LOCATION('hols.txt')) REJECT LIMIT UNLIMITED
table is created
when I execute below query
SELECT * FROM bank_hol_ext;
I am getting error -
Os error in external tables in oracle 9i
hi, iam geting the following err when selecting the external table.
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file log.log
OS error The system cannot find the file specified.
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
my script for the external table is as follows
CREATE OR REPLACE DIRECTORY EXT_data AS 'f:\kindle\daily\zippedfiles\';
CREATE OR REPLACE DIRECTORY EXT_log AS 'd:\2.fin2004\1.sqlloader\3.logentries\thd0\log';
CREATE OR REPLACE DIRECTORY EXT_bad AS 'd:\2.fin2004\1.sqlloader\3.logentries\thd0\bad';
grant read, write on directory EXT_data to fincon1;
grant read, write on directory EXT_log to fincon1;
grant read, write on directory EXT_bad to fincon1;
CREATE TABLE THD0_DATA1
STATUS_CHARACTER char(1),
ACCOUNT_NUMBER VARchar(13),
NODEF1 VARchar(7),
TRANSACTION_COUNTER VARCHAR(5)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY ext_data
ACCESS PARAMETERS
RECORDS DELIMITED BY '@'
badfile ext_bad:'bad.bad'
logfile ext_log:'log.log'
FIELDs
STATUS_CHARACTER ,
ACCOUNT_NUMBER ,
NODEF1 ,
TRANSACTION_COUNTER
LOCATION ('thd0data.dat')
REJECT LIMIT UNLIMITED
how to rectify the above error.
thanks and regards
S. DjeanthiIf you have oracle metalink support then refer to Note:150737.1. If no support, i can paste it send to your email id.
-
KUP-01005 error in external table definition
Hello,
I'm facing an issue that I found it has been rose in the past but that never had an answer.
I'm using an external table to load a file on the database.
This file format is CSV (actually using ";" as delimiter) and it has header and trailer records that has the same format of data records, but contain field names in it.
E.g.:
FIELD_NAME1;FIELD_NAME2;...
I want to discard this records (for the header is easy, I can use SKIP 1 parameter) and the way I was trying to do this was using the following condition:
LOAD WHEN ( FIELD_NAME1 != "FIELD_NAME1" )
The problem arises when a record has the first field empty (hence NULL): the record is discarded.
Therefore I tried modifing the condition in this way:
LOAD WHEN ( ( FIELD_NAME1 != "FIELD_NAME1" ) OR ( ( FIELD_NAME1 = NULL ) )
but in this case I get the following error:
KUP-01005 : syntax error : found "null": expecting on of "blanks, double-quoted-string, hexprefix, identifier, single-quoted-string"
I've doublechecked Oracle reference and the NULL keyword is admitted - morover it is stated that a NULL value can be tested only against NULL value, otherwise the comparison returns false.
Can anyone help me solving this issue? Is it a bug in SQLLOADER Driver used by External Tables or an error in Oracle Reference?
RegardsIt's an other option that I've already tried, but it doesn't work - and it is correct because in External Table statement I've specified to trim fields (LRTRIM), so there's no fields containing blanks (they're simply empty).
However, my main concern is that I tried to use a statement that should be correct - according to Oracle reference.
Instead I get an error regarding the syntax of the statement...
I think that I can workaround this problem - but it is a workaround, not a real solution... :-| -
ORA-06502 error with external table having long records
I'm getting a strange error with the oci driver that I don't get with the thin driver.
The basic situation is that we using external tables and both the oci and thin drivers have been working until we tested with a table that had longer records than the previous tables. The new table has 1800 byte records.
The thin driver still works fine with the new table. However, the oci driver generates the following error with the new table:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I suspect that with oci driver the oci DLLs are reading the external file and the DLLs can't handle the longer record length.
Particulars
- Oracle DB Server is 10.2.0.1 on SunOS 5.9
- OCI Instant Client instantclient_10_2 on Windows XP
- OCI client code from DB server installation running on DB server
- Works with thin driver from Windows XP and on DB server machine for all record lengths
- Works with both OCI drivers for records < 1800 bytes (don't know actual limit)
- Fails with both OCI drivers for records = 1800 bytes.
Does anyone out there have any thoughts.
Thanks in advance.Your access parameters are in the wrong order. External tables are a bit fussy like that. Refer to the access_parameters section in the Utilities manual and follow the order there. From memory it will go something like this:
RECORDS DELIMITED...
LOG/BAD/DISCARDFILE...
FIELDS TERMINATED...LDRTRIM
MISSING FIELD VALUES...
fields...
)Regards... -
Error deploying external table on database 11.1.0.6
While deploying external table, I am getting the following error, I am using database ver. 11.1.0.6, has anybody in past encountered this problem, any help will be greatly appreciated.
ORA-00604: error occurred at recursive SQL level 1
ORA-00001: unique constraint (SYS.I_OBJ1) violated
Thanks,
RaviHi Ravi
Sounds like the instance's data dictionary is screwed up, I would try using a different database instance.
Cheers
David -
Error accessing External Table.
Hi All,
I am using external table for importing data. In that excel sheet certain fields are not mandatory. Whenever I try to import data from such excel sheets it is unable to refer those columns which don't have data in all fields. What shall i do, so that the external table will refer to all columns irrespective of whether its having data in all fields are not??
Please help me out.
Any help appreciated.
VenkyI think you have some problem with no of columns in your table as well no of columns in your excel sheet. Please paste the table description and excel sheet format here.
Cheers -
Hi, i am getting an error while using the External Table.
Hi,
I am getting the below error. External table has been created successfully and when I read the data from the external table i get the below error. Can anyone give solution of this error.
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file EXT_ZPP0A871_6738.log
OS error Permission denied
ORA-06512: at "SYS.ORACLE_LOADER", line 19
Thanks,
HimanshuKUP-04063: unable to open log file EXT_ZPP0A871_6738.log
OS error Permission deniedThe error seems quite clear... what's you OS and Oracle version ? -
Error:loading from external table to database table
hi,
Following error comes while inserting data from external to new_ext table
what might be the reason??
error and external table creation script is as follows
regards,
Avinash
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-29400: data cartridge error
KUP-04020: found record longer than buffer size supported, 524288, in
/home/oracle/rgtr1.txt
ORA-06512: at " SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
ORA-06512: at "PRODNDBA.PROC_RGTR1", line 513
ORA-06512: at line 1
external table script is as follows:
DROP
TABLE EXT_TABLE_RGTR1 CASCADE CONSTRAINTS;
CREATE
TABLE EXT_TABLE_RGTR1
ID
VARCHAR2(10 BYTE),
PC
VARCHAR2(2 BYTE),
BU
VARCHAR2(4 BYTE),
CONSUMER_NO
VARCHAR2(12 BYTE),
CUR_READING1
NUMBER,
CUR_READING2
NUMBER,
ADJ_CONS1
NUMBER,
ADJ_CONS2
NUMBER,
TOT_EC
NUMBER,
TOT_FCA
NUMBER,
TOT_ED
NUMBER,
ADDLESS_AMT
NUMBER,
NETBILL_AMT
NUMBER,
ADJ_UNIT1
NUMBER,
ADJ_UNIT2
NUMBER,
TARIFF_CODE
NUMBER,
DUTY_CODE
NUMBER,
DISCONN_TAG
VARCHAR2(1 BYTE),
MIN_CHRG_IND
VARCHAR2(1 BYTE),
OC_CODE1
VARCHAR2(1 BYTE),
OC_CODE2
VARCHAR2(1 BYTE),
OC_AMT1
NUMBER,
OC_AMT2
NUMBER,
PREV_DPC
NUMBER,
CREDIT_AVG_BILL
NUMBER,
ADJ_TYPES
NUMBER,
ADJ_EC_FCA
NUMBER,
ADJ_ED
NUMBER,
ADJ_AMT1
NUMBER,
ADJ_AMT2
NUMBER,
ADJ_AMT3
NUMBER,
ADJ_AMT4
NUMBER,
ADJ_AMT5
NUMBER,
ADJ_AMT6
NUMBER,
ADJ_AMT7
NUMBER,
ADJ_AMT8
NUMBER,
MR_CYCLE
VARCHAR2(2 BYTE),
NOTICE
VARCHAR2(2 BYTE),
INSTAL_IND
VARCHAR2(1 BYTE),
LAST_RCPT_DT
VARCHAR2(6 BYTE),
MS1
NUMBER,
MS2
NUMBER,
ARR_PL_CR
NUMBER,
PREV_READ1
NUMBER,
PREV_READ2
NUMBER,
OLD_CONS_NUM
VARCHAR2(16 BYTE),
MTR_CODE1
VARCHAR2(2 BYTE),
MTR_CODE2
VARCHAR2(2 BYTE),
ABR_EC1
NUMBER,
ABR_FCA1
NUMBER,
REV_CAT
VARCHAR2(2 BYTE),
BILL_DT
DATE,
SD_PAID
NUMBER,
SD_ARRS
NUMBER,
SD_ADDL
NUMBER,
PR_RDNG_IND1
VARCHAR2(1 BYTE),
PR_RDNG_IND2
VARCHAR2(1 BYTE),
NAB_IND
VARCHAR2(1 BYTE),
CONN_LOAD
NUMBER,
OLDEST_OS_DT
VARCHAR2(4 BYTE),
ABR_RECAMT1
NUMBER,
METER_RENT
NUMBER,
EX_DUTY
NUMBER,
TDL_CHARGES
NUMBER,
ABR_MTH
VARCHAR2(4 BYTE),
READING_IND
VARCHAR2(1 BYTE),
FB_IND
VARCHAR2(1 BYTE),
ADJ_AMT
NUMBER,
MTR_NUM1
NUMBER,
MTR_NUM2
NUMBER,
AVG_UNITS1
NUMBER,
AVG_UNITS2
NUMBER,
MIN_BILL_AMT
NUMBER,
METER_COST_DEMANDED
NUMBER,
MF1
VARCHAR2(2 BYTE),
MF2
VARCHAR2(2 BYTE),
MR
VARCHAR2(2 BYTE),
ROUTE
VARCHAR2(4 BYTE),
SEQ
VARCHAR2(4 BYTE),
DISC_IND
VARCHAR2(1 BYTE),
FREEZE_CODE
VARCHAR2(1 BYTE),
MTH40
NUMBER,
CONCES_EC
NUMBER,
METER_COST_ARREARS
NUMBER,
METER_COST_PAID
NUMBER,
SANCTION_LOAD
NUMBER,
PENALTY_ON_CL
NUMBER,
CL_SLB
NUMBER,
UNTSLB
NUMBER,
CAPACIT_PENALTY
NUMBER,
ARREARS_OF_INT
NUMBER,
INT_ON_ARREARS
NUMBER,
FIXED_CHARGES
NUMBER,
ASSESSED_DPC
NUMBER,
FCA_UNT_OLD
NUMBER,
FCA_UNT_NEW
NUMBER,
DEFECT_RDN1
NUMBER,
DEFECT_RDN2
NUMBER,
CAP_CT_RENT
NUMBER,
CT_RENT
NUMBER,
ADV_BILL_IND
VARCHAR2(1 BYTE),
ADV_BILL_RD_IND
VARCHAR2(1 BYTE),
INST_IND
VARCHAR2(1 BYTE),
CONSCUR_STATUS
VARCHAR2(1 BYTE),
MTR_COST1
NUMBER,
MTR_COST2
NUMBER,
MTR_COST3
NUMBER,
LOOM_NOS
NUMBER,
CONS_OLD_TARIFF
NUMBER,
CONS_NEW_TARIFF
NUMBER,
PD_TD_DATE
VARCHAR2(6 BYTE),
ED5
VARCHAR2(10 BYTE),
ED6
VARCHAR2(10 BYTE),
ED8
VARCHAR2(10 BYTE),
B66_AMT1
NUMBER,
BILL_MTH
VARCHAR2(6 BYTE),
STD_MTH
NUMBER,
PREV_RD_MTH
VARCHAR2(4 BYTE),
ACCT_HD_TRF
VARCHAR2(2 BYTE),
ADM_CODE
NUMBER,
BILL_DUE_DATE
DATE,
EC_DUTY
NUMBER,
ABNOR_IND
VARCHAR2(1 BYTE),
TRF04_CONN_LOAD
NUMBER,
PROCESS_DT
DATE,
SUPPLY_DATE
VARCHAR2(6 BYTE),
BILL_DT_FROM
DATE,
RECEIPT_AMT
NUMBER,
LOCKED_CR_UNITS
NUMBER,
LOCKED_CHARGES
NUMBER,
LOCKED_ED
NUMBER,
LOCKED_FCA
NUMBER,
LOCKED_FC
NUMBER,
LOCKED_RLCHARGES
NUMBER,
LOCKED_CL
NUMBER,
LOCKED_ECEDFIX
NUMBER,
LOCKED_ACC_MONTH
NUMBER,
AVG_OLD_CONSMP
NUMBER(6),
AVG_SINCE
VARCHAR2(4 BYTE),
AVG_OCCURANCES
NUMBER(2),
AVG_MA_IND
VARCHAR2(1 BYTE),
MTR1_PHASE
NUMBER(1),
MTR_PHASE1
VARCHAR2(1 BYTE),
MTR2_PHASE
NUMBER(1),
IND_CAT
VARCHAR2(1 BYTE),
L61_TARIFF
NUMBER(2),
MTR_CHG_AMT1
NUMBER(12),
NO_OF_MONTHS
NUMBER,
MTR_CHG_AMT2
NUMBER(12),
B66_AMT
NUMBER(10),
ADJ_AMT11
NUMBER,
B66_ADJ_TYP
VARCHAR2(1 BYTE),
B60_AMT
NUMBER(10),
ADJ_AMT13
NUMBER,
B60_ADJ_TYP
VARCHAR2(1 BYTE),
CPF_NO
NUMBER(8),
ADJ1
NUMBER(9),
ADJ2
NUMBER(9),
ADJ3
NUMBER(9),
ADJ4
NUMBER(9),
ADJ5
NUMBER(9),
ADJ6
NUMBER(9),
ADJ7
NUMBER(9),
ADJ8
NUMBER(9),
ADJ11
NUMBER(9),
ADJ13
NUMBER(9),
DTC_CODE
VARCHAR2(7 BYTE),
TITLE
VARCHAR2(8 BYTE),
NAME
VARCHAR2(36 BYTE),
ADDRESS1
VARCHAR2(26 BYTE),
ADDRESS2
VARCHAR2(26 BYTE),
VILLAGE
VARCHAR2(14 BYTE),
PIN
VARCHAR2(6 BYTE),
LOCK_SINCE
VARCHAR2(4 BYTE),
FAULTY_SINCE
VARCHAR2(4 BYTE),
MTR_DIGIT1
VARCHAR2(1 BYTE),
MTR_DIGIT2
VARCHAR2(1 BYTE),
FCA_PAISE
NUMBER(9),
GTY_EXP_DT
VARCHAR2(6 BYTE),
REJ_READ_MTR1
NUMBER(6),
REJ_READ_MTR2
NUMBER(6),
REJ_ADJ_UNITS1
NUMBER(6),
REJ_CONSMP
NUMBER(6),
OWNER_CODE
NUMBER(1),
MTR_CAP_AMP
NUMBER(1),
MTR_A
VARCHAR2(1 BYTE),
MTR_C
VARCHAR2(1 BYTE),
MTR_D
VARCHAR2(1 BYTE),
MTR_E
VARCHAR2(1 BYTE),
CUT_OF_DT
DATE,
POLE
VARCHAR2(6 BYTE),
EDRATE
NUMBER(9),
AREA
VARCHAR2(1 BYTE),
MTR_BRAND1
VARCHAR2(2 BYTE),
MTR_BRAND2
VARCHAR2(2 BYTE),
LC1
NUMBER(3),
POWER_CUT_IND
VARCHAR2(1 BYTE),
SERVICE_DT
DATE,
ADJ_UNIT11
NUMBER,
ADJ_UNIT22
NUMBER,
RECEIPT_AMT1
NUMBER,
MTR1
NUMBER,
STRK_BLL_AMT
NUMBER,
DUTY_UNTS1
NUMBER,
DUTY_AMT1
NUMBER,
DUTY_UNTS2
NUMBER,
DUTY_AMT2
NUMBER,
DUTY_UNTS3
NUMBER,
DUTY_AMT3
NUMBER,
ADJ_UNIT_45
NUMBER,
ADV_BIL_EC
NUMBER,
NEW_DUTY_RATE
NUMBER,
NEW_DUTY_UNTS
NUMBER,
NEW_DUTY_AMT
NUMBER,
DPC_PAB
NUMBER,
MS9_SINCE
VARCHAR2(4 BYTE),
DISTRICT_CODE
NUMBER(2),
TAX_ON_SALE
NUMBER,
LOCKED_CHARGES_TSE
NUMBER
ORGANIZATION
EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY EXT_DIR
ACCESS PARAMETERS
( records delimited by newline
badfile
'ext.bad'
logfile 'ext.log'
fields
ID POSITION
(1-4),
PC POSITION
(7-7),
BU POSITION
(8-11),
CONSUMER_NO POSITION
(18-29 ),
CUR_READING1 POSITION
(33-41 ),
CUR_READING2 POSITION
(42-50 ),
ADJ_CONS1 POSITION
(51-59 ),
ADJ_CONS2 POSITION
(60-68 ),
TOT_EC POSITION
(69-86),
TOT_FCA POSITION
(87-104 ),
TOT_ED POSITION
(105-122 ),
ADDLESS_AMT POSITION
(123-140 ),
NETBILL_AMT POSITION
(141-158 ),
ADJ_UNIT1 POSITION
(159-167 ),
ADJ_UNIT2 POSITION
(168-176 ),
TARIFF_CODE POSITION
(177-178 ),
DUTY_CODE POSITION
(179-180 ),
DISCONN_TAG POSITION
(181-181 ),
MIN_CHRG_IND POSITION
(182-182 ),
OC_CODE1 POSITION
(183-183 ),
OC_CODE2 POSITION
(184-184 ),
OC_AMT1 POSITION
(185-202 ),
OC_AMT2 POSITION
(203-220 ),
PREV_DPC POSITION
(221-238 ),
CREDIT_AVG_BILL POSITION
(239-256 ),
ADJ_TYPES POSITION
(257-264 ),
ADJ_EC_FCA POSITION
(265-282 ),
ADJ_ED POSITION
(283-300 ),
ADJ_AMT1 POSITION
(301-318 ),
ADJ_AMT2 POSITION
(319-336 ),
ADJ_AMT3 POSITION
(337-354 ),
ADJ_AMT4 POSITION
(355-372 ),
ADJ_AMT5 POSITION
(373-390 ),
ADJ_AMT6 POSITION
(391-408 ),
ADJ_AMT7 POSITION
(409-426 ),
ADJ_AMT8 POSITION
(427-444 ),
MR_CYCLE POSITION
(445-446 ),
NOTICE POSITION
(447-448 ),
INSTAL_IND POSITION
(449-449 ),
LAST_RCPT_DT POSITION
(453-458 ),
MS1 POSITION
(459-459),
MS2 POSITION
(460-460),
ARR_PL_CR POSITION
(461-478 ),
PREV_READ1 POSITION
(479-487 ),
PREV_READ2 POSITION
(488-496 ),
OLD_CONS_NUM POSITION
(497-512 ),
MTR_CODE1 POSITION
(513-514 ),
MTR_CODE2 POSITION
(515-516 ),
ABR_EC1 POSITION
(517-534 ),
ABR_FCA1 POSITION
(535-552 ),
REV_CAT POSITION
(553-554 ),
BILL_DT POSITION
(555-560 ) DATE "DDMMYY",
SD_PAID POSITION
(561-569 ),
SD_ARRS POSITION
(570-578 ),
SD_ADDL POSITION
(579-587 ),
PR_RDNG_IND1 POSITION
(588-588 ),
PR_RDNG_IND2 POSITION
(589-589 ),
NAB_IND POSITION
(590-590 ),
CONN_LOAD POSITION
(592-600 ),
OLDEST_OS_DT POSITION
(601-604 ),
ABR_RECAMT1 POSITION
(605-622 ),
METER_RENT POSITION
(623-631 ),
EX_DUTY POSITION
(632-649 ),
TDL_CHARGES POSITION
(632-649 ),
ABR_MTH POSITION
(650-651 ),
READING_IND POSITION
(652-652 ),
FB_IND POSITION
(653-653 ),
ADJ_AMT POSITION
(654-671 ),
MTR_NUM1 POSITION
(672-681 ),
MTR_NUM2 POSITION
(682-691 ),
AVG_UNITS1 POSITION
(692-700 ),
AVG_UNITS2 POSITION
(701-709 ),
MIN_BILL_AMT POSITION
(710-727 ),
METER_COST_DEMANDED POSITION
(710-727 ),
MF1 POSITION
(728-729),
MF2 POSITION
(730-731),
MR POSITION
(732-733),
ROUTE POSITION
(734-737),
SEQ POSITION
(738-741),
DISC_IND POSITION
(742-742 ),
FREEZE_CODE POSITION
(743-743 ),
MTH40 POSITION
(744-752),
CONCES_EC POSITION
(753-770 ),
METER_COST_ARREARS POSITION
(753-770 ),
METER_COST_PAID POSITION
(771-788 ),
SANCTION_LOAD POSITION
(789-797 ),
PENALTY_ON_CL POSITION
(798-815 ),
CL_SLB POSITION
(816-817 ),
UNTSLB POSITION
(818-819 ),
CAPACIT_PENALTY POSITION
(820-837 ),
ARREARS_OF_INT POSITION
(838-855 ),
INT_ON_ARREARS POSITION
(856-873 ),
FIXED_CHARGES POSITION
(874-891 ),
ASSESSED_DPC POSITION
(892-909 ),
FCA_UNT_OLD POSITION
(910-927 ),
FCA_UNT_NEW POSITION
(928-945 ),
DEFECT_RDN1 POSITION
(982-990 ),
DEFECT_RDN2 POSITION
(991-999 ),
CAP_CT_RENT POSITION
(1000-1008 ),
CT_RENT POSITION
(1009-1017 ),
ADV_BILL_IND POSITION
(1018-1018 )
LOCATION
(EXT_DIR:'rgtr1.txt')
REJECT
LIMIT UNLIMITED
LOGGING
NOCACHE
NOPARALLEL;KUP-04020: found record longer than buffer size supported, number, in string
Cause: a record in the data source was longer than the maximum data size supported. The number reported is the maximum supported size of a record.
Action: none
Examine your bad file and log files for details of the rows which failed from insertion. -
Facing Many Problems About Creating Directory and an External Table
Question:
The weird thing is if you look at question 10-b in page 3-41, it says:
(page 3-41 "Oracle Database 10g SQL Fund. II Vol.1")
Merge the data in the EMP_DATA table created in the last lab into the data in the emp_hist table. Assume
that the data in external EMP_DATA table matches the EMP_HIST table, update the email column
of the EMP_HIST table to match the EMP_DATA table row. If a row in the EMP_DATA table does not
match, insert into the EMP_HIST tables. Rows are considered matching when the employee's first and
last name are identical.
To me, this question is constructed wrongly. First of all in the last lab we have not been asked to create EMP_DATA. Secondly, EMP_DATA is empty.
Thirdly, this question asks us to merge into EMP_HIST table while EMP_DATA is empty.
EMP_HIST table currently has copied data from employees table. EMP_HIST structure:
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
EMAIL NOT NULL VARCHAR2(45)
Anway, i did the merge as following:
merge into emp_hist e
using emp_data d
on (e.first_name = d.first_name)
when matched then
update set
e.last_name = d.last_name,
e.email = d.email
when not matched then
insert values (d.first_name, d.last_name, d.email);
I get this error:
Error report:
SQL Error: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file emp.dat in EMP_DIR not found
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.
On the other hand, i said let me try this:
merge into emp_data d
using emp_hist e
on (d.first_name = e.first_name)
when matched then
update set
d.last_name = e.last_name,
d.email = e.email
when not matched then
insert values (e.first_name, e.last_name, e.email);
I get this error because external table is final once its created as far as i know:
Error report:
SQL Error: ORA-30657: operation not supported on external organized table
30657.0000 - "operation not supported on external organized table"
*Cause: User attempted on operation on an external table which is
not supported.
*Action: Don't do that!
I do not know what to do. I did my best, please help.
Edited by: user11164565 on Jul 27, 2009 2:43 AMuser11164565 wrote:
NOTE: I did my best, i did all what i can do, but the problem persists. Please help
I will mention all the steps i did clearly....
I gave scott the following grants:
grant create any directory to scott;
grant read on directory emp_dir to scott;
1. Created a directory and its been created successfully:
create or replace directory emp_dir
as 'F:\emp_dir';
Then i did the following just to make sure my directory is recognized:
SELECT *
FROM dba_directories;
I found the drive amongst the results...
OWNER DIRECTORY_NAME
DIRECTORY_PATH
SYS EMP_DIR
F:\emp_dir
SYS SUBDIR
D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\/2002/Sep
SYS XMLDIR
D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\
2. I created an external table emp_data (the script is given by the text book): done successfully
drop table emp_data;
CREATE TABLE emp_data
(first_name VARCHAR2(20)
,last_name VARCHAR2(20)
, email VARCHAR2(30)
ORGANIZATION EXTERNAL
TYPE oracle_loader
DEFAULT DIRECTORY emp_dir
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE CHARACTERSET US7ASCII
NOBADFILE
NOLOGFILE
FIELDS
( first_name POSITION ( 1:20) CHAR
, last_name POSITION (22:41) CHAR
, email POSITION (43:72) CHAR )
LOCATION ('emp.dat') ) ;
3. I went to F:\ drive to see if emp_dir folder exist or not! I did not see it. I checked hidden files, nothing there. Anyway, i ignored it and did step 4.
<snip>
"Anyway, I ignored it . . . "
and hence the rest of your problems. I did not see in the steps you recounted that you acually created a directory ("folder") named "\emp_dir" on your f: drive. Nothing you create within the database will actually create that directory on the OS. Createing a directory in Oracle, createing an external table in Oracle, will only create pointers to objects that Oracle will simply assume actually exists. -
Uplouad excel file to MDM cat. - External table isnt in the expected format
Hi expert,
We try to uploud an excel file to the SRM-MDM catalog 3.0 but when I connect to source and pick my excel file I get error message
"External table is not in the expected format".
I tried to uploud a very simple file, such as hierarchy file or supllier file.
Does anyone can help?
Thanks for your help!
Lori1st check if you choose the File type as Excel in the Import manager !
then make sure the excel is saved as .xls extension ONLY
also check whats the version of the excel ? I mean excel 2003 , 2007 (i know these work)
thanks
-Adrivit -
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 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 =) -
KUP-01005 error when selecting external table
Hi All,
My name is arun. I am having trouble resolving the following error. I tried to google, search oracle forum but no avail. I would really appreciate some help? I hope someone point me to the right direction with this problem. Thank you.
Scenario :
I have done the following :
1. Created the external directories using a user account(KDEV199). However by default its owned by SYS user.
2. Created the table necessary for selection. This was done by user account(KDEV199)
3. I have granted the folder privileges owned by oinstall:oracle where the 2 physical files exists. Thus all the files is owned by oracle. This was done at OS layer.
4. I have created 2 files necessary to extract data & read in oracle. This was done at OS layer.
The problem is that i have the following when i try to select the table :
SQL> select * from TEXN_IGM_MST;
select * from TEXN_IGM_MST
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 "minussign": expecting one of:
"double-quoted-string, identifier, single-quoted-string"
KUP-01007: at line 7 column 10
This script used to create the table :
--Create External Table
CREATE TABLE texn_igm_mst
COMP_NO CHAR(2),
POL_NO CHAR(10),
WRITING_AGENCY_NO_1 CHAR(10),
WRITING_AGENT_NO_1 CHAR(10),
WRITING_AGENCY_NO_2 CHAR(10),
WRITING_AGENT_NO_2 CHAR(10),
POL_STS_CDE CHAR(4),
STS_CHNG_DT DATE,
POL_DTE DATE,
PAY_UP_DTE DATE,
PAY_TO_DTE CHAR(10),
MATURE_DTE DATE,
PAY_MODE_CDE CHAR(2),
PAY_METHOD_CDE CHAR(1),
MODAL_PREM_AMT NUMBER(15,2),
POL_CUR CHAR(2),
NFO_CDE CHAR(1),
DIVD_OPTION_CDE_1 CHAR(1),
DIVD_OPTION_CDE_2 CHAR(1),
OTHER_OPTION_CDE_1 CHAR(1),
OTHER_OPTION_CDE_2 CHAR(1),
RESTRICT_CDE CHAR(20),
NEXT_MODAL_PREM NUMBER(15,2),
SUSPEND_CDE CHAR(1),
EXTRACT_DTE DATE,
REASON_CDE CHAR(3),
LINE_OF_BUSS CHAR(1),
BILL_TO_DTE CHAR(10),
DUE_DAY NUMBER(3),
DAY_USE CHAR(1),
PAR_TYPE CHAR(1),
ISSUE_STATE CHAR(2),
MED_CDE CHAR(1),
RACE_CDE CHAR(1),
ADMIT_CDE CHAR(1),
REPT_STATE CHAR(2),
COLL_OFF CHAR(2),
WRITING_AGENCY CHAR(10),
LAST_ANN_PROC CHAR(3),
TIMESTAMP DATE,
SPND_EFF_DT DATE,
SPND_TRMN_DT DATE,
SPND_USER_ID CHAR(8),
CMPLN_AGT_ID CHAR(10),
TOTAL_CWA DECIMAL(17),
TOTAL_CWA_DT DATE,
DELIVERY_DT DATE,
REINSURED_CDE CHAR(1),
SERV_AGENCY CHAR(10),
ST_CODE CHAR(1),
NFO_RULE CHAR(1),
CSTAT_REASN_CD CHAR(2),
REJ_REASN_CD CHAR(2)
ORGANIZATION EXTERNAL
TYPE oracle_loader
DEFAULT DIRECTORY external_dir_clmlog
ACCESS PARAMETERS
records delimited by newline
BADFILE external_dir_clmlog:'VILFPM1.BAD'
LOGFILE external_dir_clmlog:'VILFPM1.LOG'
fields terminated by '!'
missing field values are null
--Column and format setting
COMP_NO,
POL_NO,
WRITING_AGENCY_NO_1,
WRITING_AGENT_NO_1,
WRITING_AGENCY_NO_2,
WRITING_AGENT_NO_2,
POL_STS_CDE,
STS_CHNG_DT CHAR date_format DATE Mask "yyyy-mm-dd",
POL_DTE CHAR date_format DATE Mask "yyyy-mm-dd",
PAY_UP_DTE CHAR date_format DATE Mask "yyyy-mm-dd",
PAY_TO_DTE,
MATURE_DTE CHAR date_format DATE Mask "yyyy-mm-dd",
PAY_MODE_CDE,
PAY_METHOD_CDE,
MODAL_PREM_AMT,
POL_CUR,
NFO_CDE,
DIVD_OPTION_CDE_1,
DIVD_OPTION_CDE_2,
OTHER_OPTION_CDE_1,
OTHER_OPTION_CDE_2,
RESTRICT_CDE,
NEXT_MODAL_PREM,
SUSPEND_CDE,
EXTRACT_DTE CHAR date_format DATE Mask "yyyy-mm-dd",
REASON_CDE,
LINE_OF_BUSS,
BILL_TO_DTE,
DUE_DAY,
DAY_USE,
PAR_TYPE,
ISSUE_STATE,
MED_CDE,
RACE_CDE,
ADMIT_CDE,
REPT_STATE,
COLL_OFF,
WRITING_AGENCY,
LAST_ANN_PROC,
TIMESTAMP CHAR date_format DATE Mask "yyyy-mm-dd-hh24.mi.ss.ffffff",
SPND_EFF_DT CHAR date_format DATE Mask "yyyy-mm-dd",
SPND_TRMN_DT CHAR date_format DATE Mask "yyyy-mm-dd",
SPND_USER_ID,
CMPLN_AGT_ID,
TOTAL_CWA,
TOTAL_CWA_DT CHAR date_format DATE Mask "yyyy-mm-dd",
DELIVERY_DT CHAR date_format DATE Mask "yyyy-mm-dd",
REINSURED_CDE,
SERV_AGENCY,
ST_CODE,
NFO_RULE,
CSTAT_REASN_CD,
REJ_REASN_CD
LOCATION (external_dir_clmxcom:'VILFPM1.DAT')
DB version :
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
OS version :
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1
Linux KAITLSDS01 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux
---------------------------------------------------------------------------------------------------------------------------------------Pl see MOS Doc 302672.1 (Select From External Table Gives ORA-29913 ORA-29400 KUP-554 KUP-1005)
Srini -
Error when loading from External Tables in OWB 11g
Hi,
I face a strange problem while loading data from flat file into the External Tables.
ORA-12899: value too large for column EXPIRED (actual: 4, maximum: 1)
error processing column EXPIRED in row 9680 for datafile <data file location>/filename.dat
In a total of 9771 records nearly 70 records are rejected due to the above mentioned error. The column (EXPIRED) where the error being reported doesn't have value greater than 1 at all. I suspect it to be a different problem.
Example: One such record that got rejected is as follows:
C|234|Littérature commentée|*N*|2354|123
highlightened in Bold is the EXPIRED Column.
When I tried to insert this record into the External Table using UTL_FILE Utility it got loaded successfully. But when I try with the file already existing in the file directory it again fails with the above error, and I would like to mention that all the records which have been loaded are not Ok, please have a look at the DESCRIPTION Column which is highlightened. The original information in the data file looks like:
C|325|*Revue Générale*|N|2445|132
In the External Table the Description Value is replaced by the inverted '?' as follows:
Reue G¿rale
Please help.
Thanks,
JL.user1130292 wrote:
Hi,
I face a strange problem while loading data from flat file into the External Tables.
ORA-12899: value too large for column EXPIRED (actual: 4, maximum: 1)
error processing column EXPIRED in row 9680 for datafile <data file location>/filename.dat
In a total of 9771 records nearly 70 records are rejected due to the above mentioned error. The column (EXPIRED) where the error being reported doesn't have value greater than 1 at all. I suspect it to be a different problem.
Example: One such record that got rejected is as follows:
C|234|Littérature commentée|*N*|2354|123
highlightened in Bold is the EXPIRED Column.
When I tried to insert this record into the External Table using UTL_FILE Utility it got loaded successfully. But when I try with the file already existing in the file directory it again fails with the above error, and I would like to mention that all the records which have been loaded are not Ok, please have a look at the DESCRIPTION Column which is highlightened. The original information in the data file looks like:
C|325|*Revue Générale*|N|2445|132
In the External Table the Description Value is replaced by the inverted '?' as follows:
Reue G¿rale
Please help.
Thanks,
JL.sorry, couldnt see the highlighted test.could you plesae enclsoe it in tags
also post the table definition with attributes. BTW..Whats your NLS_LANGUAGE SET TO?
Maybe you are looking for
-
Windows 7 No longer detects speakers
I have problem called "no speakers or headphones are plugged in" While my speakers are plugged in. Here's how It happend: 1. I decided to cleanup my PC but I decided to upgrade to Windows 8.1. I noticed that the sound icon on the taskbar says "no spe
-
Hi, Related to registration
Hi, in my new iphone 4S ,whenever i download any app,its asking for registration.They were asking for postal code.If i give correct postal code also,its not accepting.Please help me out of this issue.
-
While downloading purchased items, message pops 'There was an error downloading some purchased items stopped err = 3259'
-
Bt Infinity 2 Supposed Upgrade
Hi All I'm new here so please be gentle. I have upgraded to Infinity 2, Now this went live 2 days ago. I was already on infinity and pretty happy with my 25-26 mb down and my 8mb up but after inquiring it was roughly the same price for infinity 2. So
-
Recieving emails all the text is Helvetica Fractions
I am getting a lot of emails coming in that are unreadable because all the text is Helvetica Fractions. My presets are all Arial so I can not understand why this happens. When I check mail from a PC it looks fine, only from my MAC Please advise. Than