【发布时间】:2018-03-13 22:57:55
【问题描述】:
我有一个通过 URL 接受参数的 .NET Webform,我需要从我们的 Oracle 11g 数据库上的触发器中调用它。 基本上,每当产品库存发生变化时,触发器都应该使用表中的信息调用 URL,如下所示:
'http://localhost:9999/Webform.aspx?ID=' || ID || '&quantity=' || quantity
无需获得响应,因为 .NET 网络表单将处理其余部分。
我尝试过这样做:
begin
dbms_network_acl_admin.create_acl (
acl => 'utl_http.xml',
description => 'my acl',
principal => 'user',
is_grant => TRUE,
privilege => 'connect',
start_date => null,
end_date => null);
commit;
end;
begin
dbms_network_acl_admin.add_privilege (
acl => 'utl_http.xml',
principal => 'user',
is_grant => false,
privilege => 'connect',
position => null,
start_date => null,
end_date => null);
commit;
end;
declare
req UTL_HTTP.REQ;
begin
req := UTL_HTTP.BEGIN_REQUEST('http://localhost:9999/Webform.aspx');
END;
但我是从前两个得到的:
anonymous block completed
这是从第三个开始的:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-12541: TNS:no listener
ORA-06512: at line 7
29273. 00000 - "HTTP request failed"
*Cause: The UTL_HTTP package failed to execute the HTTP request.
*Action: Use get_detailed_sqlerrm to check the detailed error message.
Fix the error and retry the HTTP request.
【问题讨论】: