Problem in external table & sql*loader
hi all
i want to transter data between flat file to oracle database through external table option and sql*loader Utility.
1. how u make .dat file in external table.
2. how u make .ctl file in sql*loader utility.
if u know any good site plz. tell me.
thanx
Mohammadi52
Hi,
Use this link to search any Oracle documentation:
http://tahiti.oracle.com/
Also please have a look on the below link:
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/utility.htm
Regards
Similar Messages
-
External table & SQL*loader
Hi everybody!
following is the script for control file and i want to create a similar script in External table ...
LOAD DATA
INFILE ''
INTO TABLE PAY_STG_OWN.STG_INTRA_ACTG_ENT
APPEND
FIELDS TERMINATED BY '~'
TRAILING NULLCOLS
ACTV_HIST_IND CHAR(1) "TRIM(:ACTV_HIST_IND)"
,AUTH_STATUS CHAR(1) "TRIM(:AUTH_STATUS)"
,SUBSYS_PROD_COD CHAR(10) "TRIM(:SUBSYS_PROD_COD)"
,TRAN_AMT INTEGER EXTERNAL(22) "DECODE(TRIM(:TRAN_AMT),NULL,NULL,Fn_Deci_Ccy(:BR_COD,TO_NUMBER(fn_neg_pos(NVL(TRIM(:TRAN_AMT),'0'))),TRIM(:TRAN_CCY_COD),'SWIFT'))"
,LEGVEH CHAR(4) "TRIM(:LEGVEH)"
the last but one column calls the DECODE function followed by a user defined function Fn_Deci_Ccy() .
My question is ..
is it possible to call a user defined function while creating a external table.
An early reply is highly appreciable.
Thanks in advance
regards
MoloyYou cannot put a function directly in the statement that creates the external table. However, you can use the function in a statement that selects from the external table.
-
Oracle 11g - External Table/SQL Developer Issue?
Oracle 11g - External Table/SQL Developer Issue?
==============================
I hope this is the right forum for this issue, if not let me, where to go.
We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
We are trying to use oracle external table to load text files in .csv format. Here is our data look like.
======================
Date1,date2,Political party,Name, ROLE
20-Jan-66,22-Nov-69,Democratic,"John ", MMM
22-Nov-70,20-Jan-71,Democratic,"John Jr.",MMM
20-Jan-68,9-Aug-70,Republican,"Rick Ford Sr.", MMM
9-Aug-72,20-Jan-75,Republican,Henry,MMM
------ ALL NULL -- record
20-Jan-80,20-Jan-89,Democratic,"Donald Smith",MMM
======================
Our Expernal table structures is as follows
CREATE TABLE P_LOAD
DATE1 VARCHAR2(10),
DATE2 VARCHAR2(10),
POL_PRTY VARCHAR2(30),
P_NAME VARCHAR2(30),
P_ROLE VARCHAR2(5)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY P_EXT_TAB_D
ACCESS PARAMETERS (
RECORDS DELIMITED by NEWLINE
SKIP 1
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
REJECT ROWS WITH ALL NULL FIELDS
MISSING FIELD VALUES ARE NULL
DATE1 CHAR (10) Terminated by "," ,
DATE2 CHAR (10) Terminated by "," ,
POL_PRTY CHAR (30) Terminated by "," ,
P_NAME CHAR (30) Terminated by "," OPTIONALLY ENCLOSED BY '"' ,
P_ROLE CHAR (5) Terminated by ","
LOCATION ('Input.dat')
REJECT LIMIT UNLIMITED;
It created successfully using SQL Developer
Here is the issue.
It is not loading the records, where fields are enclosed in '"' (Rec # 2,3,4,7)
It is loading all NULL value record (Rec # 6)
*** If we remove the '"' from input data, it loads all records including all NULL records
Log file has
KUP-04021: field formatting error for field P_NAME
KUP-04036: second enclosing delimiter not found
KUP-04101: record 2 rejected in file ....
Our questions
Why did "REJECT ROWS WITH ALL NULL FIELDS" not working?
Why did Terminated by "," OPTIONALLY ENCLOSED BY '"' not working?
Any idea?
Thanks in helping.I don't think this is a SQLDeveloper issue. You will get better answers in the Database - General or perhaps SQL and PL/SQL forums.
-
SQL*Loader or external table for load a MSG (email) file
Hi there!
I'm looking for a way to load an email in a Oracle DB.
I mean, not all the email's body in a column, but to "parse" it in a multi column/table fashion.
Is it possible to do with a sql*loader script or an external table?
I think it is not possible, and that I must switch to XML DB.
Any idea?
Thanks,
AntonioHello,
Why don't you just load the entire MSG (email) as clob into one email_body column or whatever column name you want to use.
To load data upto 32k, you can use varchar2(32656) but its not a good idea to load clob in that manner because it's very inconsistent as length can
vary resulting in string literal too long. So you have 2 choices now, first you have to use either procedure or anonymous block to load clob data.
First Method -- I loaded alert.log successfully and you can imagine how big this file can be (5MB in my test case)
CREATE OR REPLACE DIRECTORY DIR AS '/mydirectory/logs';
DECLARE
clob_data CLOB;
clob_file BFILE;
BEGIN
INSERT INTO t1clob
VALUES (EMPTY_CLOB ())
RETURNING clob_text INTO clob_data;
clob_file := BFILENAME ('DIR', 'wwalert_dss.log');
DBMS_LOB.fileopen (clob_file);
DBMS_LOB.loadfromfile (clob_data,
clob_file,
DBMS_LOB.getlength (clob_file)
DBMS_LOB.fileclose (clob_file);
COMMIT;
END;Second Method: Use of Sqlldr
Example of controlfile
LOAD DATA
INFILE alert.log "STR '|\n'"
REPLACE INTO table t1clob
clob_text char(30000000)
)Hope this helps -
Use of External tables to load XML data.
Hi,
I have used external table definitions to load various XML files to the database, usually splitting the XML into seperate records - 1 per major element tag, and using PL/SQL to parse out a primary key to store in a relational table with all of the XML relevant to that primary key value stored as an XMLTYPE coumn in a row of the table. This has worked fine for XML with a single major entity (element tag) .
However, I now have an XML file that contains two "major" elements (both children of the root) that I would like to split out and store in seperate tables.
The XML file is of the following basic format:-
<drugs>
<drug>drug 1...</drug>
<drug>drug 2...</drug>
<partners>
<partner>partner 1</partner>
<partner>partner 2</partner>
</partners>
</drugs>
The problem is there are around 18000 elements of the first type, followed by several thousand of the 2nd type. I can create two seperate external tables - one for each element type, but how do I get the external table for the 2nd to ignore all the elements of the first type? My external table definition is :-
CREATE TABLE DRUGBANK_OWNER.DRUGBANK_PARTNERS_XML_EXTERNAL
DRUGBANK_XML CLOB
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY DRUGBANK_DIR
ACCESS PARAMETERS
( records delimited by "</partner>" SKIP 100000
characterset al32utf8
badfile extlogs:'drugbank_partners_xml.bad'
logfile extlogs:'drugbank_partners_xml.log'
discardfile extlogs:'drugbank_partners_xml.dis'
READSIZE 52428800
fields
drugbank_xml CHAR(50000000) terminated by '</partners>'
LOCATION (DRUGBANK_DIR:'drugbank.xml')
REJECT LIMIT UNLIMITED
PARALLEL ( DEGREE 8 INSTANCES 1 )
NOMONITORING;
The problem is that before the first <partners> element the 1800 or so <drugs> elements cause a data cartrdige error:-
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-29400: data cartridge error
KUP-04020: found record longer than buffer size supported, 52428800
This happens regardless of the value of the SKIP or the size of the drugbank_xml field.
I have tried using an OR on the "records delimited by" access parameter, to 'delimit by "</partner>" OR "</drug>"', with the intention of filtering out the <drug> elements but this leads to a syntax error.
Anyone ever tried anything similar and got it to work?
Any other suggestions?
Thanks,
Sid.No, the content inside quotes is spanned across multiple lines....there are line breaks after every html tag.
"What's the error message you are getting?"
Iam not getting any error while selecting from external table , but I am getting tose rows in BAD file and log file has the following entries
KUP-04021: field formatting error for field TKBS_DSCN
KUP-04036: second enclosing delimiter not found
Message was edited by:
user627610 -
Problem with external tables in 9i
Okay I have copied the csv file to that directory. I get this error when I run the select statement... basically the fields dont get populated.
*** SCRIPT START : Session:ADMAP@DEVDB2(1) 13-Nov-2006 16:38:53 ***
Processing ...
select * from proc_args
select * from proc_args
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 "identifier": expecting one of: "comma, char, date, defaultif, decimal, double, float, integer, (, nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned, varrawc, varchar, varraw, varcharc, zoned"
KUP-01008: the bad identifier was: VARCHAR2
KUP-01007: at line 5 column 26
ORA-06512: at "SYS.ORACLE_LOADER", line 14
*** Script stopped due to error ***
*** SCRIPT END : Session:ADMAP@DEVDB2(1) 13-Nov-2006 16:38:53 ***
SCRIPTCREATE OR REPLACE DIRECTORY dir AS '/tmp/ext_dir';
--grant read,write on directory ext_dir to bulk_load;
CREATE TABLE proc_args (
argument_name VARCHAR2(50),
argument_value VARCHAR2(50)
ORGANIZATION EXTERNAL (
-- TYPE ORACLE_LOADER
DEFAULT DIRECTORY dir
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
argument_name VARCHAR2(50),
argument_value VARCHAR2(50)
LOCATION ('input_arguments.csv')
--PARALLEL 5
--REJECT LIMIT UNLIMITED;
select * from proc_argsI think the fields specified in the ACCESS PARAMETERS section should be SQL*Loader datatypes, not standard SQL, e.g.
CREATE TABLE proc_args (
argument_name VARCHAR2(50),
argument_value VARCHAR2(50)
ORGANIZATION EXTERNAL (
-- TYPE ORACLE_LOADER
DEFAULT DIRECTORY dir
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
argument_name CHAR,
argument_value CHAR
LOCATION ('input_arguments.csv')
Other valid types are specified here:
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm#sthref1004 -
Hi,
Oracle Version:10.2.0.1
Operating system:Linux
Here i created the external table successfully and when fetching the records for the text file i am getting some problem.
Here is my external table creation syntax.
create table sample_ext1 (DETAIL_SEQ_NUM number(15,0),
REPAY_IDENTIFIER varchar(20),
REPAY_STATUS varchar(20),
VISA_CODE VARCHAR2(30),
NCN_CODE VARCHAR2(10 ),
AUTH_NUMBER VARCHAR2(10 ),
EXTENDED_STATUS VARCHAR2(20 )
organization external
( default directory APD_EXTRACTS
access parameters( RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY 0X'09'
MISSING FIELD VALUES ARE NULL) location ('sample.txt'));
and my sample.txt file data is
1000 james anderson 51 3 630-033 75188553
1001 james anderson 52 3 630-034 75188554
1002 james anderson 53 3 630-035 75188555
1003 james anderson 54 3 629-959 75188556
1004 james anderson 50 2 75188552
1005 james anderson 55 2 75188557
1006 james anderson 56 2 75188558
1007 james anderson 57 2 75188559
1008 james anderson 58 2 75188560
1009 james anderson 59 2 75188561and the output is
1000 james anderson 51 3 630-033 75188553
1001 james anderson 52 3 630-034 75188554
1002 james anderson 53 3 630-035 75188555
1003 james anderson 54 3 629-959 75188556
1004 james anderson 50 2
1005 james anderson 55 2
1006 james anderson 56 2
1007 james anderson 57 2
1008 james anderson 58 2
1009 james anderson 59 2 here my problem is in the sixth column i am having some null values in sample.txt file as shown above but in the out put i am getting null values in last column also but there is data .
Please help me how to solve my problem.
Thanks & Regards,
Poorna Prasad.Hi All,
My problem was solved her what i did wrong is at first i made some changer manually to my sample.txt file.But after loading the original fiile as it is with editing it i get the correct output .
Thanks & Regards,
Poorna Prasad. -
Weird problem using external tables
Hi,
Please move my message to the correct forum if it is not in the right one.
Problem:
I have the following external table definition:
CREATE TABLE blabla (
AANSLUITINGSNR_BV NUMBER(15),
BSN_NR NUMBER(9),
DATUM_AANVANG_UKV DATE,
DATUM_EIND_UKV DATE,
BEDR_WAO_WERKN_REFJ number(18),
BEDR_WAO_WERKG_REFJ NUMBER(38)
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY nood_dir
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ';'
MISSING FIELD VALUES ARE NULL
"AANSLUITINGSNR_BV",
"BSN_NR",
"DATUM_AANVANG_UKV" DATE "YYYYMMDD",
"DATUM_EIND_UKV" DATE "YYYYMMDD",
"BEDR_WAO_WERKN_REFJ",
"BEDR_WAO_WERKG_REFJ"
LOCATION ('myfile.csv')
REJECT LIMIT UNLIMITED;
My file looks like this:
107031035423278;913487654;20010101;20011231;3231729003;8334195582
128039008378982;117347347;20010101;20011231;1606131689;4468506457
134740829467773;450263934;20010101;20011231;9568986434;526201096
141020256280899;782714783;20010101;20011231;33235678;2398903683
146130347251892;960256796;20010101;20011231;441706397;2622754437
151020336151123;441010528;20010101;20011231;8183416412;6077359802
152888977527618;114572066;20010101;20011231;2370992895;6196483262
But when selecting the following log is stated:
error processing column BEDR_WAO_WERKG_REFJ in row 1 for datafile /oracle/db/noodscenario/myfile.csv
ORA-01722: invalid number
error processing column BEDR_WAO_WERKG_REFJ in row 2 for datafile /oracle/db/noodscenario/myfile.csv
ORA-01722: invalid number
Why is number 8334195582 stated as invalid ?
Thanks,
Coen
Message was edited by:
Coenos1Which Oracle version and OS are you on ? It works perfectly to me :
$ cat myfile.csv
107031035423278;913487654;20010101;20011231;3231729003;8334195582
128039008378982;117347347;20010101;20011231;1606131689;4468506457
134740829467773;450263934;20010101;20011231;9568986434;526201096
141020256280899;782714783;20010101;20011231;33235678;2398903683
146130347251892;960256796;20010101;20011231;441706397;2622754437
151020336151123;441010528;20010101;20011231;8183416412;6077359802
152888977527618;114572066;20010101;20011231;2370992895;6196483262
$ sqlplus test/test
SQL*Plus: Release 10.2.0.2.0 - Production on Fri Aug 24 10:56:30 2007
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> CREATE TABLE blabla (
2 AANSLUITINGSNR_BV NUMBER(15),
3 BSN_NR NUMBER(9),
4 DATUM_AANVANG_UKV DATE,
5 DATUM_EIND_UKV DATE,
6 BEDR_WAO_WERKN_REFJ number(18),
7 BEDR_WAO_WERKG_REFJ NUMBER(38)
8 )
9 ORGANIZATION EXTERNAL (
10 TYPE oracle_loader
11 DEFAULT DIRECTORY work
12 ACCESS PARAMETERS (
13 RECORDS DELIMITED BY NEWLINE
14 FIELDS TERMINATED BY ';'
15 MISSING FIELD VALUES ARE NULL
16 (
17 "AANSLUITINGSNR_BV",
18 "BSN_NR",
19 "DATUM_AANVANG_UKV" DATE "YYYYMMDD",
20 "DATUM_EIND_UKV" DATE "YYYYMMDD",
21 "BEDR_WAO_WERKN_REFJ",
22 "BEDR_WAO_WERKG_REFJ"
23 )
24 )
25 LOCATION ('myfile.csv')
26 )
27* REJECT LIMIT UNLIMITED
SQL> /
Table created.
SQL> select * from blabla;
AANSLUITINGSNR_BV BSN_NR DATUM_AAN DATUM_EIN BEDR_WAO_WERKN_REFJ BEDR_WAO_WERKG_REFJ
107031035423278 913487654 01-JAN-01 31-DEC-01 3231729003 8334195582
128039008378982 117347347 01-JAN-01 31-DEC-01 1606131689 4468506457
134740829467773 450263934 01-JAN-01 31-DEC-01 9568986434 526201096
141020256280899 782714783 01-JAN-01 31-DEC-01 33235678 2398903683
146130347251892 960256796 01-JAN-01 31-DEC-01 441706397 2622754437
151020336151123 441010528 01-JAN-01 31-DEC-01 8183416412 6077359802
152888977527618 114572066 01-JAN-01 31-DEC-01 2370992895 6196483262
7 rows selected.
SQL>What do you see within the log file ? -
Synonym problem with external table in materialized view
I have a materialized view that includes selects on two external tables.
However, no matter how I try to access the external tables, the creation fails with a "Synonym Translation Is No Longer Valid" (ORA-00980) error.
This happens even when I replace the tablename with the full table name, including the link.
I can create a view just fine, but if I then try something like CREATE MATERIALIZED VIEW mvw_my_view AS SELECT * FROM vw_my_view (where vw_my_view is the view in question), it still throws the Synonym Translation exception.00980, 00000, "synonym translation is no longer valid"
// *Cause: A synonym did not translate to a legal target object. This
// could happen for one of the following reasons:
// 1. The target schema does not exist.
// 2. The target object does not exist.
// 3. The synonym specifies an incorrect database link.
// 4. The synonym is not versioned but specifies a versioned
// target object.
// *Action: Change the synonym definition so that the synonym points at
// a legal target object.It is really, Really, REALLY difficult to fix a problem that can not be seen.
use COPY & PASTE so we can see what you do & how Oracle responds. -
Unix permission problem for external table in oracle 10g, sun solaris
Hello All,
I'm facing a problem in accessing external table which has stumped me a bit.
What I'm looking for is to use a external table with restricted permission to Others(770) on unix.
Would appreciate if someone helps me out here.
Here are the steps:
1.create directory ext_tab_dir1 as '/home/ravi/test'
2.grant read,write on directory ext_tab_dir1 to scott
3.CREATE TABLE scott.emp_load1(employee_number CHAR(5))
ORGANIZATION EXTERNAL (
type oracle_loader
default directory ext_tab_dir1
access parameters (
records delimited by newline
fields terminated by ' '
optionally enclosed by '"'
missing field values are null
location ('info.dat')
Now I have added unix user oracle to unix group myDbGroup and provided myDbGroup read/write/exec permission on directory /home/ravi/test.
info.dat has been placed in /home/ravi/test.
#pwd
/home/ravi
#ls -l
drwxrwx--- 2 ravi myDbGroup 512 Mar 7 17:35 test
I have manually logged in as user oracle and successfully created a sample file in /home/ravi/test.
-rwxrwx--- 1 ravi myDbGroup 13 Mar 7 17:33 info.dat
-rw-r--r-- 1 oracle oinstall 0 Mar 7 18:05 sampleFile
I then connect to the db using sqlplus as ravi and do a
#select * from scott.emp_load1
I get the following error
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file emp_load1_18567.log
OS error Permission denied
ORA-06512: at "SYS.ORACLE_LOADER", line 19
After this, I gave full permission to /home/ravi/test
drwxrwxrwx 2 ravi myDbGroup 512 Mar 7 17:35 test
#select * from scott.emp_load1
And this was successful.
It created a log file in /home/ravi/test
-rwxrwx--- 1 ravi myDbGroup 13 Mar 7 17:33 info.dat
-rw-r--r-- 1 oracle oinstall 0 Mar 7 18:05 sampleFile
-rw-r--r-- 1 oracle oinstall 0 Mar 7 18:05 emp_load1_18567.log
Now what stumped me is the owner and group owner of the file emp_load1_18567.log.
It is same as the sampleFile which I created manually!!
From this it can be deducted oracle is not using user id oracle while reading/writing to the unix directory but somehow assigning user id oracle as owner to the log file at the end.
If someone has encountered this problem earlier or has some info about this...pls share.
Regards,
RavinandanThanks for the reply.
I have earlier checked this with NOLOGFILE option.
But no luck.
I would like to add one more detail(which I missed earlier) about the problem.
If I give 750 access to /home/ravi(That is read/exec to Group and none perm to Others),
I will get the same error(KUP-04063: unable to open log file emp_load1_18567.log).
This obviously means oracle is not even able to access the directory(Although unix user oracle has access via the group perms). -
Hi
I able to create external tables ,but unbale to query
I had followed the below steps
sql> conn system/manager;
Connected
SQL> select * from emp;
EMPNO ENAME DEPTNO
100 mmm 10
200 yyy 20
300 zz 30
SQL> spool emp.dat
SQL> select empno ||','||ename||','||deptno from emp;
EMPNO||','||ENAME||','||DEPTNO
100,mmm,10
200,yyy,20
300,zz,30
sql>create directory x as 'd:\oracle\y'
Directory is created
SQL> create table ext(empno char(4),ename char(10),deptno char(2))
2 organization external (type oracle_loader default directory x access
parameters(fields terminated by ','
3 (empno,ename,deptno))
4 location('emp.dat'));
Table created.
SQL> select * from ext;
select * from ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file emp.dat in x not found
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
Thanks inadvance
MohanYea - there's nothing here that shows that you are pointing at that dir when you do the spool command.
Also, the headers went into the file. There should only be data. Edit the file and clean it up.
Maybe start with a very simple hand-edited file with 1 field, and get that to work.
Tom Best -
hi,
i have created a directory as fllows
create or replace directory ext_dir as 'd:\oracle\ora92'.
after that i created a csv file called test.csv in the same directory.
When i am trying to create an external table i am getting the following errors.
create table ext_table_csv (
i Number,
n Varchar2(20),
m Varchar2(20)
organization external (
type oracle_loader
default directory ext_dir
access parameters (
records delimited by newline
fields terminated by ','
missing field values are null
location ('test.csv' )
reject limit unlimited;
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file test.csv in EXT_DIR not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
any help pls.
regards
RRKSQL> drop table ext_table_csv ;
Table dropped.
SQL> create table ext_table_csv (
2 i number(20),
3 n CHAR(20),
4 m CHAR(20)
5 )
6 organization external (
7 type oracle_loader
8 default directory EXT_DIR
9 access parameters (
10 records delimited by newline
11 fields terminated by ','
12 missing field values are null
13 (i char,
14 n char,
15 m char)
16 )
17 location ('sample.csv' )
18 )
19 reject limit unlimited;
Table created.
SQL> select * from ext_table_csv;
I N M
1 a x
2 b y -
Privilege revoked on a table - SQL*Loader-926: OCI error
During recent maintainence activity , a table was exported & imported , deleted , truncated & dropped.After the activity an user lost its privilege on the table and a job related to this table has been failing with the below error
SQL*Loader-926: OCI error while executing delete/truncate (due to REPLACE/TRUNCATE keyword) for table xyz.abc_def
ORA-01031: insufficient privileges
The privileges were granted on the table once again and since then the job has been successful , however we are unable to find the root cause which was responsible for the revoking of these privileges.
Any suggestions and insight into this would be very helpful and much apprciated.Please read http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9003.htm#SQLRF01806
>
Dropping a table invalidates dependent objects and removes object privileges on the table. If you want to re-create the table, then you must regrant object privileges on the table, re-create the indexes, integrity constraints, and triggers for the table, and respecify its storage parameters
>
Edited by: P. Forstmann on 1 févr. 2011 13:44 -
External Tables (Oracle Loader)
Hi While creating the external Table, i am getting error.
ORA-12899: value too large for column PRC_REC_TYPE (actual: 2, maximum: 1)
But while checking the CSV file, i found that prc_rec_type is having one 1 length value.
-- Create table
create table ET_PGIT_POL_RISK_COVER
prc_pol_no VARCHAR2(60),
prc_end_no_idx VARCHAR2(22),
prc_sec_code VARCHAR2(12),
prc_risk_id VARCHAR2(12),
prc_smi_code VARCHAR2(12),
prc_code VARCHAR2(12),
prc_desc VARCHAR2(2000),
prc_rate VARCHAR2(22),
prc_rate_per VARCHAR2(22),
prc_cvr_type VARCHAR2(1),
prc_add_si_yn VARCHAR2(1),
prc_si_curr_code VARCHAR2(12),
prc_prem_curr_code VARCHAR2(12),
prc_si_fc VARCHAR2(22),
prc_si_lc_1 VARCHAR2(22),
prc_si_lc_2 VARCHAR2(22),
prc_si_lc_3 VARCHAR2(22),
prc_prem_fc VARCHAR2(22),
prc_prem_lc_1 VARCHAR2(22),
prc_prem_lc_2 VARCHAR2(22),
prc_prem_lc_3 VARCHAR2(22),
prc_eff_fm_dt VARCHAR2(30),
prc_eff_to_dt VARCHAR2(30),
prc_brok_comm_appl_yn VARCHAR2(1),
prc_no_clm_bonus_appl_yn VARCHAR2(1),
prc_prof_comm_appl_yn VARCHAR2(1),
prc_cr_uid VARCHAR2(12),
prc_rate_eft VARCHAR2(12),
prc_terrorism_yn VARCHAR2(1),
prc_lvl VARCHAR2(12),
prc_tot_si_fc VARCHAR2(22),
prc_first_loss_perc VARCHAR2(22),
prc_flxi_risk_cover_desc VARCHAR2(2000),
prc_rec_type VARCHAR2(1)
organization external
type ORACLE_LOADER
default directory MMI_DATA_MIG
access parameters
RECORDS DELIMITED BY NEWLINE BADFILE 'ET_PGIT_POL_RISK_COVER.Bad' LOGFILE 'ET_PGIT_POL_RISK_COVER.Log' FIELDS TERMINATED BY ',' MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS
location (MMI_DATA_MIG:'COVER_1.csv')
reject limit UNLIMITED;
Not able to upload the file here.CHANDAN,0,1001,1,,1004,TPPropertyDamage,2.00000,100.00000,C,0,001,001,10000.000,10000.000,10000.000,10000.000,200.000,200.000,200.000,200.000,14-Feb-13 11:10:39,13-Feb-14 23:59:00,1,0,0,MMI,,0,F,0.000,,,N
CHANDAN,0,1001,1,,1005,RoadSideAssistance,1.50000,100.00000,C,0,001,001,15000.000,15000.000,15000.000,15000.000,225.000,225.000,225.000,225.000,14-Feb-13 11:10:39,13-Feb-14 23:59:00,1,0,0,MMI,,0,F,0.000,,,N
There are Actually three rows in csv.Above 2 rows are not inserted into et table whereas last row is getting inserted into et table(Below one)
CHANDAN,0,1001,1,,1099,SASRIA,0.25000,1.00000,C,0,001,001,12500.000,12500.000,12500.000,12500.000,0.250,0.250,0.250,0.250,14-Feb-13 11:10:39,13-Feb-14 23:59:00,0,0,0,MMI,,0,F,0.000,,,N -
Problem accessing external table
Hello,
When trying to access an external table, we're getting the following error.
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
ORA-01891: Datetime/Interval internal error
ORA-06512: at "SYS.ORACLE_DATAPUMP", line 19
Any recommendations?
ThanksMetalink says
Error: ORA-1891
Text: Datetime/Interval internal error
Cause: Internal error.
Action: Please contact Oracle Worldwide Support.
Can't find any other solution
Maybe you are looking for
-
Error Message - Couldn't complete your request because there is not enough memory
I'm using Adobe CS5 Extended on a PC running under Windows Vista Home Premium with 4GB RAM. When I complete editing a RAW file in ACR and choose to Open Image into Photoshop, I often receive an error message "Could not complete your request because
-
Kernel debugging using git bisection method in combination with abs.
Is there any way to use git bisection method for kernel debugging in combination with ABS for building the kernel via makepkg?
-
Exception on submit changes java client writeback sample 10.1.2 db 10.2
bi beans 10.1.2 samples 10.1.2 jdev 10.1.2 db 10.2.0.2.0 I tried to run java client sample (data writeback) and it became works properly and i saw data and graph but when i chose submit changes option then following execption occur and changes was no
-
Connecting to an SSID with "b" radio
I have a autonomous AP (stand alone) configured for an SSID that uses WPA-TKIP. I can connect to that SSID using "g", "a" etc but I cannot connect using the "b" radio. I already checked all the data rates and power settings and I cannot figure out th
-
Putting an Apostrophe in an SQL Parameter
Anyone know how to escape an apostrophe for passing to an XSQL page? I'm making an online directory. I get a list of names from the table, and then the user can click on a name to get more information. I'm having a real problem with names that contai