通过samba建立linxu的共享目录,在windows访问远程目录,
通过sql打开远程目录下文件,可以发现文件,但是一打开文件就报错.
请各位达人指教啊!!!!!!!!!!!!!!!
SQL:
create or replace directory IMAGE_DIR as '\\Tuxedoserver\images';
declare
sourcefile BFILE;
errstr varchar2(1000);
begin
sourcefile := BFILENAME('IMAGE_DIR','abc.txt');
Dbms_Output.put_line(DBMS_LOB.GETLENGTH(sourcefile));
Dbms_Output.put_line(DBMS_LOB.FILEEXISTS(sourcefile));
Dbms_Output.put_line(DBMS_LOB.fileisopen(sourcefile));
Dbms_Output.put_line(DBMS_LOB.isopen(sourcefile));
IF (DBMS_LOB.FILEEXISTS(sourcefile) != 0) THEN
DBMS_LOB.FILEOPEN(sourcefile, DBMS_LOB.LOB_READONLY);
Dbms_Output.put_line('Opened file!');
DBMS_LOB.CLOSE(sourcefile);
END IF;
exception
when others then
errstr:=sqlerrm(sqlcode);
DBMS_OUTPUT.put_line(errstr);
end;
执行结果如下:
695
1
0
0
ORA-22288: 文件或 LOB 操作FILEOPEN失败

最新回复
zhuaqfly (2008-7-31 16:16:50)
Bluecate (2008-8-01 14:49:51)
zhuaqfly (2008-8-04 10:16:25)
chuifeng_1111 (2008-8-07 14:15:32)
zhuaqfly (2008-9-02 11:53:08)
zhuaqfly (2008-9-02 11:54:51)