Home » SQL & PL/SQL » SQL & PL/SQL » accessing dmp via external table. (oracle XE 10.2.0.1.0, on winXP OS)
accessing dmp via external table. [message #518626] |
Fri, 05 August 2011 02:43  |
misragopal
Messages: 125 Registered: June 2005 Location: New Delhi, india
|
Senior Member |
 
|
|
Hi, when i am writing dump from external table, it is accessing records from dump.but when i am trying to access other dumps(create thru expdp) it is giving error.the logic i am following is mentioned below-
CREATE OR REPLACE DIRECTORY "DIR_GMS" AS 'D:\Gopal_works\test_env_files'
GRANT READ ON DIRECTORY dir_gms TO gopal;
GRANT WRITE ON DIRECTORY dir_gms TO gopal;
-- creating dump file in directory
CREATE TABLE emp_ext
ORGANIZATION EXTERNAL
(
TYPE ORACLE_DATAPUMP
DEFAULT DIRECTORY dir_gms
LOCATION ('emp_ext_dmp.dmp')
)
AS SELECT * FROM hr.employees;
CREATE TABLE emp_xt (
EMPLOYEE_ID NUMBER(5),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50))
ORGANIZATION EXTERNAL (
TYPE ORACLE_DATAPUMP
DEFAULT DIRECTORY dir_gms
LOCATION ('emp_ext_dmp.dmp')
);
i am able to see records.
New point:
-- taking export thru expdb
expdp hr/hr tables=EMPLOYEES directory=DIR_GMS dumpfile=HR_EMP.dmp logfile=expdpEMP.log
then i created one EXTERNAL TABLE TO access it.
CREATE TABLE emp_xt (
EMPLOYEE_ID NUMBER(5),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50))
ORGANIZATION EXTERNAL (
TYPE ORACLE_DATAPUMP
DEFAULT DIRECTORY dir_gms
LOCATION ('HR_EMP.DMP')
);
while accessing, it is giving error:
SELECT * FROM EMP_XT
ORA-29913: error IN executing ODCIEXTTABLEOPEN callout
ORA-31619: invalid DUMP FILE "D:\Gopal_works\test_env_files\HR_EMP.DMP"
ORA-06512: AT "SYS.ORACLE_DATAPUMP", line 19
you guys must face this problem earlier,Please suggest what i am doing wrong?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Jun 21 01:48:22 CDT 2025
|