Home » SQL & PL/SQL » SQL & PL/SQL » Whenever runs server side its run fine but,client side gives error ora- 22288.
Whenever runs server side its run fine but,client side gives error ora- 22288. [message #614178] Sun, 18 May 2014 03:20 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,


Im inserting pdf file into table using blob in oracle 10g.but its runs fine on server where oracle installed,
But problem is that its not inserting into table from client pc. Error is ora-22288 fopen failed. Might be permission required on oracle directory.. send me solution. My purpose is send attachment mail

procedure for inserting image into table without sqlloader


Whenever runs server side its run fine but,client side gives error ora- 22288.

Please help me
Re: Whenever runs server side its run fine but,client side gives error ora- 22288. [message #614180 is a reply to message #614178] Sun, 18 May 2014 04:21 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Without any code, it is kind of a blind guess, but nevertheless: the file you are talking about should reside on a database server, not on your local PC. I suppose that you are reading files from a directory (created on the server), and you have already created an Oracle directory which points to that file system directory. Pay attention to the fact that any user (who is going to work with that directory) should be granted required privileges.
Re: Whenever runs server side its run fine but,client side gives error ora- 22288. [message #614187 is a reply to message #614180] Sun, 18 May 2014 05:37 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
create or replace directory my_files as 'c:/test';


declare
  f_lob bfile;
  b_lob blob;
begin
  insert into emp1(empno,empname,resume) values ( 1001, 'BILLGATES',empty_blob())
  return resume into b_lob;
-- resume is the field name in my table which has BLOB data type
  f_lob := bfilename( 'MY_FILES', 'Purchase.doc' );
  dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
  dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
  dbms_lob.fileclose(f_lob);
  commit;
end;



And i have given all permissions..
Re: Whenever runs server side its run fine but,client side gives error ora- 22288. [message #614188 is a reply to message #614187] Sun, 18 May 2014 05:41 Go to previous message
Solomon Yakobson
Messages: 3273
Registered: January 2010
Location: Connecticut, USA
Senior Member
You can't use BFILEs to load local files. BFILEs reside in database serveraccessible directories. Use client side tool, e.g. SQL*Loader or write your own client side code (Java, .Net,...).

SY.
Previous Topic: plsql statment with this output
Next Topic: Rolls limit
Goto Forum:
  


Current Time: Fri Apr 26 14:29:06 CDT 2024