- I created a folder named "datosext2" on C:\
- I created a .txt file named "estados" on C:\datosext2
- On sqldeveloper, I created a directory said folder
GRANT CREATE ANY DIRECTORY TO HR;
CREATE DIRECTORY EDOS_MEX AS 'C:\datosext2';
GRANT READ, WRITE ON DIRECTORY EDOS_MEX TO PUBLIC:
- I created an external table named C_ESTADOS on said directory
CREATE TABLE C_ESTADOS (
ESTADO_ID CHAR (2),
ESTADO_NOMBRE VARCHAR2(50)
)
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY EDOS_MEX
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
BADFILE 'bad_estados.bad'
LOGFILE 'log_estados.log'
FIELDS TERMINATED BY ','
(ESTADO_ID CHAR (2),
ESTADO_NOMBRE CHAR(50))
)
LOCATION ('estados.txt')
);
- I tried to run
SELECT *
FROM C_ESTADOS;
- I got this error:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
error opening file C:\datosext2\log_estados.log
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.
- I tried granting READ and WRITE privileges to my user, but it did not work, even though I got no error after granting said privileges