Error after running control file in toad [message #428064] |
Tue, 27 October 2009 01:16 |
|
Hi experts:
I ran the following code in toad.
create table ext_table_csv (
i Number,
n Varchar2(20)
)
organization external (
type oracle_loader
default directory ext_dir
access parameters (
records delimited by newline
BADFILE 'D:\wence\External_tables\test.bad'
LOGFILE 'D:\wence\External_tables\test.log'
fields terminated by ','
missing field values are null
)
location ('D:\wence\External_tables\test.csv')
)
reject limit unlimited;
After the execution, I issue the following statement.
select *
from ext_table_csv
Then i get this error.
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01006: error signalled during parse of access parameters
KUP-00562: unknown escape sequence
ORA-06512: at "SYS.ORACLE_LOADER", line 19
I can't figure out the problem. Kindly guide me.
|
|
|
|
Re: Error after running control file in toad [message #428077 is a reply to message #428068] |
Tue, 27 October 2009 02:58 |
|
Thanks for your reply.
What's wrong with this code?
CREATE OR REPLACE DIRECTORY ext_dir AS 'D:\wence\External_tables';
GRANT READ ON DIRECTORY ext_dir TO public;
GRANT WRITE ON DIRECTORY ext_dir TO public;
create table ext_table_csv (
i Number,
n Varchar2(20)
)
organization external (
type oracle_loader
default directory ext_dir
access parameters (
records delimited by newline
BADFILE 'test.bad'
LOGFILE 'test.log'
fields terminated by ','
missing field values are null
)
location ('test.csv')
)
reject limit unlimited;
I'm still getting the same error.
|
|
|
|
|
|
|
|
|
|
Re: Error after running control file in toad [message #428378 is a reply to message #428324] |
Wed, 28 October 2009 02:55 |
|
BlackSwan wrote on Wed, 28 October 2009 00:52http://asktom.oracle.com
do keyword search on "external table"
post results from following SQL
SELECT TABLE_NAME, DEFAULT_DIRECTORY_OWNER, DEFAULT_DIRECTORY_NAME
FROM USER_EXTERNAL_TABLES
/
SQL> edit
Wrote file afiedt.buf
1 SELECT TABLE_NAME, DEFAULT_DIRECTORY_OWNER, DEFAULT_DIRECTORY_NAME
2* FROM USER_EXTERNAL_TABLES
SQL> /
TABLE_NAME DEF DEFAULT_DIRECTORY_NAME
------------------------------ --- ------------------------------
EXT_TABLE_CSV SYS EXT_DIR
|
|
|