请求 utl_http 包时出现 Oracle 错误“ORA-28759:无法打开文件”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26697841/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle error "ORA-28759: failure to open file" when requesting utl_http package
提问by Ali Asgor
I can't execute following statement-
我无法执行以下语句-
DECLARE
lo_req UTL_HTTP.req;
lo_resp UTL_HTTP.resp;
BEGIN
UTL_HTTP.SET_WALLET ('file: C:\app\wallet','abcd@1234');
lo_req := UTL_HTTP.begin_request('https://wordpress.org/');
lo_resp := UTL_HTTP.get_response(lo_req);
dbms_output.put_line(lo_resp.status_code);
UTL_HTTP.end_response(lo_resp);
END;
My wallet path is C:\app\wallet and password is abcd@1234.
When execute this code, display following error:
我的钱包路径是C:\app\wallet,密码是abcd@1234。
执行此代码时,显示以下错误:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-28759: failure to open file
How can I solve that?
我该如何解决?
回答by APC
The documentation for UTL_HTTP.SET_WALLET()has two things to say about the path:
UTL_HTTP.SET_WALLET()的文档对路径有两点要说:
- The format is like this on Windows
file:c:\WINNT\Profiles\username\WALLETS
- The wallet path must be accessible from the database server.
- Windows上的格式是这样的
file:c:\WINNT\Profiles\username\WALLETS
- 钱包路径必须可从数据库服务器访问。
Clearly your code fails the first point, as you have a space between the file
keyword and the drive letter.
很明显,您的代码在第一点失败了,因为file
关键字和驱动器号之间有一个空格。
Perhaps the second point applies too: is that a drive on your database server?
也许第二点也适用:这是您数据库服务器上的驱动器吗?
回答by Srini Karthikeyan
You need to add privileges for the appropriate user or group for your cwallet.sso and ewallet.p12 files.Privileges may not be present if you have used orakpi utility.
您需要为 cwallet.sso 和 ewallet.p12 文件的适当用户或组添加权限。如果您使用了 orakpi 实用程序,则可能不存在权限。
For Windows,
对于 Windows,
1.Select the file, right-click, and select Properties.
1.选择文件,右键单击,然后选择属性。
2.Select the Security tab and click Change Permissions.
2. 选择安全选项卡,然后单击更改权限。
3.Click Add > Locations, and select the appropriate location.
3. 单击添加 > 位置,然后选择适当的位置。
4.In the Select User or Group field, type ora_dba.Click the Check names button to verify that the ora_dba group exists.
4. 在“选择用户或组”字段中,键入 ora_dba。单击“检查名称”按钮以验证 ora_dba 组是否存在。
5.Click OK and the Permission Entry dialog box displays.
5. 单击“确定”,将显示“权限条目”对话框。
6.Select the Allow check box next to Full Control and click OK.
6. 选中完全控制旁边的允许复选框,然后单击确定。
7.In the Advanced Security dialog box click Apply.
7.在高级安全对话框中单击应用。
8.Click OK to exit the dialogs.
8. 单击确定退出对话框。