我无法执行以下语句 -
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()关于路径有两件事要说:
- Windows 上的格式如下
file:c:\WINNT\Profiles\username\WALLETS
- 钱包路径必须可从数据库服务器访问。
显然,您的代码在第一点上失败了,因为 file
关键字和驱动器号之间有一个空格。
也许第二点也适用:这是数据库服务器上的驱动器吗?
关于Oracle请求utl_http包时出现错误 "ORA-28759: failure to open file",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26697841/