Mapping Oracle Physical File with Logical Directory
I am working on LOBS(large objects)and have problem of reading BFILE Stored on my system-
created a table-
1.CREATE TABLE PROPOSAL
(PROPOSAL_ID NUMBER(10) CONSTRAINT PROPOSAL_PK1 PRIMARY KEY,
2.created a directory as under-
CREATE DIRECTORY PROPOSAL_DIR AS 'D:\PROPOSAL\LETTERS';
3.inserted data into the table-
INSERT INTO PROPOSAL VALUES(
1,'BRAD OHMONT','REBUILD FENCE',NULL,
4. Create or replace procedure displaybfile
amount integer := 1024;
Position integer := 1;
Select cover_letter into lob_loc from proposal where
position := position + amount;
when no_data_found then
dbms_output.put_line('end of data');
5.when I execute this procedure there is error-
ERROR at line 1:
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.DBMS_LOB", line 605
ORA-06512: at "SYSTEM.DISPLAYBFILE", line 9
QUESTION - I want to open my p2.doc which is text document lying @ "d:\p2.doc" on my system.how to put p2.doc into proposal_dir which is logical directory created as 'D:\PROPOSAL\LETTERS'??
HOW TO MAP PHYSICAL DIRECTORY CONTAINING "P2.DOC" WITH LOGICAL DIECTORY 'D:\PROPOSAL\LETTERS' WHICH I CREATED BY RUNNING-
CREATE DIRECTORY PROPOSAL_DIR AS 'D:\PROPOSAL\LETTERS'
Have a physical dir as D:\PROPOSAL\LETTERS..put p2.doc in the letters Dir...
The Logical Dir PROPOSAL_DIR would be pointing ur Physical Dir D:\PROPOSAL\LETTERS ( If u look at OS point of view it wud be again a Logical Loc ).
is the full pathname of the operating system directory on the server where the files are located. The single quotes are required, with the result that the path name is case sensitive.
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Click Here to Expand Forum to Full Width