External Table cannot be viewed.... [message #548253] |
Wed, 21 March 2012 01:46 |
|
Abhijitsaha.uma
Messages: 10 Registered: March 2012 Location: Kolkata
|
Junior Member |
|
|
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 21 11:52:03 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn abcd@'(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.155)(PORT
= 1521)))(CONNECT_DATA =(SERVICE_NAME = umitl)))'
Enter password: ****
Connected.
SQL> create directory aaaa as 'C:\my_oracle_files\'
2 ;
Directory created.
SQL> conn scott@'(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.155)(POR
T = 1521)))(CONNECT_DATA =(SERVICE_NAME = umitl)))'
Enter password: *****
Connected.
SQL> grant read on directory aaaa to abcd;
Grant succeeded.
SQL> grant write on directory aaaa to abcd;
Grant succeeded.
SQL> conn abcd@'(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.155)(PORT
= 1521)))(CONNECT_DATA =(SERVICE_NAME = umitl)))'
Enter password: ****
Connected.
SQL> create table ext_emp
2 (
3 emp_id varchar(10),
4 Login varchar(10)
5 )
6 ORGANIZATION EXTERNAL
7 (
8 TYPE ORACLE_LOADER
9 DEFAULT DIRECTORY aaaa
10 ACCESS PARAMETERS
11 (
12 RECORDS DELIMITED BY NEWLINE
13 BADFILE aaaa:'externalfile_closebal.bad'
14 LOGFILE aaaa:'externalfile_closebal.log'
15 DISCARDFILE aaaa:'externalfile_closebal.dsc'
16 FIELDS TERMINATED BY ','
17 MISSING FIELD VALUES ARE NULL
18 (emp_id CHAR(32),
19 Login CHAR(32)) )
20 LOCATION (aaaa:'tab.TXT')
21 )
22 REJECT LIMIT UNLIMITED
23 NOPARALLEL
24 NOMONITORING;
Table created.
SQL> select * from ext_emp;
select * from ext_emp
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file externalfile_closebal.log
OS error The system cannot find the file specified.
ORA-06512: at "SYS.ORACLE_LOADER", line 19
SQL> column emp_id format A15;
SQL> column login format A15;
SQL> select * from ext_emp;
select * from ext_emp
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file externalfile_closebal.log
OS error The system cannot find the file specified.
ORA-06512: at "SYS.ORACLE_LOADER", line 19
Please Kindly give the solution.....
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: External Table cannot be viewed.... [message #548401 is a reply to message #548379] |
Wed, 21 March 2012 22:57 |
|
Abhijitsaha.uma
Messages: 10 Registered: March 2012 Location: Kolkata
|
Junior Member |
|
|
Dear Madam,
I am using Windows XP Operating Sustem.
And my requirement is to import the datas in a *.dat file but when i am unable to do the same, I tried with *.txt file.
After running this
"host dir c:\my_oracle_files
select * from all_directories;"
I got the following output.
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Mar 22 09:11:06 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> host dir c:\my_oracle_files
SQL> select * from all_directories;
OWNER DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS ADMIN_DIR
C:\ADE\aime_10.2_nt_push\oracle/md/admin
SYS DATA_PUMP_DIR
c:\oracle\product\10.2.0\admin\umitl\dpdump\
SYS EXT_DIR
/app/oracle/flatfile
OWNER DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS WORK_DIR
C:\ADE\aime_10.2_nt_push\oracle/work
SYS ADMIN_LOG_DIR
/flatfiles/log
SYS ADMIN_BAD_DIR
/flatfiles/bad
OWNER DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS EXT
c:\external
SYS EXTERNALLLY
c:\externallly
SYS EXTERNALLY
c:\my_oracle_files
OWNER DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS EXT_TAB_DIR
c:\my_oracle_files
SYS EXTTABDEMO
C:\oracle\external_table_dest
SYS EXTTABDIR
C:\oracle\external_table_dest
OWNER DIRECTORY_NAME
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS AAAA
C:\my_oracle_files\
13 rows selected.
SQL>
[Updated on: Wed, 21 March 2012 22:59] Report message to a moderator
|
|
|
|
Re: External Table cannot be viewed.... [message #548443 is a reply to message #548404] |
Thu, 22 March 2012 05:03 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Let's clear something up right now:
Is the database itself installed on your PC? Not sqlplus, the database.
If it's not on your PC is it on another PC, or is it on a unix/linux server?
Your directories are a mess. Some look like windows directories, some look like unix directories.
Some are an invalid mix, eg:
SYS ADMIN_DIR
C:\ADE\aime_10.2_nt_push\oracle/md/admin
That's got forward slashes and back slashes. Windows directories only have back slashes. Unix ones only have forward slashes.
So that directory doesn't exist.
|
|
|