PL/SQL (MOSC)

MOSC Banner

HTTP Call error: Host does not exist

in PL/SQL (MOSC) 15 commentsAnswered ✓

I am using DB 12.1.0.2.0 I am running following plsql block to call http request which runs fine (Response Code: 200 Response Message: OK) on test instance but fails on Production. DB versions are same on both instances. How can I troubleshoot issue?

DECLARE

 req  UTL_HTTP.REQ;

 resp UTL_HTTP.RESP;

 name VARCHAR2(256);

 value VARCHAR2(1024);

BEGIN

 UTL_HTTP.SET_PROXY('', '');

  req := UTL_HTTP.BEGIN_REQUEST('http://www.google.com');

 UTL_HTTP.SET_HEADER(req, 'User-Agent', 'Mozilla/4.0');

 resp := UTL_HTTP.GET_RESPONSE(req);

 DBMS_OUTPUT.PUT_LINE('HTTP response status code: ' || resp.status_code);

 DBMS_OUTPUT.PUT_LINE('HTTP response reason phrase: ' || resp.reason_phrase);

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center