11g上的Ora-29283错误 [英] Ora-29283 error on 11g

查看:144
本文介绍了11g上的Ora-29283错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从oracle数据库访问我电脑上的文件夹?换句话说,数据库没有安装在我的本地机器上,我在我的PC上创建了一个文件夹'C:\ LOB',我想保存从数据库中检索到的图像,但它返回一个ora-29283错误:文件操作无效。我确信该目录已创建,因为我可以在我的数据库的目录文件夹中看到它。那可能是什么问题呢?是因为文件夹是在我的电脑上创建的,而数据库是在其他地方?以下是我的程序:



Is it possible to access a folder on my PC from oracle database? In other words database is not installed on my local machine and I have created a folder on my PC 'C:\LOB' where I want to save images retrieved from database, but it is returning an ora-29283 error: invalid file operation. I am sure that directory is created because I can see it in directories folder in my database. So what could be the problem? is it because folder is created on my PC and database is somewhere else? Below is my procedure:

CREATE OR REPLACE PROCEDURE BLOB_UPDATE (file_name in varchar) IS

    file_ref UTL_FILE.file_type;
    raw_max_size constant number := 32767;

 begin

   file_ref := UTL_FILE.fopen('MY_DIR', file_name, 'WB', raw_max_size);
   -- Here it stops working ! -- 
   ....
   utl_file.fclose(file_ref);

END BLOB_UPDATE;





我尝试了什么:



我试图创建另一个目录,但我仍然遇到同样的问题



What I have tried:

I have tried to create another directory but I still have the same problem

推荐答案

在其服务器上运行的数据库,这不是您的计算机(极少数情况除外)。

这意味着当您在SQL语句中编写任何部分时(c :\ my_dir \ my_file.txt)它是相对于服务器而不是你的计算机......

你可以使用UNC(\\my_computer\c_share\my_dir \\ \\ my_file.txt),但它现在打开了一个全新的安全问题...

所以基本上,即使有可能,直接将日期从表格保存到文件也是一个非常糟糕的主意使用SQL ...

执行此操作:

1.将BLOB作为任何其他数据返回给您的应用程序

2.保存BLOB数据使用标准 - 客户端 - 技术......
The database running on its server, which is not your computer (except in very rare cases).
That means that when you are writing in your SQL statement any part (c:\my_dir\my_file.txt) it is relative to the server and not to your computer...
You may use an UNC (\\my_computer\c_share\my_dir\my_file.txt), but it now opens a whole new problem of security...
So basically, even if it is possible, it is a very bad idea to directly save date from tables to files using SQL...
Do this:
1. Return the BLOB as any other data to your application
2. Save the BLOB data using standard - client side - techniques...


这篇关于11g上的Ora-29283错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆