Oracle请求utl_http包时出现错误 "ORA-28759: failure to open file"

标签 oracle plsql oracle11g oracle-apex

我无法执行以下语句 -

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;

我的钱包路径是C:\app\wallet,密码是abcd@1234。
执行此代码时,显示以下错误:

ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-28759: failure to open file

我该如何解决这个问题?

最佳答案

documentation for UTL_HTTP.SET_WALLET()关于路径有两件事要说:

  1. Windows 上的格式如下 file:c:\WINNT\Profiles\username\WALLETS
  2. 钱包路径必须可从数据库服务器访问。

显然,您的代码在第一点上失败了,因为 file 关键字和驱动器号之间有一个空格。

也许第二点也适用:这是数据库服务器上的驱动器吗?

关于Oracle请求utl_http包时出现错误 "ORA-28759: failure to open file",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26697841/

相关文章:

sql - 十进制数的 Oracle ceil

sql - 甲骨文数据透视 : from rows into columns

oracle - 无需安装 Oracle 客户端即可连接 ORACLE 数据库服务器的替代方案

Oracle PL/SQL : Returning specific selected columns from procedure

oracle - 使用 PL/SQL 生成 XLS 文件

java - 当我有 PIVOT 时,使用 JPA 如何在 native 查询中设置参数

oracle - SQLPLUS 无法在 win XP SP3 上使用 oracle instant client 运行

sql - 如何在 Oracle 中漂亮地格式化 JSON?

oracle - 压缩Oracle表

python - 上下文管理器、多个函数调用和事务